Developer Portal for YouTrack and Hub 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/{elementID}

Returned entity

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

Supported methods

EnumBundleElement attributes

Represents an enumeration value 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 EnumBundleElement 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 enumeration value. Read-only.

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 Specific EnumBundleElement

Get a specific enumerated value from the bundle.

Required permissions

Requires read access to the bundle.

Request syntax

GET /api/admin/customFieldSettings/bundles/enum/{bundleID}/values/{elementID}?{fields}

{elementID}

Database ID of the enumerated value.

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.youtrack.cloud/api/admin/customFieldSettings/bundles/enum/54-1/values/55-5?fields=id,name

Sample response body

{ "name": "Bug", "id": "55-5", "$type": "EnumBundleElement" }

Update a Specific EnumBundleElement

Update a specific enumerated value in the bundle.

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

{elementID}

Database ID of the enumerated value.

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.youtrack.cloud/api/admin/customFieldSettings/bundles/enum/54-1/values/55-318?fields=id,name

Sample request body

{ "name": "Problem" }

Sample response body

{ "name": "Problem", "id": "55-318", "$type": "EnumBundleElement" }

Delete a Specific EnumBundleElement

Remove a specific enumerated value from the bundle.

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

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

{elementID}

Database ID of the enumerated value.

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.youtrack.cloud/api/admin/customFieldSettings/bundles/enum/54-1/values/55-318
Last modified: 23 April 2024