Skip to content

Get the work item workflow

GET
/organizations/{orgId}/workflow
curl --request GET \
--url https://api.modeldesk.io/organizations/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/workflow \
--header 'Authorization: Bearer <token>'

The organization’s workflow: its states, each in one of the fixed categories, its labels with the number of live items carrying each, its prefix, the next number and its version. Created with the default states on its first read, and given a prefix derived from the organization’s name until an admin sets one. Read by every member holding a seat.

orgId
required
string format: uuid

OK

Media typeapplication/json

An organization’s work item workflow: its states, its labels and the prefix item numbers are shown with.

object
ownerId
required
string format: uuid
states
required
Array<object>
object
id
required
string format: uuid
name
required
string
category
required

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

string
Allowed values: TRIAGE BACKLOG UNSTARTED STARTED COMPLETED CANCELED
order
required
integer
reserved

Present on the duplicate state, which a close enters only with the original named. Kept beside its role for readers that predate the role.

boolean
role

The meaning a workflow state has beyond its category; absent on an ordinary state. Such a state can be renamed and reordered within its category, never deleted. DUPLICATE is the canceled state a close enters only with the original named; NOT_A_PROBLEM is the canceled state recording that the team accepts a finding, which only a finding item enters, by a close. It leaves the model’s validity unchanged.

string
Allowed values: DUPLICATE NOT_A_PROBLEM
labels
required
Array<object>

A label of the organization’s workflow. Its name is unique in the organization, ignoring case.

object
id
required
string format: uuid
name
required
string
>= 1 characters <= 100 characters
colour
required

The colour a label is drawn in.

string
Allowed values: slate red blue yellow orange green purple
count

How many items carry the label; present where the workflow is read for its settings only.

integer format: int64
prefix
required

Written before every item number, as in GEO-231; derived from the organization’s name until an admin sets one.

string
/^[A-Z]{2,5}$/
earlierPrefixes
required

The prefixes the organization used before, so an address written with one still finds its item.

Array<string>
nextNumber
required

The number the next item takes.

integer format: int64
>= 1
version
required

Raised by every change to the settings; a settings write names the version it was read at, and one naming an older version is refused with workflow-stale.

integer format: int64

Example

{
"states": [
{
"category": "TRIAGE",
"role": "DUPLICATE"
}
],
"labels": [
{
"colour": "slate"
}
]
}

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 caller is not a member of the organization, or it does not have work items.

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"
}
]
}