Developer Portal for YouTrack and Hub Help

Project Custom Fields

This resource lets you read a so called instances of the custom fields - settings of the custom field in each project that uses it.

Resource

/api/admin/customFieldSettings/customFields/{fieldID}/instances

Returned entity

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

Supported methods

ProjectCustomField attributes

Represents settings for custom fields in a particular project.

Related Resources

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

Attributes

This table describes attributes of the ProjectCustomField 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 project custom field. Read-only.

field

CustomField

The custom field in the project. Read-only. Can be null.

project

Project

The project where the custom field belongs. Read-only. Can be null.

canBeEmpty

Boolean

If true, the custom field can have empty value, otherwise false.

emptyFieldText

String

The text that is shown as a placeholder when the custom field has an empty value. Can be null.

ordinal

Int

The position number of this field on the list of project custom fields.

isPublic

Boolean

If true, the basic Read Issue and Update Issue permissions are sufficient to access this field. If false, the Read Issue Private Fields and Update Issue Private Fields permissions are required.

hasRunningJob

Boolean

If true, there is a background job running for this field. In this case, some field operations may be temporary inaccessible. Read-only.

condition

CustomFieldCondition

The condition for showing the custom field. Can be null.

Read a List of ProjectCustomFields

Get all project related settings of this custom field. Basically, this method lets you see in which projects this custom field is used.

Request syntax

GET /api/admin/customFieldSettings/customFields/{fieldID}/instances?{fields}&{$top}&{$skip}

Request parameters

Parameter

Type

Description

fields

String

A list of ProjectCustomField 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/customFields/58-8/instances?fields=field(name,id),project(id,name),canBeEmpty,emptyFieldText,isPublic,ordinal

Sample response body

[ { "emptyFieldText": "No due date", "project": { "name": "Sandbox", "id": "0-3", "$type": "Project" }, "ordinal": 0, "canBeEmpty": true, "isPublic": true, "field": { "name": "Due Date", "id": "58-8", "$type": "CustomField" }, "$type": "SimpleProjectCustomField" } ]
Last modified: 15 March 2024