Skip to content

ICP routes: update, delete

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

Reference for ICP, one group of ICP routes.

ICP.update

Changes the given properties of an ICP. Verb page.

Text
PATCH /{namespace}/icps/{id}

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

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the ICP.
descriptiontextWho they are and what they do.

Returns

OutputTypeRequiredDescription
icpICPrequiredThe ICP.

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/icps/icp_EwhsJU4AOW \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"description":"Renewal tracking for up to 200 units."}'
JSON
{
  "api": "https://api.sb/leaseline.app",
  "icp": {
    "$id": "https://api.sb/leaseline.app/icps/icp_EwhsJU4AOW",
    "$type": "ICP",
    "description": "Renewal tracking for up to 200 units."
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "ICP.update",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}

ICP.delete

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

Text
DELETE /{namespace}/icps/{id}

Path: id. Emits ICP.deleted.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the ICP.

Returns

OutputTypeRequiredDescription
icpICPrequiredThe ICP.

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/icps/icp_EwhsJU4AOW \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"
JSON
{
  "api": "https://api.sb/leaseline.app",
  "icp": {
    "$id": "https://api.sb/leaseline.app/icps/icp_EwhsJU4AOW",
    "$type": "ICP",
    "description": "Renewal tracking for up to 200 units."
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "ICP.delete",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}