Skip to content

Replace what a dataset says about itself

PUT
/datasets/{datasetId}/metadata
curl --request PUT \
--url https://api.modeldesk.io/datasets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/metadata \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "resourceKind": "example", "descriptions": [ { "lang": "example", "value": "example" } ], "keywords": [ { "lang": "example", "value": "example" } ], "themes": [ "https://example.com" ], "status": "UnderDevelopment", "license": "https://example.com", "landingPage": "https://example.com", "identifier": "example", "canonicalIri": "https://example.com", "publisher": { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "name": "example", "iri": "https://example.com", "email": "example" }, "maintainers": [ { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "name": "example", "iri": "https://example.com", "email": "example" } ], "contactPoints": [ { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "name": "example", "iri": "https://example.com", "email": "example" } ] }'

Replace the dataset’s descriptive record with the given one. The record is replaced whole, so the body is the record as it should be from now on; a record stating nothing removes it. It is a setting of the dataset and commits nothing. An agent is kept by its fields alone, so the agents in the response carry no id. Whoever may change the dataset may replace it. Whether the dataset is shown in the public catalog is its publicRecords setting, not a field here.

datasetId
required
string format: uuid
Media typeapplication/json

What a dataset says about itself for the catalog: the descriptive fields of a model’s metadata, from the same closed lists, without contributors, distributions or a public flag, and with the dataset’s kind of resource. A record that says nothing has every list empty.

object
resourceKind

What the dataset is to the public catalog, a value of datasetKinds from /public/metadata/vocabularies (VALUE_LIST, METADATA_RECORDS). A read names the dataset’s kind as it is stored, VALUE_LIST for a dataset that states none; a kind a later version added is named as stored, while the dataset is shown as a VALUE_LIST. A write naming a listed kind changes it, a write naming none or the kind as stored leaves it as it is, and a write naming any other value is refused with 422 naming resourceKind. Kept as a field of the dataset beside the record, not inside it, and left out of the record a public read serves, which names the kind on its own.

string
descriptions
required

One text per language.

Array<object>

One language-tagged text; lang is null for a text without a language.

object
lang

A language tag such as nl or en.

string
nullable
value
required
string
keywords
required

Free-text tags; a keyword may repeat a language or carry none.

Array<object>

One language-tagged text; lang is null for a text without a language.

object
lang

A language tag such as nl or en.

string
nullable
value
required
string
themes
required

EU data-theme IRIs from the shipped list.

Array<string>
status
string
nullable
Allowed values: UnderDevelopment Completed Deprecated Withdrawn
license

A licence IRI from the shipped list.

string format: uri
nullable
landingPage
string format: uri
nullable
identifier

The dataset’s stable external identifier.

string
nullable
canonicalIri

The dataset’s stable identity.

string format: uri
nullable
publisher
object
id

The stored element’s id on a model’s record; null in a request, minted anew on every save. Always null on a dataset’s record, which keeps an agent by its fields alone.

string format: uuid
nullable
name
required
string
iri
string format: uri
nullable
email

The agent’s e-mail address. The anonymous public model read serves it on contact points only, and leaves it out for the publisher, maintainers and contributors.

string
nullable
maintainers
required
Array<object>

A person or organization the metadata names. Which role it plays is the list it is in; the same agent named as publisher and as maintainer is two entries.

object
id

The stored element’s id on a model’s record; null in a request, minted anew on every save. Always null on a dataset’s record, which keeps an agent by its fields alone.

string format: uuid
nullable
name
required
string
iri
string format: uri
nullable
email

The agent’s e-mail address. The anonymous public model read serves it on contact points only, and leaves it out for the publisher, maintainers and contributors.

string
nullable
contactPoints
required
Array<object>

A person or organization the metadata names. Which role it plays is the list it is in; the same agent named as publisher and as maintainer is two entries.

object
id

The stored element’s id on a model’s record; null in a request, minted anew on every save. Always null on a dataset’s record, which keeps an agent by its fields alone.

string format: uuid
nullable
name
required
string
iri
string format: uri
nullable
email

The agent’s e-mail address. The anonymous public model read serves it on contact points only, and leaves it out for the publisher, maintainers and contributors.

string
nullable

OK

Media typeapplication/json

What a dataset says about itself for the catalog: the descriptive fields of a model’s metadata, from the same closed lists, without contributors, distributions or a public flag, and with the dataset’s kind of resource. A record that says nothing has every list empty.

object
resourceKind

What the dataset is to the public catalog, a value of datasetKinds from /public/metadata/vocabularies (VALUE_LIST, METADATA_RECORDS). A read names the dataset’s kind as it is stored, VALUE_LIST for a dataset that states none; a kind a later version added is named as stored, while the dataset is shown as a VALUE_LIST. A write naming a listed kind changes it, a write naming none or the kind as stored leaves it as it is, and a write naming any other value is refused with 422 naming resourceKind. Kept as a field of the dataset beside the record, not inside it, and left out of the record a public read serves, which names the kind on its own.

string
descriptions
required

One text per language.

Array<object>

One language-tagged text; lang is null for a text without a language.

object
lang

A language tag such as nl or en.

string
nullable
value
required
string
keywords
required

Free-text tags; a keyword may repeat a language or carry none.

Array<object>

One language-tagged text; lang is null for a text without a language.

object
lang

A language tag such as nl or en.

string
nullable
value
required
string
themes
required

EU data-theme IRIs from the shipped list.

Array<string>
status
string
nullable
Allowed values: UnderDevelopment Completed Deprecated Withdrawn
license

A licence IRI from the shipped list.

string format: uri
nullable
landingPage
string format: uri
nullable
identifier

The dataset’s stable external identifier.

string
nullable
canonicalIri

