Skip to content

Actions

An action module executes actions and answers three questions over HTTP with signed requests:

Method and path Purpose
POST /v1/verify Would this action be valid? Returns approve and reason
POST /v1/execute Execute it. Returns the output
GET /v1/check/{task} Was it executed, and with what?

A call contains the task, scope, epoch, sequence, term, action and input.

Included actions

Action Input
kv.put key (at most 256 characters), value
kv.delete key

Write your own module

Set ACTION_MODULE_URL of controllers and auditors. ACTIONS lists what a controller may perform, and CAPABILITIES what it registers. A module must

  1. check on the ledger that the caller leads the named epoch and term,
  2. store the newest sequence and term for each scope, and refuse older ones,
  3. store the execution with its effect in one transaction, and return the stored output if the task is repeated,
  4. answer check from that record.

Answer 422 if the action is invalid, and 409 if the caller has no lease.