YouTrack Standalone 2019.2 Help

State Bundles

This resource provides operations with sets of values of the state type.

Resource

/api/admin/customFieldSettings/bundles/state

Returned entity

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

Supported methods

StateBundle attributes

Represents a set of states in YouTrack.

Extends BaseBundle

This table describes attributes of the StateBundle entity.

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

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

Field

Type

Description

values

Array of StateBundleElements

The list of states that this set of values contains.

isUpdateable

Boolean

If true, then the currently logged-in user can update this bundle. Otherwise, false. Read-only.

Read a List of StateBundles

Get all available sets of values of the State type.

Request syntax

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

Request parameters

Parameter

Type

Description

fields

String

A list of StateBundle 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.

Sample

Sample request URI

https://example.myjetbrains.com/youtrack/api/admin/customFieldSettings/bundles/state?fields=name,id,values(name,id,ordinal,isResolved),isUpdateable&$top=2

Sample response body

[ { "values": [ { "isResolved": false, "ordinal": 0, "name": "Submitted", "id": "69-0", "$type": "StateBundleElement" }, { "isResolved": false, "ordinal": 1, "name": "Open", "id": "69-1", "$type": "StateBundleElement" }, { "isResolved": false, "ordinal": 2, "name": "In Progress", "id": "69-2", "$type": "StateBundleElement" }, { "isResolved": false, "ordinal": 3, "name": "To be discussed", "id": "69-3", "$type": "StateBundleElement" }, { "isResolved": false, "ordinal": 4, "name": "Reopened", "id": "69-4", "$type": "StateBundleElement" }, { "isResolved": true, "ordinal": 5, "name": "Can't Reproduce", "id": "69-5", "$type": "StateBundleElement" }, { "isResolved": true, "ordinal": 6, "name": "Duplicate", "id": "69-6", "$type": "StateBundleElement" }, { "isResolved": true, "ordinal": 7, "name": "Fixed", "id": "69-7", "$type": "StateBundleElement" }, { "isResolved": true, "ordinal": 8, "name": "Won't fix", "id": "69-8", "$type": "StateBundleElement" }, { "isResolved": true, "ordinal": 9, "name": "Incomplete", "id": "69-9", "$type": "StateBundleElement" }, { "isResolved": true, "ordinal": 10, "name": "Obsolete", "id": "69-10", "$type": "StateBundleElement" }, { "isResolved": true, "ordinal": 11, "name": "Verified", "id": "69-11", "$type": "StateBundleElement" } ], "name": "States", "isUpdateable": true, "id": "68-0", "$type": "StateBundle" }, { "values": [ { "isResolved": false, "ordinal": 0, "name": "Open", "id": "69-12", "$type": "StateBundleElement" }, { "isResolved": false, "ordinal": 1, "name": "In Progress", "id": "69-13", "$type": "StateBundleElement" }, { "isResolved": false, "ordinal": 2, "name": "To Verify", "id": "69-14", "$type": "StateBundleElement" }, { "isResolved": true, "ordinal": 3, "name": "Done", "id": "69-15", "$type": "StateBundleElement" }, { "isResolved": true, "ordinal": 4, "name": "Duplicate", "id": "69-16", "$type": "StateBundleElement" } ], "name": "Scrum project from RESTState18cac08b-eacb-4323-811d-f21c225e36f9", "isUpdateable": true, "id": "68-1", "$type": "StateBundle" } ]

Add a New StateBundle

Create new set of values of the State type.

Required permissions

Requires Update Project OR Low-level Admin Write permission.

Request syntax

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

Request parameters

Parameter

Type

Description

fields

String

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

Sample

Sample request URI

https://example.myjetbrains.com/youtrack/api/admin/customFieldSettings/bundles/state?fields=name,id,values(name,id,ordinal,isResolved),isUpdateable

Sample request body

{ "values": [ { "isResolved": false, "name": "Reported" }, { "isResolved": false, "name": "Investigation" }, { "isResolved": false, "name": "Delegated" }, { "isResolved": false, "name": "On hold" }, { "isResolved": false, "name": "Investigated" }, { "isResolved": false, "name": "Waiting for reply" }, { "isResolved": false, "name": "Replied" }, { "isResolved": false, "name": "Reply confirmed" }, { "isResolved": true, "name": "Resolved" } ], "name": "ST States", "isUpdateable": true }

Sample response body

{ "values": [ { "isResolved": false, "name": "Reported", "id": "69-54", "$type": "StateBundleElement" }, { "isResolved": false, "name": "Investigation", "id": "69-55", "$type": "StateBundleElement" }, { "isResolved": false, "name": "Delegated", "id": "69-56", "$type": "StateBundleElement" }, { "isResolved": false, "name": "On hold", "id": "69-57", "$type": "StateBundleElement" }, { "isResolved": false, "name": "Investigated", "id": "69-58", "$type": "StateBundleElement" }, { "isResolved": false, "name": "Waiting for reply", "id": "69-59", "$type": "StateBundleElement" }, { "isResolved": false, "name": "Replied", "id": "69-60", "$type": "StateBundleElement" }, { "isResolved": false, "name": "Reply confirmed", "id": "69-61", "$type": "StateBundleElement" }, { "isResolved": true, "name": "Resolved", "id": "69-62", "$type": "StateBundleElement" } ], "name": "ST States", "isUpdateable": true, "id": "68-9", "$type": "StateBundle" }
Last modified: 18 November 2019