Skip to content
getgeolens.com

Delete the previous version

Deprecated
DELETE
/datasets/{dataset_id}/previous-version
curl --request DELETE \
--url 'https://example.com/api/datasets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/previous-version?expected_version_number=1' \
--header 'Authorization: Bearer <token>'

Delete the dataset’s newest kept version, so it can no longer be restored.

Deprecated: use DELETE /previous-versions/{version_number}. Behaves like it, and also refuses with 409 previous_version_changed when expected_version_number is not the newest kept version.

dataset_id
required
Dataset Id
string format: uuid
expected_version_number
required
Expected Version Number

The newest kept version, which the caller confirmed deleting

integer

The newest kept version, which the caller confirmed deleting

Successful Response

Bad request — invalid payload

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
code
Code

A machine-readable code for the problem, on the errors that carry one, such as catalog_lock_conflict on a 409 for a row another request holds. Absent otherwise.

string
action
Action

The refused change, on a dataset_in_shared_maps 422: unpublish, restrict_visibility or delete. Absent otherwise.

string
shared_maps
Shared Maps

The shared maps behind a dataset_in_shared_maps 422, as {"id", "name"} pairs. Absent otherwise.

Array<object>
object
key
additional properties
string

Example

{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Unauthorized — missing or invalid credentials

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
code
Code

A machine-readable code for the problem, on the errors that carry one, such as catalog_lock_conflict on a 409 for a row another request holds. Absent otherwise.

string
action
Action

The refused change, on a dataset_in_shared_maps 422: unpublish, restrict_visibility or delete. Absent otherwise.

string
shared_maps
Shared Maps

The shared maps behind a dataset_in_shared_maps 422, as {"id", "name"} pairs. Absent otherwise.

Array<object>
object
key
additional properties
string

Example

{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Forbidden — caller lacks write access

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
code
Code

A machine-readable code for the problem, on the errors that carry one, such as catalog_lock_conflict on a 409 for a row another request holds. Absent otherwise.

string
action
Action

The refused change, on a dataset_in_shared_maps 422: unpublish, restrict_visibility or delete. Absent otherwise.

string
shared_maps
Shared Maps

The shared maps behind a dataset_in_shared_maps 422, as {"id", "name"} pairs. Absent otherwise.

Array<object>
object
key
additional properties
string

Example

{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Not found

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
code
Code

A machine-readable code for the problem, on the errors that carry one, such as catalog_lock_conflict on a 409 for a row another request holds. Absent otherwise.

string
action
Action

The refused change, on a dataset_in_shared_maps 422: unpublish, restrict_visibility or delete. Absent otherwise.

string
shared_maps
Shared Maps

The shared maps behind a dataset_in_shared_maps 422, as {"id", "name"} pairs. Absent otherwise.

Array<object>
object
key
additional properties
string

Example

{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Conflict — resource state prevents the operation

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
code
Code

A machine-readable code for the problem, on the errors that carry one, such as catalog_lock_conflict on a 409 for a row another request holds. Absent otherwise.

string
action
Action

The refused change, on a dataset_in_shared_maps 422: unpublish, restrict_visibility or delete. Absent otherwise.

string
shared_maps
Shared Maps

The shared maps behind a dataset_in_shared_maps 422, as {"id", "name"} pairs. Absent otherwise.

Array<object>
object
key
additional properties
string

Example

{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Validation error

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
code
Code

A machine-readable code for the problem, on the errors that carry one, such as catalog_lock_conflict on a 409 for a row another request holds. Absent otherwise.

string
action
Action

The refused change, on a dataset_in_shared_maps 422: unpublish, restrict_visibility or delete. Absent otherwise.

string
shared_maps
Shared Maps

The shared maps behind a dataset_in_shared_maps 422, as {"id", "name"} pairs. Absent otherwise.

Array<object>
object
key
additional properties
string

Example

{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Too many requests — retry after the advertised interval

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
code
Code

A machine-readable code for the problem, on the errors that carry one, such as catalog_lock_conflict on a 409 for a row another request holds. Absent otherwise.

string
action
Action

The refused change, on a dataset_in_shared_maps 422: unpublish, restrict_visibility or delete. Absent otherwise.

string
shared_maps
Shared Maps

The shared maps behind a dataset_in_shared_maps 422, as {"id", "name"} pairs. Absent otherwise.

Array<object>
object
key
additional properties
string

Example

{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}
Retry-After
integer

Seconds until the request may be retried

Internal server error

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
code
Code

A machine-readable code for the problem, on the errors that carry one, such as catalog_lock_conflict on a 409 for a row another request holds. Absent otherwise.

string
action
Action

The refused change, on a dataset_in_shared_maps 422: unpublish, restrict_visibility or delete. Absent otherwise.

string
shared_maps
Shared Maps

The shared maps behind a dataset_in_shared_maps 422, as {"id", "name"} pairs. Absent otherwise.

Array<object>
object
key
additional properties
string

Example

{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Service unavailable — the database could not serve the request

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
code
Code

A machine-readable code for the problem, on the errors that carry one, such as catalog_lock_conflict on a 409 for a row another request holds. Absent otherwise.

string
action
Action

The refused change, on a dataset_in_shared_maps 422: unpublish, restrict_visibility or delete. Absent otherwise.

string
shared_maps
Shared Maps

The shared maps behind a dataset_in_shared_maps 422, as {"id", "name"} pairs. Absent otherwise.

Array<object>
object
key
additional properties
string

Example

{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}