Skip to content

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.

Text
PATCH /{namespace}/systems/{id}

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

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the System.
jobstringThe one job it does.

Returns

OutputTypeRequiredDescription
systemSystemrequiredThe System.

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/systems/system_uGWze2jvrp \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"job":"Example job"}'
JSON
{
  "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.

Text
DELETE /{namespace}/systems/{id}

Path: id. Emits System.deleted.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the System.

Returns

OutputTypeRequiredDescription
systemSystemrequiredThe System.

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/systems/system_uGWze2jvrp \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"
JSON
{
  "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"
  }
}