Skip to content

Replace the model's metadata

PUT
/models/{modelId}/metadata
curl --request PUT \
--url https://api.modeldesk.io/models/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/metadata \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "descriptions": [ { "lang": "example", "value": "example" } ], "keywords": [ { "lang": "example", "value": "example" } ], "themes": [ "https://example.com" ], "status": "UnderDevelopment", "license": "https://example.com", "classification": "DATA_MODEL", "public": true, "publicWorkingVersion": true, "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" } ], "contributors": [ { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "name": "example", "iri": "https://example.com", "email": "example" } ], "distributions": [ { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "accessUrl": "https://example.com", "format": "example" } ] }'

Replace the model’s metadata with the given record and commit the change. The record is replaced whole, agents and distributions included, so the body is the record as it should be from now on; the children in the response carry new ids. Anyone who may update the model may edit its metadata, the public flag included: the flag alone publishes nothing — a model is publicly visible once it has a released version, the flag is set, its access mode is shared, and its organization has the catalog feature, which this operation is behind as well.

modelId
required
string format: uuid
Media typeapplication/json

The descriptive, DCAT-aligned record a model carries about itself, versioned with the model. The closed lists — status, license, themes — take the platform-shipped values: the ADMS status names, licence IRIs, and EU data-theme IRIs. A record that says nothing has every list empty, classification: DATA_MODEL and public: false.

object
id

The stored record’s id; null while the model has none, ignored in a request.

string format: uuid
nullable
descriptions
required

The model-wide description, 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
classification
required
string
Allowed values: DATA_MODEL REFERENCE_DATASET CONTROLLED_VOCABULARY
public
required

Whether the owner wants the model publicly visible. Read at the head of the main branch by the public surfaces, which serve its releases, and its working version when publicWorkingVersion is set too; inert until a version is released or the working version is published, and refused on a model only its creator can see.

boolean
publicWorkingVersion

Whether the owner also publishes the working version, the head of the main branch, beside the releases; for a model without a release it is what the public page shows. Refused while public is false.

boolean
landingPage
string format: uri
nullable
identifier

The resource’s stable external identifier.

string
nullable
canonicalIri

The resource’s stable identity, used as the subject of its DCAT record and the target its IRI dereferences to. Optional even for a public model.

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
contributors
required

The authored contributors — agents the platform cannot see. Contributors known from the model’s history are derived by the catalog, never re-authored here.

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
distributions
required
Array<object>

Where a copy of the resource can be obtained.

object
id

The stored element’s id; null in a request, minted anew on every save.

string format: uuid
nullable
accessUrl
required
string format: uri
format

The distribution’s format, such as a media type.

string
nullable

OK

Media typeapplication/json

The descriptive, DCAT-aligned record a model carries about itself, versioned with the model. The closed lists — status, license, themes — take the platform-shipped values: the ADMS status names, licence IRIs, and EU data-theme IRIs. A record that says nothing has every list empty, classification: DATA_MODEL and public: false.

object
id

The stored record’s id; null while the model has none, ignored in a request.

string format: uuid
nullable
descriptions
required

The model-wide description, 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
classification
required
string
Allowed values: DATA_MODEL REFERENCE_DATASET CONTROLLED_VOCABULARY
public
required

Whether the owner wants the model publicly visible. Read at the head of the main branch by the public surfaces, which serve its releases, and its working version when publicWorkingVersion is set too; inert until a version is released or the working version is published, and refused on a model only its creator can see.

boolean
publicWorkingVersion

Whether the owner also publishes the working version, the head of the main branch, beside the releases; for a model without a release it is what the public page shows. Refused while public is false.

boolean
landingPage
string format: uri
nullable
identifier

The resource’s stable external identifier.

string
nullable
canonicalIri

The resource’s stable identity, used as the subject of its DCAT record and the target its IRI dereferences to. Optional even for a public model.

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
contributors
required

The authored contributors — agents the platform cannot see. Contributors known from the model’s history are derived by the catalog, never re-authored here.

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
distributions
required
Array<object>

Where a copy of the resource can be obtained.

object
id

The stored element’s id; null in a request, minted anew on every save.

string format: uuid
nullable
accessUrl
required
string format: uri
format

The distribution’s format, such as a media type.

string
nullable

Example

{
"status": "UnderDevelopment",
"classification": "DATA_MODEL"
}

The organization that owns the model does not have the catalog feature, or the model is theirs to read but not to change, answered with the plain problem. Or the caller is an agent acting for a person who did not grant it the right to commit, answered as AgentCommitNotGrantedProblem before anything is read: the record commits to main. Or the caller is an agent acting for a person, and the write would set or clear public or publicWorkingVersion, change the record of a model whose metadata makes it public, or land on a model whose working version is public, answered as AgentPublishNotGrantedProblem with nothing written. Or the caller is an agent acting for a person, and the organization that owns the model has not enabled the agent’s AI platform, answered as AgentPlatformNotEnabledProblem. Or the caller is an agent acting for a person, and the request reaches further than the maximum level the organization that owns the model lets agents reach, answered as AgentLevelNotAllowedProblem with nothing written, whatever the agent was granted.

Media typeapplication/problem+json
Any of:

A Problem answered when an agent acting for a person made a request that reaches further than the maximum level the organization that owns the model lets agents reach, set in the organization’s AI agent platforms setting: staging into a draft or working on a branch where the maximum is read, a merge, a landing on a branch that is not an agent’s own, or taking back or landing another’s staged change where it is propose, and anything that reaches people outside the organization where it is below publish. The person’s grant does not lift it, since a grant spans the person’s organizations and the maximum is each organization’s own; an organization admin can raise it. Nothing was written. A change of the setting applies to new requests within a minute.

object
type
required

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
type
required

Stable constant a client branches on, which is what tells this 403 from the plain one the same routes answer for a model the caller may not change, and from the refusals a permission the person grants lifts.

string format: uri
Allowed values: https://modeldesk.io/problems/agent-level-not-allowed

Example

{
"type": "https://modeldesk.io/problems/agent-level-not-allowed"
}

Model not found

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): a value outside a shipped list, two descriptions in one language or one without a language, an agent without a name, a distribution without an access URL, a relative IRI or a javascript:, data:, vbscript: or file: one, a list or a text past its size, or public: true on a model only its creator can see.

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