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.
PATCH /{namespace}/ icps/ {id}Path: id. Body, as JSON: the other inputs. Emits ICP.updated.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the ICP. |
description | text | Who they are and what they do. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
icp | ICP | required | The ICP. |
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/ icps/ icp_EwhsJU4AOW \
-H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
-H "Content-Type: application/ json" \
-d '{"description": "Renewal tracking for up to 200 units."}'{
"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.
DELETE /{namespace}/ icps/ {id}Path: id. Emits ICP.deleted.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the ICP. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
icp | ICP | required | The ICP. |
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/ icps/ icp_EwhsJU4AOW \
-H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"{
"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"
}
}