# Operations with Specific Values in the State Bundle

This resource lets you work with the values in a specific set of states (state bundle).
|  Resource  |     ```GENERIC /api/admin/customFieldSettings/bundles/state/{bundleID}/values/{elementID} ```    |
| --- | --- |
|  Returned entity  |  [StateBundleElement](api-entity-StateBundleElement.html). For the description of the entity attributes, see [Supported Fields](#StateBundleElement-supported-fields) section.  |
|  Supported methods  |      * `GET`: [Values in the State Bundle](#get-StateBundleElement-method).    * `POST`: [Values in the State Bundle](#update-StateBundleElement-method).    * `DELETE`: [Values in the State Bundle](#delete-StateBundleElement-method).    |

## 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.

* [Values in the State Bundle](resource-api-admin-customFieldSettings-bundles-state-bundleID-values.html)

Extends [LocalizableBundleElement](api-entity-LocalizableBundleElement.html)

### 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](api-entity-Bundle.html)  |  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](api-entity-FieldStyle.html)  |  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 StateBundleElement

Get a specific state from the bundle.

### Required permissions

Requires read access to the bundle.

### Request syntax

```GENERIC
GET /api/admin/customFieldSettings/bundles/state/{bundleID}/values/{elementID}?{fields}
```

|  {elementID}  |  Database ID of the state value.  |
| --- | --- |

### 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

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

#### Sample response body

```JSON
{
  "isResolved": false,
  "localizedName": null,
  "description": null,
  "name": "Open",
  "id": "57-1",
  "$type": "StateBundleElement"
}
```

## Update a Specific StateBundleElement

Update a specific state 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

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

|  {elementID}  |  Database ID of the state value.  |
| --- | --- |

### 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

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

#### Sample request body

```JSON
{
  "isResolved": true
}
```

#### Sample response body

```JSON
{
  "isResolved": true,
  "localizedName": null,
  "description": null,
  "name": "Open",
  "id": "57-1",
  "$type": "StateBundleElement"
}
```

## Delete a Specific StateBundleElement

Remove a specific state 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

```GENERIC
DELETE /api/admin/customFieldSettings/bundles/state/{bundleID}/values/{elementID}
```

|  {elementID}  |  Database ID of the state value.  |
| --- | --- |

### 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

```CURL
https://example.youtrack.cloud/api/admin/customFieldSettings/bundles/state/56-0/values/57-328
```

