Tenant routes: update, delete
The Tenant Verbs update, delete as api.sb routes, with inputs, result, refusals and an example.
Reference for Tenant, one group of Tenant routes.
Tenant.update
Changes the given properties of a Tenant. Verb page.
PATCH /{namespace}/ tenants/ {id}Path: id. Body, as JSON: the other inputs. Emits Tenant.updated.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Tenant. |
placement | string | Where the Tenant sits in an address: path or host. | |
apiVersion | string | The API version an unversioned call with this Tenant’s keys answers at; set at creation, moved only by pin. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
tenant | Tenant | required | The Tenant. |
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/ tenants/ ten_Bu63f0he26 \
-H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
-H "Content-Type: application/ json" \
-d '{"placement": "path"}'{
"api": "https: //api.sb/ leaseline.app",
"tenant": {
"$id": "https: //api.sb/ leaseline.app/ tenants/ ten_Bu63f0he26",
"$type": "Tenant",
"placement": "path",
"apiVersion": "v2"
},
"action": {
"$id": "https: //api.sb/ leaseline.app/ actions/ act_br07HsG8MG",
"operation": "Tenant.update",
"status": "done"
},
"links": {
"self": "https: //api.sb/ leaseline.app/ actions/ act_br07HsG8MG"
}
}Tenant.delete
Deletes a Tenant: a soft delete that keeps its history, undone by Thing.restore. Verb page.
DELETE /{namespace}/ tenants/ {id}Path: id. Emits Tenant.deleted.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Tenant. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
tenant | Tenant | required | The Tenant. |
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/ tenants/ ten_Bu63f0he26 \
-H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"{
"api": "https: //api.sb/ leaseline.app",
"tenant": {
"$id": "https: //api.sb/ leaseline.app/ tenants/ ten_Bu63f0he26",
"$type": "Tenant",
"placement": "path",
"apiVersion": "v2"
},
"action": {
"$id": "https: //api.sb/ leaseline.app/ actions/ act_br07HsG8MG",
"operation": "Tenant.delete",
"status": "done"
},
"links": {
"self": "https: //api.sb/ leaseline.app/ actions/ act_br07HsG8MG"
}
}