The dataset’s stable identity.

string format: uri
nullable
publisher
object
id

The stored element’s id on a model’s record; null in a request, minted anew on every save. Always null on a dataset’s record, which keeps an agent by its fields alone.

string format: uuid
nullable
name
required
string
iri
string format: uri
nullable
email

The agent’s e-mail address. The anonymous public model read serves it on contact points only, and leaves it out for the publisher, maintainers and contributors.

string
nullable
maintainers
required
Array<object>

A person or organization the metadata names. Which role it plays is the list it is in; the same agent named as publisher and as maintainer is two entries.

object
id

The stored element’s id on a model’s record; null in a request, minted anew on every save. Always null on a dataset’s record, which keeps an agent by its fields alone.

string format: uuid
nullable
name
required
string
iri
string format: uri
nullable
email

The agent’s e-mail address. The anonymous public model read serves it on contact points only, and leaves it out for the publisher, maintainers and contributors.

string
nullable
contactPoints
required
Array<object>

A person or organization the metadata names. Which role it plays is the list it is in; the same agent named as publisher and as maintainer is two entries.

object
id

The stored element’s id on a model’s record; null in a request, minted anew on every save. Always null on a dataset’s record, which keeps an agent by its fields alone.

string format: uuid
nullable
name
required
string
iri
string format: uri
nullable
email

The agent’s e-mail address. The anonymous public model read serves it on contact points only, and leaves it out for the publisher, maintainers and contributors.

string
nullable

Example

{
"status": "UnderDevelopment"
}

The dataset is not the caller’s to change.

Media typeapplication/problem+json

An RFC 9457 problem document, always sent as application/problem+json.

object
type

Present only on a typed refusal, whose own schema requires it and fixes its value. An untyped problem omits it, which RFC 9457 defines as about:blank: the status and title are all there is to branch on.

string format: uri
title
required
string
status
required
integer
detail
required
string
instance

The path of the request that was refused. Absent when the request was refused before it reached the application’s handlers: a 401 for a missing or unusable access token, and a 403 for a service account whose scopes do not reach the route.

string
violations

Present on a 400 raised by request-body validation, and on a 422 that refuses named fields (a malformed slug or namespace prefix). Each entry names the rejected property, so a client can attach the message to the field that caused it rather than showing one error for the whole form.

Array<object>
object
property
required
string
message
required
string

Example generated

{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"violations": [
{
"property": "example",
"message": "example"
}
]
}

The dataset does not exist, or is not the caller’s to read.

Media typeapplication/problem+json

An RFC 9457 problem document, always sent as application/problem+json.

object
type

Present only on a typed refusal, whose own schema requires it and fixes its value. An untyped problem omits it, which RFC 9457 defines as about:blank: the status and title are all there is to branch on.

string format: uri
title
required
string
status
required
integer
detail
required
string
instance

The path of the request that was refused. Absent when the request was refused before it reached the application’s handlers: a 401 for a missing or unusable access token, and a 403 for a service account whose scopes do not reach the route.

string
violations

Present on a 400 raised by request-body validation, and on a 422 that refuses named fields (a malformed slug or namespace prefix). Each entry names the rejected property, so a client can attach the message to the field that caused it rather than showing one error for the whole form.

Array<object>
object
property
required
string
message
required
string

Example generated

{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"violations": [
{
"property": "example",
"message": "example"
}
]
}

The record was refused and nothing was written. violations names every refused field by its JSON path (status, descriptions[1].lang, maintainers[0].name), by the rules a model’s metadata is held to: a value outside a shipped list, two descriptions in one language or one without a language, an empty text, an agent without a name, a relative IRI or a javascript:, data:, vbscript: or file: one, a landing page that is no http or https address or carries a user name or password, a list past its size (50 descriptions, 100 keywords, 50 themes, 50 agents per role) or a text past its length (10,000 for a description, 200 for a keyword, 500 for a name, identifier or status, 2,048 for an IRI, 320 for an e-mail address).

Media typeapplication/problem+json

An RFC 9457 problem document, always sent as application/problem+json.

object
type

Present only on a typed refusal, whose own schema requires it and fixes its value. An untyped problem omits it, which RFC 9457 defines as about:blank: the status and title are all there is to branch on.

string format: uri
title
required
string
status
required
integer
detail
required
string
instance

The path of the request that was refused. Absent when the request was refused before it reached the application’s handlers: a 401 for a missing or unusable access token, and a 403 for a service account whose scopes do not reach the route.

string
violations

Present on a 400 raised by request-body validation, and on a 422 that refuses named fields (a malformed slug or namespace prefix). Each entry names the rejected property, so a client can attach the message to the field that caused it rather than showing one error for the whole form.

Array<object>
object
property
required
string
message
required
string

Example generated

{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"violations": [
{
"property": "example",
"message": "example"
}
]
}

Error

Media typeapplication/problem+json

An RFC 9457 problem document, always sent as application/problem+json.

object
type

Present only on a typed refusal, whose own schema requires it and fixes its value. An untyped problem omits it, which RFC 9457 defines as about:blank: the status and title are all there is to branch on.

string format: uri
title
required
string
status
required
integer
detail
required
string
instance

The path of the request that was refused. Absent when the request was refused before it reached the application’s handlers: a 401 for a missing or unusable access token, and a 403 for a service account whose scopes do not reach the route.

string
violations

Present on a 400 raised by request-body validation, and on a 422 that refuses named fields (a malformed slug or namespace prefix). Each entry names the rejected property, so a client can attach the message to the field that caused it rather than showing one error for the whole form.

Array<object>
object
property
required
string
message
required
string

Example generated

{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"violations": [
{
"property": "example",
"message": "example"
}
]
}