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.
PATCH /{namespace}/ processes/ {id}Path: id. Body, as JSON: the other inputs. Emits Process.updated.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Process. |
name | string | The name in sentence case, such as Month-end close. | |
says | text[] | What a founder says to run, turn on, or ask about it. | |
settings | json | The Settings it reads: key, type, default, the founder’s sentence and the Verb that sets each. | |
defaultOn | string[] | The Product Templates it is on in by default. | |
wakes | json | The Events that wake it in the Startup’s own records. | |
inputs | string[] | The Nouns an Action reads at its start. | |
outputs | string[] | The Nouns a finished Action leaves behind, rolled up from its Workflows. | |
outcome | text | What a finished Action leaves true, in one sentence. | |
serviceLevel | json | Its target duration, clock, escalation Role, and the waits that stop the clock. | |
scope | string | Where it runs: startup, studio, or any. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
process | Process | required | The Process. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
Example
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"}'{
"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.
DELETE /{namespace}/ processes/ {id}Path: id. Emits Process.deleted.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Process. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
process | Process | required | The Process. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
Example
curl -X DELETE https: //api.sb/ leaseline.app/ processes/ process_X2zteZ3CQI \
-H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"{
"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"
}
}