Developer Portal for YouTrack and Hub Help

Values in the State Bundle

This resource lets you work with the values in a specific set of states (state bundle).

Resource

/api/admin/customFieldSettings/bundles/state/{bundleID}/values

Returned entity

StateBundleElement. For the description of the entity attributes, see Supported Fields section.

Supported methods

StateBundleElement attributes

Represents the state of an issue in YouTrack.

Related Resources

Below you can find the list of resources that let you work with this entity.

Extends LocalizableBundleElement

Attributes

This table describes attributes of the StateBundleElement entity.

  • To receive an attribute in the response from the server, specify it explicitly in the fields request parameter.

  • To update an attribute, provide it in the body of a POST request.

Field

Type

Description

id

String

The ID of the state value. Read-only.

isResolved

Boolean

If true, then issues in this state are considered to be resolved.

localizedName

String

The localized name of the field value. Can be null.

name

String

The name of the value.

bundle

Bundle

The reference to the bundle that contains this value. Read-only. Can be null.

description

String

The description of the value. Can be null.

archived

Boolean

When true, this value is archived.

ordinal

Int

The position of the value in the set of values for the custom field.

color

FieldStyle

The color that is assigned to the value in the custom field.

hasRunningJob

Boolean

If true, there are some jobs running in the background for this bundle element. Otherwise, false. Read-only.

Read a List of StateBundleElements

Get the list of all state values in the specific state bundle.

Request syntax

GET /api/admin/customFieldSettings/bundles/state/{bundleID}/values?{fields}&{$top}&{$skip}

Request parameters

Parameter

Type

Description

fields

String

A list of StateBundleElement attributes that should be returned in the response. If no field is specified, only the entityID is returned.

$skip

Int

Optional. Lets you set a number of returned entities to skip before returning the first one.

$top

Int

Optional. Lets you specify the maximum number of entries that are returned in the response. If you don't set the $top value, the server limits the maximum number of returned entries.

The server returns a maximum of 42 entries for most resources that return collections. For more information, see Pagination.

Sample

Sample request

https://example.youtrack.cloud/api/admin/customFieldSettings/bundles/state/56-0/values?fields=id,name,isResolved,localizedName,description

Sample response body

[ { "isResolved": false, "localizedName": null, "description": null, "name": "Submitted", "id": "57-0", "$type": "StateBundleElement" }, { "isResolved": false, "localizedName": null, "description": null, "name": "Open", "id": "57-1", "$type": "StateBundleElement" }, { "isResolved": false, "localizedName": null, "description": null, "name": "In Progress", "id": "57-2", "$type": "StateBundleElement" }, { "isResolved": true, "localizedName": null, "description": null, "name": "Fixed", "id": "57-7", "$type": "StateBundleElement" }, { "isResolved": true, "localizedName": null, "description": "Issue fix is verified", "name": "Verified", "id": "57-11", "$type": "StateBundleElement" }, { "isResolved": true, "localizedName": null, "description": null, "name": "Pending verification", "id": "57-52", "$type": "StateBundleElement" }, { "isResolved": false, "localizedName": null, "description": null, "name": "Duplicated", "id": "57-295", "$type": "StateBundleElement" }, { "isResolved": false, "localizedName": null, "description": null, "name": "On Hold", "id": "57-300", "$type": "StateBundleElement" }, { "isResolved": true, "localizedName": null, "description": null, "name": "Closed", "id": "57-327", "$type": "StateBundleElement" } ]

Add a New StateBundleElement

Add a new state to the bundle.

Required fields: name.

Required permissions

Requires Update Project permission in all projects where the bundle is used. If the bundle is not used in any field, Update Project permission is required in at least one project.

Request syntax

POST /api/admin/customFieldSettings/bundles/state/{bundleID}/values?{fields}

Request parameters

Parameter

Type

Description

fields

String

A list of StateBundleElement attributes that should be returned in the response. If no field is specified, only the entityID is returned.

Sample

Sample request

https://example.youtrack.cloud/api/admin/customFieldSettings/bundles/state/56-0/values?fields=id,name,isResolved,localizedName,description

Sample request body

{ "name": "Complete" }

Sample response body

{ "isResolved": false, "localizedName": null, "description": null, "name": "Complete", "id": "57-328", "$type": "StateBundleElement" }
Last modified: 15 March 2024