# Values in the Version Bundle

This resource lets you work with the version values in a specific set of versions (version bundle).
|  Resource  |     ```GENERIC /api/admin/customFieldSettings/bundles/version/{bundleID}/values ```    |
| --- | --- |
|  Returned entity  |  [VersionBundleElement](api-entity-VersionBundleElement.html). For the description of the entity attributes, see [Supported Fields](#VersionBundleElement-supported-fields) section.  |
|  Supported methods  |      * `GET`: [Values in the Version Bundle](#get_all-VersionBundleElement-method).    * `POST`: [Values in the Version Bundle](#create-VersionBundleElement-method).    |

## VersionBundleElement attributes

Represents a version in YouTrack.

### Related Resources

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

* [Values in the Version Bundle]()

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

### Attributes

This table describes attributes of the `VersionBundleElement` 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 version. `Read-only`.  |
|  archived  |  Boolean  |  Indicates whether the version is archived.  |
|  released  |  Boolean  |  Indicates whether the version is marked as released.  |
|  releaseDate  |  Long  |  The release date that is associated with the version. `Can be null`.  |
|  startDate  |  Long  |  The start date that is associated with the version. Available since 2023.1. `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`.  |
|  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 List of VersionBundleElements

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

### Request syntax

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

|  null  |  The database ID of VersionBundleElement  |
| --- | --- |

### Request parameters

|  Parameter  |  Type  |  Description  |
| --- | --- | --- |
|  fields  |  String  |  A list of VersionBundleElement 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](api-concept-pagination.html).     |

### Sample

#### Sample request

```CURL
https://example.youtrack.cloud/api/admin/customFieldSettings/bundles/version/59-8/values?fields=id,name,archived,released,releaseDate,description
```

#### Sample response body

```JSON
[
  {
    "releaseDate": null,
    "released": false,
    "description": null,
    "archived": false,
    "name": "October sprint",
    "id": "103-403",
    "$type": "VersionBundleElement"
  },
  {
    "releaseDate": null,
    "released": false,
    "description": null,
    "archived": false,
    "name": "Unscheduled",
    "id": "103-404",
    "$type": "VersionBundleElement"
  },
  {
    "releaseDate": 1576367999999,
    "released": false,
    "description": null,
    "archived": false,
    "name": "v.1.0",
    "id": "103-406",
    "$type": "VersionBundleElement"
  },
  {
    "releaseDate": null,
    "released": false,
    "description": null,
    "archived": false,
    "name": "v.1.2",
    "id": "103-408",
    "$type": "VersionBundleElement"
  },
  {
    "releaseDate": null,
    "released": false,
    "description": null,
    "archived": false,
    "name": "v.2.0",
    "id": "103-411",
    "$type": "VersionBundleElement"
  },
  {
    "releaseDate": null,
    "released": false,
    "description": null,
    "archived": false,
    "name": "First sprint",
    "id": "103-417",
    "$type": "VersionBundleElement"
  }
]
```

## Add a New VersionBundleElement

Add a new version 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

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

|  null  |  The database ID of VersionBundleElement  |
| --- | --- |

### Request parameters

|  Parameter  |  Type  |  Description  |
| --- | --- | --- |
|  fields  |  String  |  A list of VersionBundleElement 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/version/59-8/values?fields=id,name,archived,released,releaseDate,description
```

#### Sample request body

```JSON
{
  "name": "v.3.0",
  "$type": "VersionBundleElement"
}
```

#### Sample response body

```JSON
{
  "releaseDate": null,
  "released": false,
  "description": null,
  "archived": false,
  "name": "v.3.0",
  "id": "103-518",
  "$type": "VersionBundleElement"
}
```

