Get a model's metamodel pin
const url = 'https://api.modeldesk.io/models/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/metamodel-pin';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.modeldesk.io/models/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/metamodel-pin \ --header 'Authorization: Bearer <token>'Get the metamodel pin the model’s main branch holds, in the terms the update below takes (see MetamodelPin for the one field it may lack), and what refuses a change of its extension or add-on set. Adding or removing an extension or an add-on commits to main and has no merge semantics across branches, so it is refused while the model has any ref other than main that is not a draft. setChangeBlockedBy lists those refs, found by the same query the update’s refusal runs, so a client can show the reason before offering the change. A change of versions alone is never refused by them. The branch listing cannot stand in for this: it shows no generated branches, and those block the change too.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Responses
Section titled “Responses”OK
A model’s metamodel pin on main and what blocks a change of its extension set.
object
A model’s metamodel pin as its root holds it, in the terms of MetamodelPinUpdate, so a client can build an update from what it read. It is not always a valid update as it stands: metamodelVersion may be absent here, and an update requires it, so a client then supplies it.
object
The base metamodel the model is pinned to.
The pinned base version name. May be absent, when the root records none (a metamodel model’s root pins no metamodel); a client building an update must then supply it.
The pinned extensions in declaration order; empty when none is pinned.
Pin for a single metamodel extension: the extension model id plus its version name. In an update, an absent version name pins the extension’s current release. In a pin read back, it is absent when the pin records no version name.
object
The pinned add-ons in the order their profiles apply; empty when none is pinned. An update built from this read has to carry them, since one that leaves them out drops every add-on.
Pin for a single add-on: its model id and the requested standard version, its latest release when omitted.
object
The refs that refuse adding or removing a metamodel extension or add-on: every ref other than main that is not a draft. Nothing blocks the change when branches is empty and generatedBranches is zero.
object
The names of the side branches, sorted. Deleting them lifts the block; merging one into main first keeps its changes, but a merge alone leaves the branch in place.
How many generated branches origin mapping keeps for the model. They are counted rather than named because no listing shows them and nobody can delete them.
Example generated
{ "pin": { "metamodelId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "metamodelVersion": "example", "extensionVersions": [ { "extensionId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "versionName": "example" } ], "addOnVersions": [ { "addOnId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "versionName": "example" } ] }, "setChangeBlockedBy": { "branches": [ "example" ], "generatedBranches": 1 }}The caller may not read the model, answered with the plain problem. 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.
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.
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-platform-not-enabled"}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" } ]}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" } ]}