Retire a dataset
DELETE
/v1/datasets/defs/{def_id}
const url = 'https://example.com/v1/datasets/defs/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = {method: 'DELETE', headers: {'X-API-Key': '<X-API-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://example.com/v1/datasets/defs/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'X-API-Key: <X-API-Key>'Retire one dataset definition: it leaves the shelf. Same tombstone contract as retiring a source — its pinned versions stay resolvable by id, so a training run already holding one does not break. Sources are untouched.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” def_id
required
string format: uuid
Query Parameters
Section titled “Query Parameters ” account_id
Act on this account (active)
string | null format: uuid
Act on this account (active)
Responses
Section titled “ Responses ”Retired (or already retired — the call is idempotent)
Media type application/json
DatasetDefRetireResponse
Result of retiring a dataset definition.
object
retired
required
False when the dataset was already retired; the call is idempotent
boolean
name
required
Name the dataset had at retirement
string
pinned_versions_retained
required
Pinned versions left resolvable by id, so running trainings survive
integer
Example generated
{ "retired": true, "name": "example", "pinned_versions_retained": 1}Invalid or missing API key
Media type application/json
ErrorResponse
Standard error response.
object
detail
required
Error message describing what went wrong
string
Example generated
{ "detail": "example"}Unknown dataset, or outside the caller’s account
Validation Error
Media type application/json
HTTPValidationError
object
detail
Array<object>
ValidationErrorobject
loc
required
Location
Array<string | integer>
msg
required
Message
string
type
required
Error Type
string
input
ctx
Context
object
Example generated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}