Skip to content

Process routes: update, delete

The Process Verbs update, delete as api.sb routes, with inputs, result, refusals and an example.

Reference for Process, one group of Process routes.

Process.update

Changes the given properties of a Process. Verb page.

Text
PATCH /{namespace}/processes/{id}

Path: id. Body, as JSON: the other inputs. Emits Process.updated.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Process.
namestringThe name in sentence case, such as Month-end close.
saystext[]What a founder says to run, turn on, or ask about it.
settingsjsonThe Settings it reads: key, type, default, the founder’s sentence and the Verb that sets each.
defaultOnstring[]The Product Templates it is on in by default.
wakesjsonThe Events that wake it in the Startup’s own records.
inputsstring[]The Nouns an Action reads at its start.
outputsstring[]The Nouns a finished Action leaves behind, rolled up from its Workflows.
outcometextWhat a finished Action leaves true, in one sentence.
serviceLeveljsonIts target duration, clock, escalation Role, and the waits that stop the clock.
scopestringWhere it runs: startup, studio, or any.

Returns

OutputTypeRequiredDescription
processProcessrequiredThe Process.

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 PATCH https://api.sb/leaseline.app/processes/process_X2zteZ3CQI \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Leaseline"}'
JSON
{
  "api": "https://api.sb/leaseline.app",
  "process": {
    "$id": "https://api.sb/leaseline.app/processes/process_X2zteZ3CQI",
    "$type": "Process",
    "name": "Leaseline"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Process.update",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}

Process.delete

Deletes a Process: a soft delete that keeps its history, undone by Thing.restore. Verb page.

Text
DELETE /{namespace}/processes/{id}

Path: id. Emits Process.deleted.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Process.

Returns

OutputTypeRequiredDescription
processProcessrequiredThe Process.

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 DELETE https://api.sb/leaseline.app/processes/process_X2zteZ3CQI \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"
JSON
{
  "api": "https://api.sb/leaseline.app",
  "process": {
    "$id": "https://api.sb/leaseline.app/processes/process_X2zteZ3CQI",
    "$type": "Process",
    "name": "Leaseline"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Process.delete",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}