Skip to content
getgeolens.com

Update Distribution Endpoint

PATCH
/records/{record_id}/distributions/{distribution_id}/
curl --request PATCH \
--url https://example.com/records/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/distributions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "distribution_type": "example", "format": "example", "url": "example", "title": "example", "description": "example", "protocol": "example", "media_type": "example", "is_primary": true }'

Update a distribution (manual only; auto-generated distributions are immutable).

record_id
required
Record Id
string format: uuid
distribution_id
required
Distribution Id
string format: uuid
Media type application/json
DistributionUpdate
object
distribution_type
Any of:
string
<= 30 characters
format
Any of:
string
<= 50 characters
url
Any of:
string
<= 2048 characters
title
Any of:
string
<= 500 characters
description
Any of:
string
<= 2000 characters
protocol
Any of:
string
<= 100 characters
media_type
Any of:
string
<= 100 characters
is_primary
Any of:
boolean
Example generated
{
"distribution_type": "example",
"format": "example",
"url": "example",
"title": "example",
"description": "example",
"protocol": "example",
"media_type": "example",
"is_primary": true
}

Successful Response

Media type application/json
DistributionResponse
object
id
required
Id
string format: uuid
record_id
required
Record Id
string format: uuid
distribution_type
required
Distribution Type
string
format
required
Any of:
string
url
required
Url
string
title
required
Any of:
string
description
required
Any of:
string
protocol
required
Any of:
string
media_type
required
Any of:
string
is_primary
required
Is Primary
boolean
auto_generated
required
Auto Generated

True if created automatically by the system

boolean
Example generated
{
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"record_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"distribution_type": "example",
"format": "example",
"url": "example",
"title": "example",
"description": "example",
"protocol": "example",
"media_type": "example",
"is_primary": true,
"auto_generated": true
}

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
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
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
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
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
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
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
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
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
Example
{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}