Get a model's resolved metamodel
const url = 'https://api.modeldesk.io/models/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/resolved-metamodel';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/resolved-metamodel \ --header 'Authorization: Bearer <token>'Get the model’s metamodel resolved at its effective pin: the metamodel resolved exactly as the full model read resolves it, with extension element types folded into elementTypes[*].resolvedProperties and extension built-in elements into elements, plus each extension on its own. A raw GET /metamodels/{metamodelId} does not carry the folded properties a client’s binding lookup needs. ETag and If-None-Match behave as on the identity read. With ref the metamodel is resolved against the pins that ref holds, which for a draft started on an older baseline are not main’s, and the ETag is that ref’s head.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”The ref whose pins to resolve the metamodel against, a model_branch document id, read as GET /models/{modelId}?ref= reads it: a draft is its owner’s alone. When omitted, the model’s main branch is read.
Responses
Section titled “Responses”OK
A model’s metamodel resolved at its effective pin: extension element types are folded into elementTypes[*].resolvedProperties and extension built-in elements into elements.
object
A compiled metamodel, documented in full under Get a metamodel (GET /metamodels/{metamodelId}).
object
The applied extensions, each on its own. Omitted when the model has none.
A compiled metamodel extension, documented in full under Get a metamodel extension (GET /metamodel-extensions/{extensionId}).
object
The add-ons the model adds, each on its own, in order. metamodel is already resolved with them. Omitted when the model has none.
A compiled metamodel, documented in full under Get a metamodel (GET /metamodels/{metamodelId}).
object
The metamodels the model’s dependencies are written in, as GET /models/{modelId} serves them. Omitted when the model has no dependency of another metamodel.
object
A compiled metamodel, documented in full under Get a metamodel (GET /metamodels/{metamodelId}).
object
Example generated
{ "metamodel": {}, "metamodelExtensions": [ {} ], "metamodelAddOns": [ {} ], "dependencyMetamodels": { "additionalProperty": {} }}Not modified
The caller may not read the model. Such a caller is refused with this or with the plain 404, never with RefNotFoundProblem, and with ref which of the two can depend on the ref named: a ref the model has can meet the model’s read check and its 403, while one it does not have answers 404.
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 model does not exist, or the caller may not read it and is refused here rather than with the 403, answered with the plain problem. Or ref names a ref that is not there for the caller, answered as RefNotFoundProblem: an unknown id, a ref of another model and another user’s draft all get that answer, in the same words, and only on a model the caller may read.
A Problem answered when a ref the request reads at is not there for the caller, on a resource they may read: a ref id that names nothing, a ref of another resource, and another user’s draft, which reads exactly as a ref that does not exist. The draft routes answer it too when the caller holds no draft.
A 404, as a missing resource is, and told apart from one by its type. A resource the caller cannot read keeps the plain answer it always had, whatever ref was named, so this one never says anything about a resource the caller could not see. To a client it means that the ref it was reading, typically a draft committed or discarded in another session, is gone while the resource stays: it goes back to the branch. The problem names no ref, so the answer for an id that names nothing and for another user’s draft is the same, byte for byte.
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 404 from a resource that is missing or not the caller’s to 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/ref-not-found"}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" } ]}