Skip to content

Get a model's metamodel pin

GET
/models/{modelId}/metamodel-pin
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.

modelId
required
string format: uuid

OK

Media typeapplication/json

A model’s metamodel pin on main and what blocks a change of its extension set.

object
pin
required

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

The base metamodel the model is pinned to.

string format: uuid
metamodelVersion

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.

string
extensionVersions
required

The pinned extensions in declaration order; empty when none is pinned.

Array<object>

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
extensionId
required
string format: uuid
versionName
string
>= 1 characters
addOnVersions
required

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.

Array<object>

Pin for a single add-on: its model id and the requested standard version, its latest release when omitted.

object
addOnId
required
string format: uuid
versionName
string
setChangeBlockedBy
required

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

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.

Array<string>
generatedBranches
required

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.

integer

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.

Media typeapplication/problem+json
Any of:

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
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 read.

string format: uri
Allowed values: https://modeldesk.io/problems/agent-platform-not-enabled

Example

{
"type": "https://modeldesk.io/problems/agent-platform-not-enabled"
}

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

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