Replace the model's metadata
const url = 'https://api.modeldesk.io/models/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/metadata';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"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"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”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
The stored record’s id; null while the model has none, ignored in a request.
The model-wide description, one text per language.
One language-tagged text; lang is null for a text without a language.
object
A language tag such as nl or en.
Free-text tags; a keyword may repeat a language or carry none.
One language-tagged text; lang is null for a text without a language.
object
A language tag such as nl or en.
EU data-theme IRIs from the shipped list.
A licence IRI from the shipped list.
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.
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.
The resource’s stable external identifier.
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.
object
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.
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.
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
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.
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.
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
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.
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.
The authored contributors — agents the platform cannot see. Contributors known from the model’s history are derived by the catalog, never re-authored here.
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
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.
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.
Where a copy of the resource can be obtained.
object
The stored element’s id; null in a request, minted anew on every save.
The distribution’s format, such as a media type.
Responses
Section titled “Responses”OK
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
The stored record’s id; null while the model has none, ignored in a request.
The model-wide description, one text per language.
One language-tagged text; lang is null for a text without a language.
object
A language tag such as nl or en.
Free-text tags; a keyword may repeat a language or carry none.
One language-tagged text; lang is null for a text without a language.
object
A language tag such as nl or en.
EU data-theme IRIs from the shipped list.
A licence IRI from the shipped list.
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.
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.
The resource’s stable external identifier.
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.
object
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.
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.
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
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.
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.
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
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.
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.
The authored contributors — agents the platform cannot see. Contributors known from the model’s history are derived by the catalog, never re-authored here.
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
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.
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.
Where a copy of the resource can be obtained.
object
The stored element’s id; null in a request, minted anew on every save.
The distribution’s format, such as a media type.
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.
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
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.
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.
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.
object
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.
A Problem answered when an agent acting for a person reached a model whose owning organization has not enabled the AI platform the agent runs on, which its token names. Model content reaches the platform an agent runs on, so the organization decides: until an organization admin turns the platform on in the organization’s AI agent platforms setting, every route on the model refuses the agent, conditional reads and the events stream included, and the model list and every page that names other models leave the organization’s models out. A change of the setting applies to new requests within a minute; an events stream that is already open ends at its token’s expiry, at most ten minutes later.
object
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.
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.
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.
object
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 read.
A Problem answered when an agent acting for a person tried to land work on a shared branch, and the person did not grant it the right to commit: a merge, or a draft landing on a branch whose name does not start with agent/ (in any case). Nothing was written. Such an agent lands its draft on a branch of its own, which a person reviews and merges.
object
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.
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.
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.
object
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.
A Problem answered when an agent acting for a person made a request that reaches people outside the person’s organization, and its token holds no permission to publish: a release; a landing on main that would change whether the model, or its working version, is public; any landing on main of a model whose working version is public; and a landing on main that changes the metadata of a public model. The commit permission does not cover these; the person grants publishing as a permission of its own, and the organization that owns the model has to let agents reach that far too. Nothing was written. Without the permission an agent commits on a branch of its own, which a person reviews and merges.
object
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.
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.
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.
object
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 refusal of a commit, which another permission lifts.
An RFC 9457 problem document, always sent as application/problem+json.
object
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.
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.
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.
object
Example
{ "type": "https://modeldesk.io/problems/agent-level-not-allowed"}Model not found
An RFC 9457 problem document, always sent as application/problem+json.
object
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.
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.
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.
object
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.
An RFC 9457 problem document, always sent as application/problem+json.
object
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.
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.
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.
object
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "instance": "example", "violations": [ { "property": "example", "message": "example" } ]}default
Section titled “default”Error
An RFC 9457 problem document, always sent as application/problem+json.
object
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.
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.
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.
object
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "instance": "example", "violations": [ { "property": "example", "message": "example" } ]}