System routes: update, delete
The System Verbs update, delete as api.sb routes, with inputs, result, refusals and an example.
Reference for System, one group of System routes.
System.update
Changes the given properties of a System. Verb page.
PATCH /{namespace}/ systems/ {id}Path: id. Body, as JSON: the other inputs. Emits System.updated.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the System. |
job | string | The one job it does. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
system | System | required | The System. |
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/ systems/ system_uGWze2jvrp \
-H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
-H "Content-Type: application/ json" \
-d '{"job": "Example job"}'{
"api": "https: //api.sb/ leaseline.app",
"system": {
"$id": "https: //api.sb/ leaseline.app/ systems/ system_uGWze2jvrp",
"$type": "System",
"job": "Example job"
},
"action": {
"$id": "https: //api.sb/ leaseline.app/ actions/ act_br07HsG8MG",
"operation": "System.update",
"status": "done"
},
"links": {
"self": "https: //api.sb/ leaseline.app/ actions/ act_br07HsG8MG"
}
}System.delete
Deletes a System: a soft delete that keeps its history, undone by Thing.restore. Verb page.
DELETE /{namespace}/ systems/ {id}Path: id. Emits System.deleted.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the System. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
system | System | required | The System. |
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/ systems/ system_uGWze2jvrp \
-H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"{
"api": "https: //api.sb/ leaseline.app",
"system": {
"$id": "https: //api.sb/ leaseline.app/ systems/ system_uGWze2jvrp",
"$type": "System",
"job": "Example job"
},
"action": {
"$id": "https: //api.sb/ leaseline.app/ actions/ act_br07HsG8MG",
"operation": "System.delete",
"status": "done"
},
"links": {
"self": "https: //api.sb/ leaseline.app/ actions/ act_br07HsG8MG"
}
}