Skip to main content
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 (byos_...).

projectSlug *path

The project's slug: the path segment after @.

It is unique within the org.

Responses
HTTPK9O CodeDescription
200Success
403K9O_ACCESS_DENIEDYour role does not permit deprovisioning this storage location.
404K9O_NOT_FOUNDNo storage location with this id exists in the project, or it is already retired.
409K9O_STATE_CONFLICTThe 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 (byos_...).

status *"retired"

Always retired.

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"
  }
}

More in Storage & Schema