Developer Portal for YouTrack and Hub 2021.3 Help

Values in the Enum Bundle

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

Resource

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

Returned entity

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

Supported methods

EnumBundleElement attributes

Represents an enumeration value in YouTrack.

Extends LocalizableBundleElement

This table describes attributes of the EnumBundleElement 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

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.

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 EnumBundleElements

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

Request syntax

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

Request parameters

Parameter

Type

Description

fields

String

A list of EnumBundleElement 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

https://example.myjetbrains.com/youtrack/api/admin/customFieldSettings/bundles/enum/54-1/values?fields=id,name

Sample response body

[ { "name": "Bug", "id": "55-5", "$type": "EnumBundleElement" }, { "name": "Exception", "id": "55-7", "$type": "EnumBundleElement" }, { "name": "Feature", "id": "55-8", "$type": "EnumBundleElement" }, { "name": "Task", "id": "55-9", "$type": "EnumBundleElement" }, { "name": "Usability Problem", "id": "55-10", "$type": "EnumBundleElement" }, { "name": "Epic", "id": "55-12", "$type": "EnumBundleElement" }, { "name": "Story", "id": "55-308", "$type": "EnumBundleElement" }, { "name": "Incident", "id": "55-317", "$type": "EnumBundleElement" } ]

Add a New EnumBundleElement

Add a new enumerated value to the bundle.

Required permissions

Requires Project Update 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/enum/{bundleID}/values?{fields}

Request parameters

Parameter

Type

Description

fields

String

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

Sample

Sample request

https://example.myjetbrains.com/youtrack/api/admin/customFieldSettings/bundles/enum/54-1/values?fields=id,name

Sample request body

{ "name": "User Story" }

Sample response body

{ "name": "User Story", "id": "55-318", "$type": "EnumBundleElement" }
Last modified: 14 September 2021