DELETE
/storage/locations/{locationId}Retire Storage Location
Retires a storage location: it stops being listed and can't be linked again.
A location that any bucket or dataset uses (a retired dataset included, since it still holds objects) is refused with 409 K9O_STATE_CONFLICT, reason location_in_use, never a silent fallback.
Answers with the id and status: "retired".
The change is audited as data.write.org.settings_updated.
Parameters
| locationId * | path | The storage location's id ( |
| projectSlug * | path | The project's slug: the path segment after It is unique within the org. |
Responses
| HTTP | K9O Code | Description |
|---|---|---|
| 200 | Success | |
| 403 | K9O_ACCESS_DENIED | Your role does not permit deprovisioning this storage location. |
| 404 | K9O_NOT_FOUND | No storage location with this id exists in the project, or it is already retired. |
| 409 | K9O_STATE_CONFLICT | The storage location is still used by a bucket or a Dataset (`context.reason: "location_in_use"`, with the buckets and the Dataset count). |
Response body (200)
| data * | object | The location that was retired. |
| id * | string | The retired location's id ( |
| status * | "retired" | Always |
| meta * | any |
TypeScript
// const k9o = new K9o({ orgSlug: 'playground', projectSlug: 'storefront', apiKey: 'k9o_…' })
const { data } = await k9o.storage.locations.retire('<locationId>')Showing example in TypeScript
Response example (200)
{
"data": {
"id": "string",
"status": "retired"
}
}