Create a model version
const url = 'https://api.modeldesk.io/models/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/versions';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","description":"example","commitId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","overrideViolations":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.modeldesk.io/models/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/versions \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "description": "example", "commitId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "overrideViolations": true }'Create model version. The model is validated at the commit being released first: with an error finding the release is refused unless overrideViolations is true, in which case the version records validationOverride. Warnings and informational findings never refuse a release.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Body
Section titled “Request Body”object
The commit the caller means to release. A release is always cut at the branch head, so a commit other than the head is refused with 400 rather than releasing what the caller did not look at. Omit it to release whatever the head is.
Release even though the model has violations. The version then records validationOverride. Without violations it changes nothing.
Example generated
{ "name": "example", "description": "example", "commitId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "overrideViolations": true}Responses
Section titled “Responses”Created
A named release of a model at one commit. A release of a metamodel-level model also carries the compilation frozen at release time; see MetamodelRelease.
object
The model’s content as released. Carried when one version is read, created or updated, and left out of listings.
object
object
object
object
object
object
object
Owning model of the referenced element when it differs from the containing model (cross-model reference, e.g. a lineage base element). Omitted for same-model references.
The values the element holds that its type declares no property for; absent when none.
A value an element holds under no binding its type declares, kept so a round trip loses nothing.
object
object
object
object
Owning model of the referenced element when it differs from the containing model (cross-model reference, e.g. a lineage base element). Omitted for same-model references.
A structure the import holds without an element, kept with its own properties inside the layer of the element that refers to it. A node is held once; any other place that refers to it holds a reference to it instead.
object
The property that links the holding element or the enclosing node to this node; absent on a node no property links to.
The node’s global identity in the format’s own terms; absent on an anonymous node.
A label unique within the model, set only on an anonymous node that is referred to more than once.
Whether this entry only points at the node another entry holds under the same localId.
Whether the node is an ordered list, whose entries are its members in order.
Where an element was derived from: the source and rules models, and per property the source values it read.
object
object
object
object
Owning model of the referenced element when it differs from the containing model (cross-model reference, e.g. a lineage base element). Omitted for same-model references.
object
object
object
Owning model of the referenced element when it differs from the containing model (cross-model reference, e.g. a lineage base element). Omitted for same-model references.
object
object
object
object
object
object
object
object
Owning model of the referenced element when it differs from the containing model (cross-model reference, e.g. a lineage base element). Omitted for same-model references.
The values the element holds that its type declares no property for; absent when none.
A value an element holds under no binding its type declares, kept so a round trip loses nothing.
object
object
object
object
Owning model of the referenced element when it differs from the containing model (cross-model reference, e.g. a lineage base element). Omitted for same-model references.
A structure the import holds without an element, kept with its own properties inside the layer of the element that refers to it. A node is held once; any other place that refers to it holds a reference to it instead.
object
The property that links the holding element or the enclosing node to this node; absent on a node no property links to.
The node’s global identity in the format’s own terms; absent on an anonymous node.
A label unique within the model, set only on an anonymous node that is referred to more than once.
Whether this entry only points at the node another entry holds under the same localId.
Whether the node is an ordered list, whose entries are its members in order.
Where an element was derived from: the source and rules models, and per property the source values it read.
object
object
object
object
Owning model of the referenced element when it differs from the containing model (cross-model reference, e.g. a lineage base element). Omitted for same-model references.
object
object
object
Owning model of the referenced element when it differs from the containing model (cross-model reference, e.g. a lineage base element). Omitted for same-model references.
The base metamodel compiled at release time. Present only on a base-metamodel release.
object
The extension compiled at release time. Present only on an extension release.
object
Commit of the associated built-in element model at release time. Absent for extension releases, for base metamodels without a built-in element model and for every other model’s release.
When the frozen compilation was last built: the release time, changed afterwards only by the rebuild maintenance command. Absent outside metamodel-level releases.
The violations a version was released with, because the releasing user overrode them. Absent on a version released without violations.
object
The number of error findings the model had when it was released.
The distinct codes of those findings, sorted.
Who released it, as a commit names its author: a person (USER), whose name reads resolve, or a service account (MACHINE) with its name.
object
USER is a person, MACHINE a service account, and SYSTEM the platform itself, whose commits (metamodel seeding and re-pins) the commit log hides unless asked for them.
The display name, where one is known: a person’s from their account, a service account’s as stored with what it wrote. Left out for the platform and for a person whose account holds no name.
When it was released; the same instant as the version’s createdAt.
The findings dismissed when a version was cut: how many of the warnings and informational findings of its release validation a dismissal of the model matched at that commit, and under which codes. Absent on a version cut with none dismissed, and on every version cut before dismissals were recorded. It names no person.
object
How many findings were dismissed.
The distinct codes of those findings, sorted.
Example
{ "model": { "elements": { "additionalProperty": { "extensionLayer": [ { "kind": "attribute" } ], "lineage": { "properties": [ { "propertyType": "ATTRIBUTE", "sources": [ { "propertyType": "ATTRIBUTE", "role": "PRIMARY" } ] } ] } } } }, "validationOverride": { "by": { "type": "USER" } }}Bad request
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" } ]}Model write authorization required, answered with the plain problem. Or the caller is an agent acting for a person who did not grant it the permission to publish, answered as AgentPublishNotGrantedProblem before anything is read, whatever else the agent was granted: a release reaches people outside the organization and nobody takes it back. 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 lets agents reach less far than publishing, answered as AgentLevelNotAllowedProblem, with nothing written.
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 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"}The model has violations (error findings in its validation report) and the request does not override them. The problem has type https://modeldesk.io/problems/release-violations and carries the findings in findings, each in the shape the validation report gives it.
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
The error findings that refuse the release.
object
INFO entries are informational — something the reader should know that is not a defect, notably the “unverifiable” verdicts of profile resolution. An INFO entry never makes a model invalid.
The other element a finding is about, where it concerns two: the element whose key or value this one repeats, or the dependency element publishing the same IRI.
A hash of the value the finding was about. Sent with modelElementId (as elementId, left out for a model-level finding), code and property to POST /models/{modelId}/dismissals to dismiss the finding; the dismissal holds while the value hashes the same.
Who dismissed this warning or informational finding and when, where a dismissal of the model names it by element, code, property and fingerprint, so while the value it was about is unchanged. Never on an error, nor on a finding on an element another model answers for.
object
Who dismissed it: a person (USER) with their current name. name is absent where nothing answers to the id any more, such as an erased user.
object
USER is a person, MACHINE a service account, and SYSTEM the platform itself, whose commits (metamodel seeding and re-pins) the commit log hides unless asked for them.
The display name, where one is known: a person’s from their account, a service account’s as stored with what it wrote. Left out for the platform and for a person whose account holds no name.
What exactly a finding is about, when its check can report more than one finding at the same code, element and property: a relation target, an offending value (with its language tag for a language string) or an identifier the check is about. Exactly one of target, value and name is present, language only beside value.
object
The finding’s identity across validation runs: the lowercase hex SHA-256 of the canonical JSON of code, modelElementId (as elementId), property and subject, each left out when absent, keys sorted and no whitespace. Neither valueIndex nor the message is part of it. Present on every entry of a validation result.
Example
{ "findings": [ { "logLevel": "WARN", "dismissed": { "by": { "type": "USER" } } } ]}A check could not run just now (its runner was at capacity or the run ran out of time), or the model’s dismissals could not be read, so the model could not be validated. Nothing was released. The problem has type https://modeldesk.io/problems/validation-unavailable; retry after the Retry-After seconds.
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" } ]}Headers
Section titled “Headers”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" } ]}