Merge an import into its branch
const url = 'https://api.modeldesk.io/imports/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/merge';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"message":"example","expectedHeadId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","expectedSourceHeadId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","resolutions":[{"elementId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","take":"target","fields":{"additionalProperty":"target"}}],"takeOthers":"target","selection":{"leaveOut":[{"elementId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","fields":["example"]}],"only":[{"elementId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","fields":["example"]}]}}'};
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/imports/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/merge \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "message": "example", "expectedHeadId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "expectedSourceHeadId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "resolutions": [ { "elementId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "take": "target", "fields": { "additionalProperty": "target" } } ], "takeOthers": "target", "selection": { "leaveOut": [ { "elementId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "fields": [ "example" ] } ], "only": [ { "elementId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "fields": [ "example" ] } ] } }'Merge an import that waits for review into the branch it goes into: the branch merge of POST /models/{modelId}/branches/{branchId}/merge, with the model’s import line, held to the import’s commit, as its source. Everything that route says about conflicts, resolutions, takeOthers, selection, the dependency closure, the write rules and the heads holds here, with the source always the import’s commit: expectedSourceHeadId, when sent, must be that commit (the plan’s sourceCommitId), and resolutions or a non-empty selection need it together with expectedHeadId. The merge lands one commit with two parents, the branch’s head first and the import’s commit second, named message or, when none is sent, “Imported” and the import’s source name as the source route discloses it; a merger who may not read the import by its own access rules gets “Imported a file”, since every reader of the model reads the commit.
The merge commit, the claim of the import line’s head at the import’s commit and the import’s completion (COMPLETED, with modelId the model and mergeCommitId the merge commit) are one transaction, held to the branch’s head: a merge the branch merge refuses completes nothing, and a merge that meets a discard of the import or a newer import’s commit on the line lands nothing and is answered with the import’s state where the store already shows it, or else as the branch head conflict its lost write was. A merge that would leave the branch’s content as it is still lands its two-parent merge commit, as a selection that leaves every change out does, so the import’s commit is recorded as merged and the next import is merged over it. Only an import whose commit the branch already holds, which importing the unchanged file gives, is completed without a commit and without mergeCommitId, answered with outcome nothing-to-merge.
Needs what a merge into the branch needs: write access to the model, which takes membership of its owner and a seat for its metamodel. A caller who may not read the model is answered as for an unknown import. A merged import is not linked as lineage and is never added to another model as a dependency.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”What merging an import takes: a branch merge’s request without source, which is always the import’s commit. Each property follows the rule MergeRequest states for it.
object
What the merge commit is called, used as sent; when absent or blank, “Imported” and the import’s source name, or “Imported a file” for a merger who may not read the import.
The branch head the caller last saw (the plan’s targetCommitId).
The import’s commit (the plan’s sourceCommitId); any other value is refused as BranchHeadConflictProblem.
The side one conflicting element is taken from. A choice between what the two branches hold, never a value: what lands is the chosen side’s version of the element.
object
The conflicting element, as the refusal’s conflicts name it.
target: the element as the branch merged into holds it, or its absence where that branch does not hold it. source: the same from the branch merged from. fields: the target’s version with the fields fields names taken from the side each names, for an element both branches hold as the same type.
For take: fields only, and then at least one: the side each named attribute or relation key is taken from. A key the source does not hold is removed when taken from it. Every key must be one either branch’s version of the element holds, and no longer than 1024 characters; the refusal’s fields lists the ones the two disagree on.
object
The side every conflict no resolution names is taken from whole; fields is refused.
The changes a merge keeps out, or the only ones it lets in, among the changes it composes by itself. Exactly one of leaveOut and only is sent: both, or neither, is refused as InvalidSelectionProblem with both-lists or no-list. The model merge applies it; the dataset merge does not, and refuses a well-formed one with not-supported. Omit the whole selection, or send an empty leaveOut, to merge everything. A selection chooses between what the two branches hold and never carries a value. A conflicting element is resolved by resolutions and takeOthers, never by the selection. An element named by two entries, across the list, is refused with duplicate.
object
The elements whose changes the merge leaves out. An element named whole lands as the branch merged into holds it, or stays absent where that branch does not hold it; one named with fields is merged with each named key keeping that branch’s value. An empty list leaves nothing out, which is the full merge.
One element a selection names, whole or by some of its keys.
object
The element the entry is about.
The attribute and relation keys the entry is limited to. Omitted, the entry names the whole element; an empty list names nothing and is refused as InvalidSelectionProblem with fields-empty, and a key named twice is refused with duplicate.
The only elements whose changes the merge takes from the branch merged from, every other element staying as the branch merged into holds it. An element named with fields takes only the named keys from the source. An empty list takes nothing and is refused with nothing-selected.
One element a selection names, whole or by some of its keys.
object
The element the entry is about.
The attribute and relation keys the entry is limited to. Omitted, the entry names the whole element; an empty list names nothing and is refused as InvalidSelectionProblem with fields-empty, and a key named twice is refused with duplicate.
Responses
Section titled “Responses”The import is merged, by a merge commit or with nothing to merge.
A merged import: the landed merge, in the shape the branch merge answers, with the import’s new status, or that there was nothing to merge and the import was completed without a commit.
object
merged when a merge commit landed, also one that changed no content; nothing-to-merge when the branch already held the import’s commit, so none was written.
The import’s status after the merge.
The merge commit; absent for nothing-to-merge.
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.
The common ancestor the merge was computed over; absent for nothing-to-merge.
The branch head the merge landed on, its first parent; absent for nothing-to-merge.
The import’s commit, the merge commit’s second parent; absent for nothing-to-merge.
Example
{ "outcome": "merged", "importStatus": "COMPLETED"}Refused as the branch merge refuses a body, a resolution or a selection (InvalidResolutionProblem, InvalidSelectionProblem, or the plain problem); nothing is applied.
A Problem answered when a merge is refused again and one of the resolutions sent with it cannot be applied as sent. Nothing was applied and nothing was written. Only the first broken rule is named, in the order the resolutions were sent.
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 a body that cannot be read is refused with.
The rule the resolution broke. not-a-conflict: it names an element the merge does not refuse. duplicate: it names an element another resolution already names. fields-missing: it takes fields and names none. fields-unexpected: it names fields without taking fields, or takes a field from fields, or takeOthers is fields. unknown-field: it names a field neither branch’s version of the element holds, or one longer than 256 characters. not-on-both-sides: it takes fields on an element one branch does not hold. type-differs: it takes fields on an element the two branches hold as different types. heads-required: resolutions or takeOthers were sent without both expectedHeadId and expectedSourceHeadId.
The element the resolution that broke the rule names. Absent for heads-required, which is about the resolutions as a whole, and for fields-unexpected on takeOthers, which names no element.
A Problem answered when a merge request’s selection cannot be read as sent. Nothing was merged. A rule about the selection as a whole is checked before any entry, and only one broken rule is 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 a body that cannot be read is refused with.
The rule the selection broke. both-lists: it sends both leaveOut and only. no-list: it sends neither. duplicate: it names an element another entry already names, or an entry names a field twice. fields-empty: an entry sends an empty fields list; omit fields to name the whole element. nothing-selected: only is an empty list, which takes nothing. conflicting-element: an entry names an element the two branches conflict on, which resolutions and takeOthers decide. unknown-element: an entry names an element neither branch holds. unknown-field: an entry names a key neither branch’s version of the element holds. not-on-both-sides: an entry names fields of an element only one branch holds, which is added or removed whole. owner-not-selected: an only entry takes an element the source added under an owner it also added, and no entry takes that owner. heads-required: a selection with entries was sent without both expectedHeadId and expectedSourceHeadId. not-supported: the merge the route runs does not apply a selection, as the dataset merge does not.
The element the entry that broke the rule names. Absent for both-lists, no-list, nothing-selected, heads-required and not-supported, which are about the selection as a whole.
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/invalid-resolution", "rule": "not-a-conflict"}The model is the caller’s to read but not to change, answered with the plain problem. Or the caller is an agent acting for a person: the person has not granted committing (AgentCommitNotGrantedProblem), or the merge would make the model’s main branch publish what it did not and the person has not granted publishing (AgentPublishNotGrantedProblem), or the owning organization has not enabled the agent’s AI platform (AgentPlatformNotEnabledProblem) or caps agents below the level the merge reaches (AgentLevelNotAllowedProblem).
A Problem answered when an agent acting for a person tried to land work on a shared branch, and the person did not grant it the right to commit: a merge, or a draft landing on a branch whose name does not start with agent/ (in any case). Nothing was written. Such an agent lands its draft 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.
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-commit-not-granted"}No such import, or one into a model the caller may not read; or the branch the import goes into is gone (RefNotFoundProblem).
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"}One of four, told apart by type, and none writes anything: the import and the branch conflict and the request does not resolve every conflict, or the updater refused a resolution or a selection entry (MergeConflictProblem); the branch’s head is not expectedHeadId or moved while the merge was computed, or expectedSourceHeadId is not the import’s commit (BranchHeadConflictProblem); the two heads have several closest common ancestors (AmbiguousMergeBaseProblem); or the import is not waiting for review, also when it stopped waiting while the merge ran (ImportNotMergeableProblem).
A Problem answered when the two branches of a merge disagree on at least one element and the request did not resolve every conflict, or the updater refused a resolution or a selection entry it sent. Nothing was written. Every conflict rides at once, described, so a caller resolves them all in one more call: it sends the merge again with a resolution per conflict and the two heads this problem names. Every member is always written.
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 two a merge answers with.
Every conflicting element, in element-id order, whether resolved or not. Empty only for a merge with no conflict whose selection the updater refused, which rejected then reports.
One element a merge could not take from either branch, why, and what each branch holds for it: enough to choose a side without reading either branch. The names of the elements its values reference are on the problem’s resolvedNames.
object
What the branch merged into holds for the element.
object
Whether the branch holds the element at all.
The element’s type on that branch, absent when it does not hold the element. An element the two branches hold as different types is resolved by taking one side whole.
The ids of the elements that own it on that branch, in id order. Empty for the model’s root, and for an element the branch does not hold. Two branches that placed one element under different owners show it here, with nothing among its fields to tell them apart; taking the element from a side places it under that side’s owners. resolvedNames names them.
What the branch merged from holds for the element.
object
Whether the branch holds the element at all.
The element’s type on that branch, absent when it does not hold the element. An element the two branches hold as different types is resolved by taking one side whole.
The ids of the elements that own it on that branch, in id order. Empty for the model’s root, and for an element the branch does not hold. Two branches that placed one element under different owners show it here, with nothing among its fields to tell them apart; taking the element from a side places it under that side’s owners. resolvedNames names them.
Every attribute and relation the target’s and the source’s version hold differently, attributes first and each kind by key. A relation counts as held differently when its groups or the ownership of its references differ too, even where its target ids read the same. A side that does not hold the element has no values, so every field the other side holds is listed. Empty when the two versions differ in nothing a field carries, such as their type or their owners alone. A pinned-differently conflict lists the pin alone, as one field, @commitId, or @location for an external dependency, whose values are the pins as a reader names them: the version name where the pin is a release, otherwise Snapshot followed by the first eight characters of the pinned commit’s id, and for an external dependency its document, the address or the name an upload arrived under with the first eight characters of its content’s hash. A pin is taken whole: a resolution taking fields of one takes the side it names for that field, and the target’s where it names none.
One attribute or relation of a conflicting element, as the merge base, the target and the source hold it. A value is absent where that version does not hold the key or the element; a stored empty value reads as absent.
object
The attribute or relation key, as the element stores it.
Whether the key is one of the element’s attributes or one of its relations.
The value at the merge base, absent where the base did not hold the element or the key. Shaped as target is.
The value on the branch merged into. An attribute’s value is the list of values it stores; a relation’s is the ids of its targets, group after group, in stored order, which resolvedNames names.
The value on the branch merged from, shaped as target is.
On a pinned-differently conflict on the pin of the model’s metamodel or of one of its extensions only: how many managed dependencies of the branch merged into each side’s pin changes. The built-in elements a pin brings along follow the pin, so they are never conflicts of their own.
object
How many taking the target’s pin changes, which is none, as they already follow it.
How many taking the source’s pin changes.
both-changed: both branches changed the element, differently. changed-and-deleted: one branch deleted it and the other changed it. owner-deleted: one branch created or changed it under an owner the other deleted, which is also the reason when the other deleted the element together with that owner. target-deleted: one branch changed it while it references an element the other deleted. pinned-differently: the element is a dependency, or the model’s metamodel or extension pin, and the two branches pin it at different commits; taking a side takes that side’s pin, and the dependencies it brings along follow it rather than being reported on their own. dependency-removed: the element refers to content of a dependency the other branch removed, so the merged model would hold a reference nothing resolves; a reference that resolved neither at the merge base nor on either branch was already dangling and is not reported. An element is reported once. An inverse relation is written into both of its ends, so one added on one side to an element the other side changed is both-changed. An owned member added on one side to an owner the other side changed is not: member lists combine, and the owner is both-changed only when both sides changed something other than its member lists, differently.
The common ancestor the two branches were compared against.
The head of the branch merged into, as the merge read it. A resolution sends it as expectedHeadId.
The head of the branch merged from, as the merge read it. A resolution sends it as expectedSourceHeadId.
Display name by element id for every conflicting element, every owner its sides name and every element a relation value of the conflicts names, read on whichever branch holds it, else at the merge base, else in the metamodel. An element only a dependency holds is left out, for the client to name.
object
The resolutions and selection entries the updater refused, one per element, in element-id order, each about the element the resolution or entry names. Empty when no choice was sent, or the merge was refused only for a conflict left without one. At most 20 are reported: once that many have failed, the rest are not tried. An entry with code repair-invalid is not about a choice: it names an element no conflict covers, one the merge itself had to repair to stand beside the chosen versions, which then breaks a rule, the message and property saying which. No resolution is to blame for it, and every other resolution was still applied; the way through is choosing differently around that element, or a commit on either branch.
A resolution the updater refused, in the shape every refusal of a change is reported in: code and message are the updater’s own, and property the attribute or relation it refused where it named one. elementId is always present and is the conflicting element the resolution was for, whichever element the updater was looking at; the message names that one. actionIndex and actionType never appear. Among the codes: element-not-found for a version that relates to an element the merged model does not hold, owner-not-found for an element created under, or kept beneath, an owner that is gone, already-owned and multiplicity-violated as a change made by hand meets them, and updater-rejected for a refusal that names no code of its own, and needs-left-out-element for a selection that keeps a change referring to an element the source added and the selection leaves out, about the referring element. One code names no resolution: repair-invalid, whose elementId is an element the merge repaired rather than a conflicting one, refused because the merged state breaks a rule there.
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.
A Problem answered when a gated write lost its compare-and-set: the head the write was written against was no longer the ref’s head when the write reached it, so nothing was written. It names the ref and the two heads, and carries no gap.
It stands in for DraftHeadConflictProblem where the gap cannot be walked: a landing whose draft was discarded while the refusal was being built, and a rebase whose swap lost to a change staged while the replay was running. On a rebase the conflict.branchId is the draft’s own ref id rather than the branch it targets, because the ref that moved is the draft.
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 others the same routes answer with.
Always the sentence Branch HEAD has advanced since this commit's baseline., whichever ref moved. What a human reads, never parsed.
object
The ref whose head the write was gated on.
The head the write was written against, which is no longer the current one.
The head as it now stands. Absent when the follow-up read that fills it found no ref, which is what a discarded draft leaves behind.
A Problem answered when the two heads have several closest common ancestors, as they do after a criss-cross merge: each branch was merged into the other from a head that did not yet hold the other merge. There is then no single base to compare or merge over, and a merge over any one of them can undo, without a conflict, a deletion the other side made since. Nothing was written. A merge of the same two branches, in either direction, answers the same; one history has to be made to contain the other first, by creating one branch again from the other’s head.
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 others the merge and compare routes answer with.
The common ancestors no other common ancestor descends from, in id order: the two pre-merge heads of a criss-cross.
A Problem answered when an import is not waiting for review, so it has no plan and cannot be merged. A 409; nothing was written.
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
Why an import has no plan and cannot be merged. not-prepared: its file is still being read, or its parse is not on the model’s import line yet. superseded: a newer import into the model committed on top of it. merged: it was merged already. failed: it failed. deleted: it was discarded. creates-model: it creates a model rather than going into one. not-ready and other-commit: it stopped being the import the merge read while the merge ran.
For merged, the merge commit; absent when the import was merged with nothing to merge.
For failed, what the import failed with; sent only to a caller who may read the import by its own access rules, since the text can name the file’s address.
Example
{ "type": "https://modeldesk.io/problems/merge-conflict", "conflicts": [ { "fields": [ { "kind": "attribute" } ], "reason": "both-changed" } ]}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" } ]}