Developer Portal for YouTrack and Hub Help

Values in the Owned Bundle

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

Resource

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

Returned entity

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

Supported methods

OwnedBundleElement attributes

Represents a single owned value of a set. For example, a subsystem.

Related Resources

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

Extends BundleElement

Attributes

This table describes attributes of the OwnedBundleElement 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 owned value. Read-only.

owner

User

The user who is associated with the 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 List of OwnedBundleElements

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

Request syntax

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

Request parameters

Parameter

Type

Description

fields

String

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

Sample

Sample request

https://example.youtrack.cloud/api/admin/customFieldSettings/bundles/ownedField/83-0/values?fields=id,name,owner(id,login,fullName)

Sample response body

[ { "owner": { "fullName": "John Smith", "login": "john.smith", "id": "24-2", "$type": "User" }, "name": "Testing", "id": "148-6", "$type": "OwnedBundleElement" }, { "owner": { "fullName": "Jane Doe", "login": "jane.doe", "id": "24-0", "$type": "User" }, "name": "Documentation", "id": "148-7", "$type": "OwnedBundleElement" }, { "owner": { "fullName": "John Smith", "login": "john.smith", "id": "24-2", "$type": "User" }, "name": "Development", "id": "148-18", "$type": "OwnedBundleElement" } ]

Add a New OwnedBundleElement

Add a new owned value 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

POST /api/admin/customFieldSettings/bundles/ownedField/{bundleID}/values?{fields}

Request parameters

Parameter

Type

Description

fields

String

A list of OwnedBundleElement 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/ownedField/83-0/values?fields=id,name,owner(id,login,fullName)

Sample request body

{ "owner": { "login": "john.smith", "id": "24-2" }, "name": "Release" }

Sample response body

{ "owner": { "fullName": "John Smith", "login": "john.smith", "id": "24-2", "$type": "User" }, "name": "Release", "id": "148-36", "$type": "OwnedBundleElement" }
Last modified: 7 November 2024