Skip to content

Action routes: resume, retry, undo

The Action Verbs resume, retry, undo as api.sb routes, with inputs, result, refusals and an example.

Reference for Action, one group of Action routes.

Action.resume

Resume ends a pause and lets the Action run as reviewed, or reopen what remained of its delay window. Verb page.

Text
POST /{namespace}/actions/{action}/resume

Path: action. Body, as JSON: the other inputs. Emits Action.resumed.

Inputs

InputTypeRequiredDescription
actionActionrequiredThe paused Action.
reasontextrequiredWhy it may proceed.

Returns

OutputTypeRequiredDescription
actionActionrequiredThe resumed Action.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

Terminal
curl -X POST https://api.sb/leaseline.app/actions/act_br07HsG8MG/resume \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"reason":"Example reason"}'
JSON
{
  "api": "https://api.sb/leaseline.app",
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "$type": "Action",
    "status": "done",
    "mode": "try",
    "operation": "Action.resume"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}

Action.retry

Retry runs a failed Action again as a new Action linked to the one that failed. Verb page.

Text
POST /{namespace}/actions/{action}/retry

Path: action. Emits Action.retried.

Inputs

InputTypeRequiredDescription
actionActionrequiredThe failed Action.

Returns

OutputTypeRequiredDescription
retryActionrequiredThe new Action.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.
The record is not in a state that allows this Verb, so the call is refused.refusedRead the record, run the Verb that moves it to an allowed state, then retry.None.

Example

Terminal
curl -X POST https://api.sb/leaseline.app/actions/act_br07HsG8MG/retry \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"
JSON
{
  "api": "https://api.sb/leaseline.app",
  "retry": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "$type": "Action",
    "status": "pending",
    "mode": "try"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Action.retry",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}

Action.undo

Undo reverses a done Action: it deletes the records the Action created and restores what it changed, each restorable. Verb page.

Text
POST /{namespace}/actions/{action}/undo

Path: action. Emits Action.undone.

Inputs

InputTypeRequiredDescription
actionActionrequiredThe done Action to undo.

Returns

OutputTypeRequiredDescription
actionActionrequiredThe undone Action, linked to the records it removed and restored.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

Terminal
curl -X POST https://api.sb/leaseline.app/actions/act_br07HsG8MG/undo \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"
JSON
{
  "api": "https://api.sb/leaseline.app",
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "$type": "Action",
    "status": "done",
    "mode": "try",
    "operation": "Action.undo"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}