Skip to content

List work items

GET
/models/{modelId}/work-items
curl --request GET \
--url 'https://api.modeldesk.io/models/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/work-items?includeClosed=false&offset=0&limit=50' \
--header 'Authorization: Bearer <token>'

The model’s work items, newest number first. Without a category only open items are listed, unless includeClosed is set. Items raised on another user’s live draft are left out.

modelId
required
string format: uuid
category
Array<string>
Allowed values: TRIAGE BACKLOG UNSTARTED STARTED COMPLETED CANCELED

Only items in a state of these categories. Repeat the parameter for several.

elementId
string format: uuid

Only items anchored to this element, at element or property grain.

q
string
<= 200 characters

Text the title holds, or an item number with or without its #.

includeClosed
boolean

Whether completed and canceled items are listed when no category is named.

offset
integer
0
limit
integer
default: 50 >= 1 <= 200

At most 200; a larger value is read as 200.

OK

Media typeapplication/json

One page of work items.

object
items
required
Array<object>
Work item

A work item as a row of a list.

object
id
required
string format: uuid
number
required

Per organization, never reused.

integer format: int64
modelId

Absent for an item about the organization.

string format: uuid
type
required

What kind of work an item is. FINDING is raised from a validation result and is not created by hand.

string
Allowed values: TASK BUG QUESTION FINDING
findingCode

The check that reported the finding a FINDING item tracks; absent on every other type.

string
title
required
string
anchor
required

The place in the model an item is about, or the organization as a whole. Finer fields are absent, never null.

object
resourceKind
required
string
Allowed values: model organization
resourceId
required

The model, or the organization for an item about the organization.

string format: uuid
elementId

Absent on an item about the model as a whole, and on an organization item.

string format: uuid
property

The element’s property by name; absent unless the item is about one property.

string
anchorStatus

Present only while the anchor’s target is not in the model at the item’s checked ref.

object
gone
required
boolean
keptAsIs

Present when someone decided to keep the item where it is.

boolean
at

When the commit that removed the target was made; absent when the target was found missing on read.

string format: date-time
by
object
id
required
string format: uuid
type
required

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.

string
Allowed values: USER ORGANIZATION SYSTEM MACHINE
name

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.

string
lastName

The target’s name when it was last seen.

string
lastOwnerId

The element that owned the target when it was last seen.

string format: uuid
stateId
required
string format: uuid
category

The fixed category of a workflow state. Open means anything but COMPLETED and CANCELED.

string
Allowed values: TRIAGE BACKLOG UNSTARTED STARTED COMPLETED CANCELED
assignee
object
id
required
string format: uuid
name
string
priority
required
string
Allowed values: NONE URGENT HIGH MEDIUM LOW
due
string format: date
labels
required

The ids of the workflow’s labels the item carries.

Array<string>
blocked
required

An open item blocks this one.

boolean
ready
required

Unstarted, unassigned and not blocked: anyone may claim it.

boolean
blockedBy
required

The items that block this one, open and closed, locked where the reader may not read them.

Array<object>

Another item as a line in a relation, a parent, a blocker or a picker.

object
number
required
integer format: int64
locked
required

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.

boolean
id
string format: uuid
title
string
modelId
string format: uuid
stateId
string format: uuid
category

The fixed category of a workflow state. Open means anything but COMPLETED and CANCELED.

string
Allowed values: TRIAGE BACKLOG UNSTARTED STARTED COMPLETED CANCELED
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
total
required

How many match, across every page.

integer format: int64
offset
required
integer

Example

{
"items": [
{
"type": "TASK",
"anchor": {
"resourceKind": "model"
},
"anchorStatus": {
"gone": true,
"by": {
"type": "USER"
}
},
"category": "TRIAGE",
"priority": "NONE",
"blockedBy": [
{
"category": "TRIAGE"
}
]
}
]
}

The caller is a member of the organization without a seat (on the model’s metamodel, for a model’s routes), or is a service account, which no work item route admits.

Media typeapplication/problem+json

An RFC 9457 problem document, always sent as application/problem+json.

object
type

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.

string format: uri
title
required
string
status
required
integer
detail
required
string
instance

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.

string
violations

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.

Array<object>
object
property
required
string
message
required
string

Example generated

{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"violations": [
{
"property": "example",
"message": "example"
}
]
}

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.

Media typeapplication/problem+json

An RFC 9457 problem document, always sent as application/problem+json.

object
type

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.

string format: uri
title
required
string
status
required
integer
detail
required
string
instance

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.

string
violations

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.

Array<object>
object
property
required
string
message
required
string

Example generated

{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"violations": [
{
"property": "example",
"message": "example"
}
]
}

Error

Media typeapplication/problem+json

An RFC 9457 problem document, always sent as application/problem+json.

object
type

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.

string format: uri
title
required
string
status
required
integer
detail
required
string
instance

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.

string
violations

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.

Array<object>
object
property
required
string
message
required
string

Example generated

{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"violations": [
{
"property": "example",
"message": "example"
}
]
}