Create a work item
const url = 'https://api.modeldesk.io/models/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/work-items';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"type":"TASK","title":"example","elementId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","property":"example","refId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","assigneeId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","priority":"NONE"}'};
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/work-items \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "type": "TASK", "title": "example", "elementId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "property": "example", "refId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "assigneeId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "priority": "NONE" }'Creates an item on the model, raised on one of its branches or on the caller’s own draft, anchored to the model, an element or a property of an element. It takes the organization’s next number and starts in the workflow’s first unstarted state. A finding is not created by hand.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
What kind of work an item is. FINDING is raised from a validation result and is not created by hand.
Requires elementId.
The branch or the caller’s draft the item is raised on.
Responses
Section titled “Responses”Created
A work item as its page reads it.
object
Per organization, never reused.
Absent for an item about the organization.
What kind of work an item is. FINDING is raised from a validation result and is not created by hand.
The check that reported the finding a FINDING item tracks; absent on every other type.
The place in the model an item is about, or the organization as a whole. Finer fields are absent, never null.
object
The model, or the organization for an item about the organization.
Absent on an item about the model as a whole, and on an organization item.
The element’s property by name; absent unless the item is about one property.
Present only while the anchor’s target is not in the model at the item’s checked ref.
object
Present when someone decided to keep the item where it is.
When the commit that removed the target was made; absent when the target was found missing on read.
object
USER is a person, MACHINE a service account, and SYSTEM the platform itself, whose commits (metamodel seeding and re-pins) the commit log hides unless asked for them.
The display name, where one is known: a person’s from their account, a service account’s as stored with what it wrote. Left out for the platform and for a person whose account holds no name.
The target’s name when it was last seen.
The element that owned the target when it was last seen.
The fixed category of a workflow state. Open means anything but COMPLETED and CANCELED.
object
An open item blocks this one.
Unstarted, unassigned and not blocked: anyone may claim it.
The items that block this one, open and closed, locked where the reader may not read them.
Another item as a line in a relation, a parent, a blocker or a picker.
object
The reader may not open the item: it is on a model they cannot read, or on another user’s draft. A locked link carries its number only.
The fixed category of a workflow state. Open means anything but COMPLETED and CANCELED.
The organization the item’s number belongs to.
Absent for an item about the organization.
object
The ref’s name when the item was raised.
The ref the target was checked at for this answer: raisedOn while that ref lives, otherwise the model’s default shared branch, named as it is now.
object
The ref’s name when the item was raised.
What the anchor names, at checkedRef while the target is there, and from the last revision known of it once it is gone. A field that could not be resolved is absent. Carried by the routes that answer a whole item, not by lists.
object
The element’s type key.
Absent when the metamodel gives the property no label; its name is shown then.
The ids of the workflow’s labels the item carries.
Markdown.
Markdown.
Markdown.
object
Another item as a line in a relation, a parent, a blocker or a picker.
object
The reader may not open the item: it is on a model they cannot read, or on another user’s draft. A locked link carries its number only.
The fixed category of a workflow state. Open means anything but COMPLETED and CANCELED.
Another item as a line in a relation, a parent, a blocker or a picker.
object
The reader may not open the item: it is on a model they cannot read, or on another user’s draft. A locked link carries its number only.
The fixed category of a workflow state. Open means anything but COMPLETED and CANCELED.
Another item as a line in a relation, a parent, a blocker or a picker.
object
The reader may not open the item: it is on a model they cannot read, or on another user’s draft. A locked link carries its number only.
The fixed category of a workflow state. Open means anything but COMPLETED and CANCELED.
Another item as a line in a relation, a parent, a blocker or a picker.
object
The reader may not open the item: it is on a model they cannot read, or on another user’s draft. A locked link carries its number only.
The fixed category of a workflow state. Open means anything but COMPLETED and CANCELED.
Another item as a line in a relation, a parent, a blocker or a picker.
object
The reader may not open the item: it is on a model they cannot read, or on another user’s draft. A locked link carries its number only.
The fixed category of a workflow state. Open means anything but COMPLETED and CANCELED.
Another item as a line in a relation, a parent, a blocker or a picker.
object
The reader may not open the item: it is on a model they cannot read, or on another user’s draft. A locked link carries its number only.
The fixed category of a workflow state. Open means anything but COMPLETED and CANCELED.
How an item was closed. Present while it is closed.
object
object
USER is a person, MACHINE a service account, and SYSTEM the platform itself, whose commits (metamodel seeding and re-pins) the commit log hides unless asked for them.
The display name, where one is known: a person’s from their account, a service account’s as stored with what it wrote. Left out for the platform and for a person whose account holds no name.
A link that shows how an item was closed.
object
The commit id, the branch id, or an absolute http(s) URL.
The validation finding a finding item tracks; present exactly on an item of type FINDING. code, level, subject, elementId and property are the entry’s as it was tracked; elementId is kept even when the item is anchored to the model, as for an element of a dependency.
object
The finding’s identity on the item’s model, as the validation report gives it on each entry.
The check that reported the finding.
What exactly a finding is about, when its check can report more than one finding at the same code, element and property: a relation target, an offending value (with its language tag for a language string) or an identifier the check is about. Exactly one of target, value and name is present, language only beside value.
object
Absent for a finding about the model as a whole.
Absent unless the finding is about one property of the element.
When the finding was tracked.
Whether a tracked finding is still there at the ref its item is checked at, as of the last completed check: present since it was tracked or reappeared, gone, or found again after it was gone or its item was completed.
The head commit the status changed at; absent while the finding has been present since it was tracked.
When the status last changed; the track time until a check changes it.
When the finding was last checked.
The head commit of the last check.
object
USER is a person, MACHINE a service account, and SYSTEM the platform itself, whose commits (metamodel seeding and re-pins) the commit log hides unless asked for them.
The display name, where one is known: a person’s from their account, a service account’s as stored with what it wrote. Left out for the platform and for a person whose account holds no name.
Example
{ "type": "TASK", "anchor": { "resourceKind": "model" }, "anchorStatus": { "gone": true, "by": { "type": "USER" } }, "category": "TRIAGE", "priority": "NONE", "blockedBy": [ { "category": "TRIAGE" } ], "raisedOn": { "kind": "BRANCH" }, "checkedRef": { "kind": "BRANCH" }, "parent": { "category": "TRIAGE" }, "children": [ { "category": "TRIAGE" } ], "blocks": [ { "category": "TRIAGE" } ], "relates": [ { "category": "TRIAGE" } ], "duplicates": [ { "category": "TRIAGE" } ], "duplicatedBy": [ { "category": "TRIAGE" } ], "closure": { "by": { "type": "USER" }, "evidence": [ { "kind": "COMMIT" } ] }, "finding": { "level": "WARN", "status": "PRESENT" }, "createdBy": { "type": "USER" }}Invalid input: a finding, a property without its element or one its type does not have, an element the ref does not hold, a ref that is not a branch or the caller’s draft, or a person who cannot be assigned.
An RFC 9457 problem document, always sent as application/problem+json.
object
Present only on a typed refusal, whose own schema requires it and fixes its value. An untyped problem omits it, which RFC 9457 defines as about:blank: the status and title are all there is to branch on.
The path of the request that was refused. Absent when the request was refused before it reached the application’s handlers: a 401 for a missing or unusable access token, and a 403 for a service account whose scopes do not reach the route.
Present on a 400 raised by request-body validation, and on a 422 that refuses named fields (a malformed slug or namespace prefix). Each entry names the rejected property, so a client can attach the message to the field that caused it rather than showing one error for the whole form.
object
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "instance": "example", "violations": [ { "property": "example", "message": "example" } ]}The organization does not have work items (feature-not-enabled), or the caller holds no seat on the model’s metamodel.
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.
Example
{ "type": "https://modeldesk.io/problems/feature-not-enabled", "feature": "alignment"}The model is not there for the caller: it does not exist, belongs to another organization, is another member’s individual model, or its organization does not have work items. Also the answer for an item number the caller may not see.
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" } ]}