Stage a change
const url = 'https://api.modeldesk.io/models/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/draft/changes';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"actions":[{"type":"ELEMENT_CREATE","creation":{"id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","elementId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","owner":{"id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","relation":"example"},"type":"example","attributes":{"additionalProperty":["example"]},"relations":{"additionalProperty":{"additionalProperty":[{"id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","owned":true,"modelId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}]}},"ownedElements":{"additionalProperty":[]}}}],"draftHeadId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","changeRequestId":"example","message":"example","dryRun":false,"branchId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}'};
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/draft/changes \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "actions": [ { "type": "ELEMENT_CREATE", "creation": { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "elementId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "owner": { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "relation": "example" }, "type": "example", "attributes": { "additionalProperty": [ "example" ] }, "relations": { "additionalProperty": { "additionalProperty": [ { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "owned": true, "modelId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" } ] } }, "ownedElements": { "additionalProperty": [] } } } ], "draftHeadId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "changeRequestId": "example", "message": "example", "dryRun": false, "branchId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'Stage one change into the caller’s own draft. The actions are applied in order on one working state and land as a single micro-commit or not at all, so an action may name what an earlier action of the same change created.
The draft is opened on first use, on the branch branchId names or the model’s main branch when it is omitted, and only by a change that has something to commit: a change every action of which was a no-op leaves a caller who held no draft still holding none. draftHeadId is required on every call, the first included, and is the target branch’s head while there is no draft yet. A caller holds one draft per model: once they hold one, a change that names a branch must name the one that draft targets, and a change that names none goes into it.
The response is the same delta envelope GET /models/{modelId}/delta?ref={draftId}&baseline={draftHeadId} answers for the pair, so a client applies it through the machinery it already has. A change that changed nothing answers an empty delta whose commitId and baselineCommitId are both the head that was sent.
A draft holds only as many staged changes as a delta may walk. A change that would take it past that is refused with the ChangeValidationProblem, carrying one error with the code chain-too-long and no actionIndex, because the refusal is about the draft rather than about one action. The remedy is to commit the draft, not to split the change.
With dryRun: true the change is tried and not kept. It runs the path a change runs, from the write check and the write scope through validation and application to the commit the change would record, and stops short of writing it: draftHeadId is compared by reading the head, and the draft and the commit are described rather than written. It answers what the change would have answered, or the same 400 and 409 a change would have met, writes nothing and takes no write lock: no staged change, no element revision, no moved head, and no draft for a caller who holds none, so a change sent beside it is never held up by it. Because the head is read rather than gated, a change that lands between that read and the answer is not seen; the answer was true of the head that was sent, and the change sent after it meets the compare-and-set as any change does. The envelope carries dryRun: true, every id the write would have minted reads as the max UUID (see DeltaEnvelope.dryRun), and Draft-Ref names a draft only when the caller already held one. A dry run is not counted as a staged change. Sending the same change again without dryRun stages it, and it lands as the dry run said unless the draft moved in between, which the compare-and-set refuses; only the ids of elements the caller left to the server to mint differ.
A dry run is bounded in time: one that has not finished within its timeout (30 seconds unless configured otherwise) is given up and answered 503 with the dry-run-timeout problem. Nothing was written and nothing was judged, so it can be sent again.
A dry run of a DEPENDENCY_CREATE or DEPENDENCY_UPDATE still resolves the target it names and warms the dependency cache with that target’s closure, as the change itself would before staging. Those rows derive from released content; the model, its refs and its drafts are left as they were.
A DEPENDENCY_CREATE, DEPENDENCY_UPDATE or DEPENDENCY_DELETE stands alone in its change. Each changes the dependencies the rest of a change would be checked against, so a change holding one beside any other action is refused with the ChangeValidationProblem, carrying one error with the code closure-action-must-stand-alone and no actionIndex. The remedy is to send the dependency action as a change of its own and the actions that rely on it in the next one, which starts from the dependencies it left.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”One change to stage: the edits, the draft head they were written against, the caller’s own name for the request, optionally what the change is in the caller’s words, and whether to keep it at all. The actions are applied in order on one working state, so an action may name what an earlier action of the same change created, and they land together or not at all.
object
The edits to stage, in the order they are to be applied.
Four bounds hold a change, and none implies another. At most 1000 actions; within that, at most 100 namespace, dependency, alignment, layout-rule or hierarchy-group actions, each of which is validated against the whole model rather than against the elements it names; ELEMENT_PASTE actions from at most 10 models other than this one, counted by distinct sourceModelId, since each is read whole before the change is applied; and at most 8 MiB once the change’s actions are serialized for storage, which is what bounds a single action of unbounded size, such as one deep nested creation, one bulk update or one paste, whose stored form is the whole subtree it copied. A change over any of the four is refused with the ChangeValidationProblem, carrying one error with the code change-too-large, no actionIndex, and a message naming which bound it is over; the first three are refused before any model is read, the size as soon as a paste takes the change past it. The remedy for all four is to split it into several changes.
One staged edit, discriminated by its own type. Each variant wraps the payload its per-action endpoint already accepts, so an edit has one request shape however it is made: the ids the edit is addressed by, and then at most one payload property. A layout rule and a hierarchy group are owned by a diagram and addressable only through it, so those variants name the diagram beside the child; a template instance is addressed by its template and its root element, so materializing one names both beside the diagram it becomes.
The listed types are the whole of what this route stages. A type outside them is not a malformed body and is not ignored: it is read, and the change is refused with the ChangeValidationProblem, carrying one error with the code not-stageable, the action’s actionIndex and the actionType that was sent, so the caller learns which of its actions to drop. Every other write path keeps its own endpoint and commits directly: an external dependency, the metamodel pin, a base model and a release among them. Diagrams, namespaces, attribute templates and internal dependencies keep theirs as well, for a caller that does not stage.
A paste is staged as its request, ELEMENT_PASTE, and stored as the subtree it resolved to, which a draft’s micro-commit keeps under the type ELEMENT_PASTE_RESOLVED. A dependency’s creation and repin are staged as DEPENDENCY_CREATE and DEPENDENCY_UPDATE and stored as what they resolved to against the model they pin, under DEPENDENCY_CREATE_RESOLVED and DEPENDENCY_UPDATE_RESOLVED, a repin keeping members of connected elements as copies under DEPENDENCY_UPDATE_KEEPING_COPIES_RESOLVED. The disconnection of an element from its dependency is staged as DEPENDENCY_DISCONNECT and stored, with the id of every copy it writes, under DEPENDENCY_DISCONNECT_RESOLVED. Those stored forms are not among the listed types: posted to this route they are refused with not-stageable like any other type outside them, because accepting one would skip the read that produced it, the paste’s source read and metamodel check, or the authorized read of the model a dependency pins.
- ELEMENT_CREATE
- ELEMENT_UPDATE
- ELEMENT_DELETE
- ELEMENT_BULK_UPDATE
- ELEMENT_MOVE
- RELATION_MEMBERSHIP_UPDATE
- NAMESPACE_CREATE
- NAMESPACE_UPDATE
- NAMESPACE_DELETE
- ALIGNMENT_CREATE
- LAYOUT_RULE_CREATE
- LAYOUT_RULE_DELETE
- LAYOUT_RULE_MOVE
- HIERARCHY_GROUP_CREATE
- HIERARCHY_GROUP_UPDATE
- HIERARCHY_GROUP_DELETE
- HIERARCHY_GROUP_MOVE
- DIAGRAM_CREATE
- DIAGRAM_UPDATE
- DIAGRAM_DELETE
- DIAGRAM_MATERIALIZE
- ELEMENT_PASTE
- DEPENDENCY_CREATE
- DEPENDENCY_UPDATE
- DEPENDENCY_DELETE
- DEPENDENCY_CONNECT
- DEPENDENCY_DISCONNECT
- TEMPLATE_CONFIG_UPDATE
- TEMPLATE_ENTRY_CREATE
- TEMPLATE_ENTRY_UPDATE
- TEMPLATE_ENTRY_DELETE
Creates an element, with the elements nested under it, or adopts an existing one under a new owner when creation.elementId names it.
object
An element to create, or an existing one to adopt under a new owner.
elementId decides which. Set, the payload adopts the element it names and creates nothing, so type and ownedElements are ignored, at every depth. Absent, an element is created and type is required. A payload that adopts has to name its owner at the top level; nested under ownedElements the owner is the parent and the relation it sits under, unless it names another. A creation that names no owner is placed on the model’s root element under its @element relation.
object
The id the new element is to receive. Omitted, the server mints one. Supplying it is what lets a later action of the same staged change name this element; an id that already exists is refused. Only a staged change honours it: the direct element-create route drops it, and every nested one, and mints its own. Distinct from elementId, which names an element that is already there and asks for it to be adopted.
An element of this model to adopt under owner instead of creating one. It has to exist in the state the change is applied to and be this model’s own: one held by a dependency or by the metamodel is answered element-not-found, because it is not this model’s to place. A nested entry whose owner already holds the element through that relation is not adopted again, only listed in the relation it sits under, at its position.
object
The type of the element to create. Required unless elementId adopts one instead.
object
The element’s outgoing relations, keyed by relation name. Each value is the relation’s target refs keyed by group, with @@ naming the group of an ungrouped relation.
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.
Elements to create under this one, keyed by the relation that owns them. Each is a creation in its own right, so id, elementId and further nesting reach every node of the tree. Ignored on a payload that adopts.
object
Applies an update to one element.
object
The attributes and relations to write on one element. An absent key is left as it stands and an empty value drops the key, so a relation is cleared by sending it empty. An update that changes nothing and brings no external element is a no-op rather than an error.
object
object
The relations to write, keyed by relation name. Each value is the relation’s target refs keyed by group, with @@ naming the group of an ungrouped relation.
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.
Whole elements the written relations point at that live outside this model, carried along so the reference resolves to something. Each must have external set to true, or the action is refused with the code invalid-value; one the model already holds is left alone rather than replaced.
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 element’s whole extension layer after the update: the values it holds that its type declares no property for. Absent leaves the layer as it stands, an empty array clears it, and an array replaces it entry for entry, in its order. A metamodel may refuse an entry it cannot write back, with a code of its own naming the entry’s key as the property.
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.
Removes one element and everything it owns.
object
Applies one write across several elements.
object
One write covering several elements, in two forms that may be combined in one request. elementIds with attributes applies identical values to every element named; updates carries its own values per element. Where an element appears in both, its per-element values are merged over the uniform ones, so the specific value wins for the attributes it names.
At least one of elementIds and updates has to name an element, or the action is refused with the code invalid-value. Neither is required on its own, which is why neither is listed as required here. An element whose attributes already hold the given values is left out, and a bulk update that changes no element at all commits nothing.
object
The elements that all receive attributes.
The values every element in elementIds receives. Ignored when elementIds is empty.
object
Values for one named element each, for a write where every element receives its own.
Attribute values destined for one named element, as carried by ModelElementBulkUpdate.updates.
object
object
Moves elements to another owner.
object
Moves elements out of the owners they sit in and into one new owner.
object
The elements to move, each named with the owner it is being taken out of.
One element of a move, with the owner it is being taken out of.
object
object
object
Where the moved elements land among the target’s existing children, counted from zero. Omitted, they are appended. Refused with the code invalid-position where a position cannot apply: on a relation the metamodel orders alphabetically, and on a move whose elements do not all land in one group.
Changes which elements point at one target through one forward relation.
object
A membership change on one forward relation, expressed from the target side. At least one of addSourceElementIds and removeSourceElementIds has to name a source, or the update is refused with the code invalid-value. A source already in the requested state is left alone, and an update that changes no source at all commits nothing.
object
The forward relation to write, named in its forward direction, the one the source elements hold, not the derived field the change was made from.
The element gaining or losing membership. May live in a dependency, subject to the relation’s own origin constraint.
Source elements that gain the target. Each must belong to this model.
Source elements that lose the target. Each must belong to this model.
Creates a namespace under the model’s root.
object
object
The id the new namespace is to receive. Omitted, the server mints one. An id that already exists is refused.
Whether the new namespace is the model’s default. Omitted or false, it is created carrying no default marker at all rather than an explicit false.
Applies an update to one namespace.
object
object
Whether the namespace is the model’s default. Omitted, it keeps the default it has; false clears it.
Removes one namespace.
object
Gives the model its alignment: the pair of internal dependencies whose elements are linked against each other. A model has at most one, so a second creation is refused, including a second one in the same change. Refused with 403 unless the model’s owning organization has the alignment feature.
object
object
The id the new alignment is to receive. Absent, the server mints one; an id that already exists is refused. The direct endpoint honours it as well.
Appends a layout rule to the end of a diagram’s layout-rule relation. The payload is the rule itself, discriminated by its own @type; its id is optional, and absent the server mints one. The diagram must exist in the state the change is applied to: one staged earlier in the draft or in the same change counts, while one created on the branch after the draft’s baseline is an ordinary element-not-found until the draft is rebased.
object
object
object
Removes one layout rule from the diagram that holds it. A rule some other diagram holds is not found rather than silently removed.
object
Moves one layout rule to another position within its diagram’s layout-rule relation. It records the LAYOUT_RULE_UPDATE action, which is why the staged type is its own name: a rule has no update operation, and LAYOUT_RULE_UPDATE is what a move records.
object
object
Appends a hierarchy group to the end of a diagram’s hierarchy-group relation. The payload’s id is optional, and absent the server mints one. Each root element carries at most one group, so a second group on one root is refused, including a second one in the same change.
object
object
Absent on a creation whose id the server is to mint, and on an update, whose target is named beside it. Always present on a group that exists.
How many siblings spread to the left of the root. Omitted, none.
How many siblings spread to the right of the root. Omitted, none.
Replaces one hierarchy group’s properties in place, keeping its position on the diagram. The payload replaces them wholesale, so an id inside it is ignored: hierarchyGroupId names the group that is written.
object
object
Absent on a creation whose id the server is to mint, and on an update, whose target is named beside it. Always present on a group that exists.
How many siblings spread to the left of the root. Omitted, none.
How many siblings spread to the right of the root. Omitted, none.
Removes one hierarchy group from the diagram that holds it. A group some other diagram holds is not found rather than silently removed.
object
Moves one hierarchy group to another position within its diagram’s hierarchy-group relation. It records the HIERARCHY_GROUP_UPDATE action, the same one an update records from a different payload, which is why the staged type is its own name.
object
object
Creates a custom diagram under the model root, with the empty element set it starts out with. The payload’s id and elementSetId are optional, and absent the server mints them; sent, they let a later action of the same change address the diagram. A diagram with a blank name is refused with the code diagram-name-required; one with no name at all is refused as a malformed request.
object
object
The new diagram’s id. Honored by a staged change, which mints one when it is absent; the diagram route mints its own and ignores this.
The id of the element set the new diagram starts out with. Honored by a staged change, which mints one when it is absent; the diagram route mints its own and ignores this.
What the diagram shows, one text per language and at most one without; absent or empty for none. Each text is stored stripped and one that is then empty is dropped. A second value in one language (or a second without one), a language that is not a language tag, a text over 4000 characters, or more than 8 values is refused.
One language-tagged text; lang is null for a text without a language.
object
A language tag such as nl or en.
Applies a partial update to one diagram, with the same PATCH semantics as the diagram’s own update route: an absent field is left as it is and a null one is cleared. A field a template-backed diagram takes from its template, or a filter too large to store, is refused with the code invalid-diagram-update. An update that changes nothing records nothing.
object
object
Replaces the description whole (PATCH semantics: absent leaves it unchanged, an empty list or null clears it). Each text is stored stripped and one that is then empty is dropped. A second value in one language (or a second without one), a language that is not a language tag, a text over 4000 characters, or more than 8 values is refused. Not supported on a template-backed diagram.
One language-tagged text; lang is null for a text without a language.
object
A language tag such as nl or en.
Moves one element of a custom diagram’s primary element set to another place in its order, the order its element list shows and its layout follows. Applied after the update’s additions and removals. An element the set does not hold, or one placed before itself, is not moved; an anchor the set does not hold, or none, puts the element last. Not supported on a template-backed diagram.
object
The element it goes before; absent puts it last.
Optional per-diagram edge suppression: a reference whose target matches is not drawn as an edge, while both terms stay nodes and the reference reappears as a row naming its target. Distinct from the metamodel-declared collapse on a connection, which is fixed per diagram type and tests the edge element.
object
Condition under which the entry is offered, as a path expression evaluated against the element whose menu is opening. The frontend is the only evaluator; nothing on the backend reads the path beyond carrying it through compilation and conversion. null for an entry that states no condition, which is offered on every element of its type.
object
object
object
object
object
object
object
object
object
object
Condition under which the entry is offered, as a path expression evaluated against the element whose menu is opening. The frontend is the only evaluator; nothing on the backend reads the path beyond carrying it through compilation and conversion. null for an entry that states no condition, which is offered on every element of its type.
object
object
object
object
object
object
object
object
object
object
Condition under which the entry is offered, as a path expression evaluated against the element whose menu is opening. The frontend is the only evaluator; nothing on the backend reads the path beyond carrying it through compilation and conversion. null for an entry that states no condition, which is offered on every element of its type.
object
object
object
object
Condition under which the entry is offered, as a path expression evaluated against the element whose menu is opening. The frontend is the only evaluator; nothing on the backend reads the path beyond carrying it through compilation and conversion. null for an entry that states no condition, which is offered on every element of its type.
object
object
object
object
Optional per-diagram edge suppression: a reference whose target matches is not drawn as an edge, while both terms stay nodes and the reference reappears as a row naming its target. Distinct from the metamodel-declared collapse on a connection, which is fixed per diagram type and tests the edge element.
object
Condition under which the entry is offered, as a path expression evaluated against the element whose menu is opening. The frontend is the only evaluator; nothing on the backend reads the path beyond carrying it through compilation and conversion. null for an entry that states no condition, which is offered on every element of its type.
object
object
object
object
object
object
object
object
object
object
Condition under which the entry is offered, as a path expression evaluated against the element whose menu is opening. The frontend is the only evaluator; nothing on the backend reads the path beyond carrying it through compilation and conversion. null for an entry that states no condition, which is offered on every element of its type.
object
object
object
object
object
object
object
object
object
object
Condition under which the entry is offered, as a path expression evaluated against the element whose menu is opening. The frontend is the only evaluator; nothing on the backend reads the path beyond carrying it through compilation and conversion. null for an entry that states no condition, which is offered on every element of its type.
object
object
object
object
Condition under which the entry is offered, as a path expression evaluated against the element whose menu is opening. The frontend is the only evaluator; nothing on the backend reads the path beyond carrying it through compilation and conversion. null for an entry that states no condition, which is offered on every element of its type.
object
object
object
object
Whether the diagram leaves the model (PATCH semantics: absent leaves it unchanged, null returns it to the default, which is published). Allowed on a template-backed diagram as well as on a custom one.
Removes one diagram, with its element set, layout rules and hierarchy groups.
object
Materializes a template instance into a stored diagram, with the layout rules and hierarchy groups it starts out with. It records the DIAGRAM_CREATE action, which is why the staged type is its own name. diagramId, and each rule’s and group’s id, are optional, and absent the server mints them; sent, they let a later action of the same change address what this one creates. elementSetId is accepted and unused, since a template-backed diagram takes its elements from its template and holds no element set. An instance is materialized once: a second materialization is refused with the code already-materialized, its elementId naming the diagram that already backs the instance.
object
object
object
object
object
Absent on a creation whose id the server is to mint, and on an update, whose target is named beside it. Always present on a group that exists.
How many siblings spread to the left of the root. Omitted, none.
How many siblings spread to the right of the root. Omitted, none.
Whether the stored view leaves the model. Omitted means published. Supplying false with no layout stores the view for the sole purpose of holding it back.
Copies a selection of elements, each with the subtree it owns, out of a model into this one, as POST /models/{modelId}/element-paste does, and records the ELEMENT_CREATE of the first copy. paste.rootIds names the copies of the selected elements, one per entry of paste.elementIds and in the same order, so a later action of the same change can address them; absent, the server mints them. The copy is worked out when the change reaches this action: a paste within the model being changed reads its working state, so it can copy what an earlier action of the change created, and a paste from another model reads that model as the caller sees it, at their own draft of it when they hold one and at its main branch otherwise, never at another user’s draft. A source the caller may not read is refused as element-not-found, with the same message as a model id that does not exist. What is stored is the resolved subtree, every id, regenerated identity value and suffixed name fixed, so a rebase replays the same copy without reading the source again. A paste across metamodels is refused with the code incompatible-metamodel; a root id that does not pair with the selection, or is named twice, with invalid-value; one the target already holds, with already-exists. How many references each paste could not carry over is answered in the Paste-Dropped-References header.
object
object
The selected root elements; their owned subtrees are resolved server-side.
Read only when the paste is staged, as ELEMENT_PASTE on POST /models/{modelId}/draft/changes: the ids the copies of the selected elements are created under, one per entry of elementIds and in the same order, so a later action of the same change can address a copy. Omitted, the server mints them. An element selected twice is copied once, under the id at the position it was first selected at. A list that does not pair one to one with elementIds, or that names an id twice, is refused; so is an id the target already holds. POST /models/{modelId}/element-paste ignores the field and mints every id itself, as its other creations do.
Where the copies land. Omitted pastes them at the model root.
object
CUT records that the caller intends to remove the originals afterwards, which is a separate delete on the source model; the paste itself never removes anything.
Adds a dependency on another model of the organization, as POST /models/{modelId}/dependencies with type: INTERNAL does, and records the DEPENDENCY_CREATE of it. The target is read when the change is staged, through the same authorized read the route makes, and what the dependency needs is fixed then: the commit the pin stands for, the target’s name and metamodel, and an id for every dependency the pinned commit brings along. That is what the draft stores, so a rebase lands the same dependency whatever has since become of the target. A target that does not exist and one the caller may not read are both refused as dependency-target-not-found, with one message; one written in a metamodel this model may not depend on as dependency-metamodel-not-allowed; one the model already depends on directly, at any pin, as dependency-exists; one owned by another organization as operation-not-allowed; and the model itself, or a version name the target has no version under, as invalid-value. A target the model reaches only through another dependency is promoted to a direct one in place: it keeps its own id, id is not used, and the change records a DEPENDENCY_UPDATE of it. A caller therefore finds the outcome by the target’s model id among the root’s dependencies, never by id. Only an internal dependency is staged; an external one is acquired from a location or a document and committed directly. Stands alone in its change.
object
The element id the caller minted for the new dependency, used when the model holds no edge to the target yet.
The model to depend on.
The pin: omitted or @HEAD for the head of the target’s main branch when the change is staged, or the name of one of its versions.
Repins one of the model’s direct internal dependencies, as POST /models/{modelId}/dependencies/{dependencyId} does, and records the DEPENDENCY_UPDATE of it. The new pin is resolved when the change is staged, together with the dependencies the commit it stands for brings along, and that is what the draft stores. A dependency the model does not hold is refused as dependency-not-found, one it holds only as a transitive, an external or a managed dependency as operation-not-allowed, a version name the target has no version under as invalid-value, and a target that can no longer be read as dependency-target-not-found. Stands alone in its change.
When elements connected to the dependency hold members by reference that the new version lacks, or whose owned child the model uses and the new version lacks (named in missingMember.missingChild), the repin is refused as members-missing-in-version, one error per member and holding element, each carrying missingMember (the member, the element that holds it and what uses it), unless keepMissingMembersAsCopies is set. The errors are bounded; past the bound errorCounts gives the total, and POST /models/{modelId}/dependencies/{dependencyId}/version-change-preview lists every one. A version the model holds no readable snapshot of while elements are connected refuses the repin as dependency-snapshot-missing. With it, each such member is kept as an owned copy of the version left, in the element that held it, and the model’s references to it point at the copy; references the copies leave out are counted in the Disconnect-Dropped-References header. Members the new version still holds stay references. A rebase that meets connected elements lacking other members than the change kept copies of refuses it as connection-changed; staging the repin again resolves it afresh.
object
The dependency element to repin.
The new pin: omitted or @HEAD for the head of the target’s main branch when the change is staged, which also refreshes a dependency already at @HEAD, or the name of one of its versions.
Keep the members connected elements hold that the new version lacks as owned copies of the version left, rather than refusing the repin.
Removes one of the model’s direct internal dependencies, as DELETE /models/{modelId}/dependencies/{dependencyId} does, and records the DEPENDENCY_DELETE of it, together with the dependencies it brought along that nothing else needs. A dependency other dependencies still bring along stays as one of theirs. A dependency the model does not hold is refused as dependency-not-found, one it holds only as a transitive, an external or a managed dependency as operation-not-allowed, and one whose content elements of the model still refer to as dependency-in-use, with one error per referring element naming it. Stands alone in its change.
object
The dependency element to remove.
Connects an element whose type represents another model to one of the model’s internal dependencies on that model, and records an ELEMENT_UPDATE naming the element and every element the connection rewrote or removed. Each owned copy choices sets to USE_THEIRS gives way to the named counterpart, which the element then holds by reference; every relation in the model that targeted the copy or one of its owned children targets the counterpart or that child’s counterpart, and the copy is removed with what it owns. A copy no choice names, and one set to KEEP_MINE, stays owned: to replace every copy the preview settles, name each. Never adds a dependency: stage DEPENDENCY_CREATE in a change of its own first. Read POST /models/{modelId}/elements/{elementId}/connection-preview with the same choices to see what it does. Refused with element-connected when the element is connected already; dependency-not-direct when the model only brings the dependency along through another one, so an element connects only to a model the model declares itself (a connection made before this rule still reads as connected); invalid-value when two choices name one counterpart, a choice is for no copy the element owns, or names a counterpart that is none of its copy’s candidates; invalid-value or element-not-found when the dependency is no internal one the root declares with its snapshot held or the element’s type represents no model; and with one copy-not-replaceable error per copy that cannot give way, naming it, when any cannot, with nothing written. Stored as it was sent: the counterparts of a replaced copy’s owned children are matched again whenever the change is applied.
object
The element to connect, one of a type whose metamodel declares representsModel.
The internal dependency element of the model the element represents.
What becomes of each owned copy, keyed by the copy’s id. Omitted reads as none.
object
What connecting an element to a dependency does with one copy the element owns: put the named counterpart in its place (USE_THEIRS, with counterpartId), or keep the copy (KEEP_MINE, without one).
object
The element of the connected model that takes the copy’s place: one of the copy’s candidateIds in the preview. Required with USE_THEIRS, refused with KEEP_MINE.
Disconnects a connected element from its dependency, and records an ELEMENT_UPDATE naming the element, every copy it writes and every element a reference was moved on. Each member the element holds by reference becomes an owned copy of the version depended on, with everything it owns; every relation in the model that targeted a member or one of its owned children targets the copy; the connection is cleared; the dependency stays. A member’s own reference to an element of a model this one does not depend on is left out: how many, per action, in the Disconnect-Dropped-References header, and each named on the stored input. Refused with element-not-connected when the element is not connected. The copies’ ids are fixed when the change is staged and stored under DEPENDENCY_DISCONNECT_RESOLVED; a rebase onto an element connected to another dependency is refused with element-not-connected, and onto one that holds other members by reference, or whose version holds an element no copy id was fixed for, with connection-changed.
object
The connected element to disconnect.
Sets the base IRI the model’s attribute templates share. The container that holds it is created with the first template write, under an id derived from the model’s, so no action names it. The entries the container holds are kept.
object
object
Creates an attribute template entry.
object
object
The id the new entry is to receive. Omitted, the server mints one. An id that already exists is refused.
Replaces one attribute template entry as a whole.
object
Whole-entry replace; all authoring fields are re-sent.
object
Removes one attribute template entry.
object
The draft head the caller believes it is editing, compared before anything is applied. Required on every call, the first included: before a draft exists it is the target branch’s head, so one rule covers both a draft that moved and a branch that moved before there was a draft.
The caller’s own key for this request, stored on the micro-commit it mints and opaque to the server. Never parsed, only compared, which is what lets a caller recognise its own change in the gap a lost compare-and-set hands back.
What the change is, in the caller’s words. Optional, and capped as a landing’s message is. Stored as the micro-commit’s message and served wherever the draft’s chain is listed: the commits of this route’s envelope, GET /models/{modelId}/commits?ref={draftId}, the gap a 409 carries, and a rebase’s dropped and delta, since a rebase carries it over to the commit that re-records the change. A blank message is stored as none. It never reaches the branch: the landing commit carries the message its own request sends.
Try the change without keeping it. Validated and applied exactly as a staged change is, and checked against draftHeadId by reading the head, with the commit it would record built and never written: the answer is the envelope the change would have produced, marked dryRun: true, or the refusal it would have met. Nothing is written and no write lock is taken. The scope and the write check are a staged change’s, because a dry run reaches everything a change does short of keeping it.
The branch the change is meant for. While the caller holds no draft, the change opens one on this branch, or on the model’s main branch when it is omitted, and draftHeadId is compared with that branch’s head; an id that is not a branch of the model is answered as RefNotFoundProblem. A caller holds one draft per model, so while they hold one, a named branch must be the one it targets: any other is refused as opening a draft on a second branch is, with DraftTargetTakenProblem naming the branch the open draft targets. Omitted while they hold one, the change goes into that draft.
Responses
Section titled “Responses”The change was staged, or was a no-op, or, under dryRun, would have been staged and was not
A model’s state at a head relative to a baseline the caller holds: either an incremental delta (the touched and added element revisions, the ids of removed elements and the walked commits) or a full-state reseed (every revision at the head, with removedElementIds and commits left out). A client that meets a kind it does not know reseeds.
object
Present, and true, only on the answer to a staged change sent with dryRun: true: the change was validated and applied and nothing it would have written was kept. Every id that write would have minted reads as the max UUID ffffffff-ffff-ffff-ffff-ffffffffffff: commitId, each commit’s id, the root’s revisionId and each revision’s id, and in elementRevisionRefs every child revision the change would have renewed. So the envelope names no commit and no revision that exists, and a client that kept one would find it names nothing. Element ids, the commit’s parentId, authorId, message, requestId and actionTypes, and the revisions’ content are what the change would have produced; an element id the caller left to the server is minted again, differently, when the change is staged for real. A dry run of a change that changed nothing minted nothing, and answers the empty delta of the head that was sent. Absent on every envelope describing a move that happened.
The head the envelope brings the caller to.
The baseline, echoed on a delta. Absent on a full-state reseed.
The model’s root element and its revision at the head, so a client sees a root change without scanning revisions.
object
The touched and added element revisions, keyed by element id. Present, and {} when nothing changed.
object
One stored revision of an element, with the revisions of the elements it owns.
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 revision of each owned element, keyed by element id.
object
Elements the baseline has and the head does not. Only on a delta.
The commits walked from the baseline (exclusive) to the head (inclusive). Only on a delta.
A commit as a walk over history lists it: its identity, its provenance and the kinds of action it holds, without the actions themselves.
object
Absent on the initial commit.
The author’s description of the change. Absent on a commit made without one. For a staged change it is the message that was sent, absent when it was blank or left out.
The key of the request that produced the commit, absent on a commit made without one. For a staged change it is the changeRequestId that was sent.
The deduped, sorted type values of the commit’s actions. Empty rather than absent on a commit that records none.
Present, and true, on a merge commit whose actionTypes include a dependency or metamodel-pin type for every change it made to the model’s dependencies and metamodel pin. A merge commit names the elements it changed as element actions whatever they are, so one without it says nothing about those: a client has to assume they may have moved. Absent on every other commit, whose actionTypes always tell.
Example
{ "kind": "delta", "revisions": { "additionalProperty": { "element": { "extensionLayer": [ { "kind": "attribute" } ], "lineage": { "properties": [ { "propertyType": "ATTRIBUTE", "sources": [ { "propertyType": "ATTRIBUTE", "role": "PRIMARY" } ] } ] } } } }}Headers
Section titled “Headers”The draft the change is staged in, so a caller whose change opened it learns its id without a second call. Absent when the call left no draft behind: a no-op change, or a dry run, sent by a caller who had none.
Example
0=2,3=1How many references each ELEMENT_PASTE of the change could not carry over, as actionIndex=count pairs joined by commas, in action order, for the pastes that dropped any: 0=2,3=1. A reference is dropped when it points at an element that was neither copied along nor visible from the target, and each count is the droppedReferenceCount the per-action paste answers with. Absent when no paste of the change dropped one, which includes every change that holds no paste. A header rather than part of the body, because the body is a delta envelope, which carries revisions, and a dropped reference is one no revision shows.
Example
0=2,3=1How many references each DEPENDENCY_DISCONNECT of the change, and each DEPENDENCY_UPDATE keeping missing members as copies, left out, as actionIndex=count pairs joined by commas, in action order, for the actions that left any out: 0=2,3=1, the grammar of Paste-Dropped-References. A reference is left out when a member’s copy would point at an element of a model this one does not depend on, an owned child the version lacks, or a term that is no candidate where it lands. Absent when no action left one out. Each reference is named on the stored input, under droppedReferences, and before a disconnection by POST /models/{modelId}/elements/{elementId}/disconnect-preview.
The change was refused and nothing was written. The problem carries one errors entry per reason, each naming the action it belongs to and, where the refusal knew them, the element and the property. Or the caller holds a draft on another branch than the one branchId names, answered as DraftTargetTakenProblem with the targetRefId of the draft they hold. Or the caller is an agent acting for a person, and changeRequestId is not mcp-<session>-<uuid> with the agent’s own session, answered with the plain problem before anything is read: an agent stages under no other origin’s name.
A Problem that additionally carries errors when a staged change was refused, with nothing written. Its own type is what tells it from the plain 400 of a malformed body. Separate from Problem.violations, which stays what it is: request-body validation, one entry per rejected field of the request itself.
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 a refused change from the plain 400 of a malformed body.
Every reason the change was refused, not only the first, so a whole change can be corrected in one round trip. Never empty: a refusal carries at least one reason. A later entry may still be a consequence of an earlier failing action, which the messages say rather than hide. An entry’s actionIndex counts into the change’s own actions.
One reason a change was not applied, in the form an agent can correct itself from: which action was at fault, what kind of fault it was, and which element and property it was about. The same shape wherever a refusal is reported, so one piece of client code renders all of them.
code and message answer different readers. The code is a stable constant a client branches on without parsing prose; the message is the human sentence and may be reworded at any time. Every member a throw site did not know is left off the wire rather than sent as null, so a reader never has to tell “not applicable” from “unknown”.
object
Where the failing action sits in the change’s own action list, counted from zero. Absent, together with actionType, when the fault belongs to the change as a whole rather than to one of its actions.
The type of the failing action, exactly as the caller sent it, which for a not-stageable refusal is a type no variant answers to. Absent together with actionIndex.
A stable kebab-case constant a client branches on rather than parsing the message.
A refusal of the change as a whole carries one of not-stageable, updater-rejected, write-rejected, chain-too-long, change-too-large or closure-action-must-stand-alone. That list is closed, except where the errors member carrying this error names one more of its own. A refusal about one element or one of its properties carries an element-level code from the same namespace instead, such as element-not-found, owner-not-found, already-exists, unknown-property, invalid-target, multiplicity-violated or invalid-value, and a refused dependency action one of dependency-target-not-found, dependency-exists, dependency-in-use, dependency-connected, members-missing-in-version, dependency-not-direct, dependency-version-differs, dependency-snapshot-missing, dependency-metamodel-not-allowed or dependency-not-found, and a relation a change writes into content of a dependency the model no longer holds, which a rebase meets after the branch removed that dependency, dependency-removed, naming the referring element and the relation. A DEPENDENCY_CONNECT or DEPENDENCY_DISCONNECT may carry copy-not-replaceable, element-connected, element-not-connected or connection-changed, and a write that would set, change or clear an element’s connection other than through those two connection-not-writable. That second set is stable in the sense that a code is never reused for something else, but it is open: new ones are added as refusals learn to name themselves, so a client treats one it does not recognise as a refusal it cannot special-case rather than as a malformed response.
The sentence a human reads. Reworded freely, never parsed.
The element the failure is about, where the refusal named one.
The name elementId is listed under, where the refusal read it: the connected element a dependency-connected error names, the member a members-missing-in-version error names.
The attribute or relation the failure is about, where the refusal named one.
On a members-missing-in-version error: a member a connected element holds by reference that the version its dependency moves to lacks, the element that holds it, and what uses it.
object
The member, an element of the version the dependency leaves.
The name it is listed under, its type when nothing names it.
Its type, as stored.
The element that holds the member, one whose type represents a model and that is connected to the dependency.
The name the element that holds the member is listed under, its type when nothing names it.
For a member the new version still holds: the owned child of it that the version lacks and the model uses, which makes the member count as missing. Absent for a member the version lacks itself.
object
The name it is listed under, its type when nothing names it.
The model’s elements referring to the member or one of its owned children, through an authored relation or a term reference, each once per relation, in element id order. The member relation of the element that holds it holds the member rather than using it and is not listed.
object
The key the reference is stored under.
The name the metamodel shows for the relation; absent when it declares none.
Present only when errors was cut short at its bound: every reason found, counted by code, so a client can say how many there are without parsing detail. A refused DEPENDENCY_UPDATE with many missing members answers its first ones in errors and their total under members-missing-in-version; POST /models/{modelId}/dependencies/{dependencyId}/version-change-preview lists them all.
object
A Problem answered when a draft was refused because one is already open on another branch: opening a draft, or staging a change whose branchId names a branch other than the one the open draft targets. It names the branch that blocks the request. A branchId that is not a branch of this model is a different refusal, answered without saying anything about the id that was named.
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 400 from the plain one the same routes answer for a body or a target they cannot accept.
The ref the caller’s open draft targets, which blocks this 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
{ "type": "https://modeldesk.io/problems/change-validation-failed"}The model is theirs to read but not to change. Or a staged action is behind a feature of its own that the caller’s organization lacks: the whole change is refused with FeatureNotEnabledProblem naming that feature, which a client tells from an access refusal by its type. An ALIGNMENT_CREATE from an organization without alignment answers feature: alignment, and nothing of the change is staged. 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 a paste reads from a model of another owner than this one, answered with the plain problem and nothing staged. 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 organization feature the request needs is not open to the caller on this resource. A 403, as an access refusal is, and told apart from one by its type: a caller refused a feature can still read the resource, and only loses what the feature offers. feature says which: on a draft route it is a feature an action inside the staged change needs, such as alignment for an ALIGNMENT_CREATE, and only that change is refused.
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 an access refusal.
The organization feature the caller lacks, spelled as it is on the organization, such as alignment or catalog. Where any of several features would admit the caller, the first of them is named.
The organization the refusal was judged against. Absent for a resource no organization owns (one a user owns, or one nobody owns), which no organization feature can open: the refusal then names no one.
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 does not exist or is not the caller’s to read, answered with the plain problem. Or the caller holds no draft and branchId names no branch of the model, answered as RefNotFoundProblem: an unknown id, a draft and a generated branch all read as naming nothing.
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"}The draftHeadId is no longer the current head. The problem carries the gap, so a caller that finds its own changeRequestId in commits knows its change was applied and does not send it twice.
A Problem that additionally carries the gap, answered when the draftHeadId a change or an undo was written against is no longer the draft’s head. Listing what landed in between is what makes a retry safe: a caller that finds its own changeRequestId in commits knows its change was applied and does not send it twice.
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 409 from the other.
object
The head the caller sent, which is no longer the current one.
The head as it now stands. Absent when the follow-up read that fills it did not succeed.
Whether the head the caller sent is still on the chain below the current one. False when an undo popped it, a rebase rewrote the chain, or a commit closed the draft. A client that reads false reseeds instead of replaying.
The chain from the current head down to the head the caller sent, exclusive, newest first. Absent when ancestor is false, because there is then no gap to list.
A commit as a walk over history lists it: its identity, its provenance and the kinds of action it holds, without the actions themselves.
object
Absent on the initial commit.
The author’s description of the change. Absent on a commit made without one. For a staged change it is the message that was sent, absent when it was blank or left out.
The key of the request that produced the commit, absent on a commit made without one. For a staged change it is the changeRequestId that was sent.
The deduped, sorted type values of the commit’s actions. Empty rather than absent on a commit that records none.
Present, and true, on a merge commit whose actionTypes include a dependency or metamodel-pin type for every change it made to the model’s dependencies and metamodel pin. A merge commit names the elements it changed as element actions whatever they are, so one without it says nothing about those: a client has to assume they may have moved. Absent on every other commit, whose actionTypes always tell.
Example
{ "type": "https://modeldesk.io/problems/draft-head-conflict"}A dry run did not finish within its timeout and was given up, with problem type https://modeldesk.io/problems/dry-run-timeout. Nothing was written and the request can be sent again. Only a dry run is bounded this way.
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" } ]}