Reorder the states of a category
const url = 'https://api.modeldesk.io/organizations/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/workflow/states/order';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"version":1,"category":"TRIAGE","stateIds":["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 PUT \ --url https://api.modeldesk.io/organizations/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/workflow/states/order \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "version": 1, "category": "TRIAGE", "stateIds": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ] }'Puts the states of one category in a new order; the request names every state of the category once. Organization admins only.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”The new order of the states of one category: every state of the category, each once.
object
The workflow version the change is based on; a write on any other is stale.
The fixed category of a workflow state. Open means anything but COMPLETED and CANCELED.
Responses
Section titled “Responses”OK
An organization’s work item workflow: its states, its labels and the prefix item numbers are shown with.
object
object
The fixed category of a workflow state. Open means anything but COMPLETED and CANCELED.
Present on the duplicate state, which a close enters only with the original named. Kept beside its role for readers that predate the 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.
A label of the organization’s workflow. Its name is unique in the organization, ignoring case.
object
The colour a label is drawn in.
How many items carry the label; present where the workflow is read for its settings only.
Written before every item number, as in GEO-231; derived from the organization’s name until an admin sets one.
The prefixes the organization used before, so an address written with one still finds its item.
The number the next item takes.
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.
Example
{ "states": [ { "category": "TRIAGE", "role": "DUPLICATE" } ], "labels": [ { "colour": "slate" } ]}The state ids are not exactly the category’s states, each once.
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 caller is not an organization admin, holds no seat in the organization, or is a service account.
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 caller is not a member of the organization, or it does not have work items.
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 workflow changed since the version the request names; the problem carries the current version.
The workflow changed since the version the settings write 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
The workflow’s current version.
Example
{ "type": "https://modeldesk.io/problems/workflow-stale"}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" } ]}