Skip to content

Change the item number prefix

PATCH
/organizations/{orgId}/workflow
curl --request PATCH \
--url https://api.modeldesk.io/organizations/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/workflow \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "version": 1, "prefix": "example" }'

Sets the prefix item numbers are shown with. The prefix in use until now is kept among the earlier prefixes, so addresses written with it still find their items; no item is renumbered. Organization admins only.

orgId
required
string format: uuid
Media typeapplication/json

A new prefix for item numbers; the one in use until now is kept among the earlier ones.

object
version
required

The workflow version the change is based on; a write on any other is stale.

integer format: int64
prefix
required
string
/^[A-Z]{2,5}$/

Example generated

{
"version": 1,
"prefix": "example"
}

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 prefix is not 2 to 5 letters A–Z.

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 an organization admin, holds no seat in the organization, or is a service account.

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

The workflow changed since the version the request names; the problem carries the current version.

Media typeapplication/problem+json
Workflow stale

The workflow changed since the version the settings write named.

object
type
required

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
type
required
string format: uri
Allowed values: https://modeldesk.io/problems/workflow-stale
version
required

The workflow’s current version.

integer format: int64

Example

{
"type": "https://modeldesk.io/problems/workflow-stale"
}

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