YouTrack Standalone 2020.3 Help

Operations with Specific ProjectCustomField

This resource lets you access and configure custom fields in the specific project.

Resource

/api/admin/projects/{projectID}/customFields/{fieldID}

Returned entity

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

Supported methods

ProjectCustomField attributes

Represents custom field settings for the particular project.

This table describes attributes of the ProjectCustomField entity.

  • To receive an attribute in the response from server, specify it explicitly in the request parameter fields.

  • To update an attribute, provide it in the body of a POST request.

Field

Type

Description

field

CustomField

Custom field which project settings are described. Read-only. Can be null.

project

Project

Project to which custom field belongs. Read-only. Can be null.

canBeEmpty

Boolean

If true, this field can have empty value in the issue, otherwise false.

emptyFieldText

String

Text that is shown as a placeholder when field is empty. Can be null.

ordinal

Int

Number of this field in project.

isPublic

Boolean

If true, issue public read/update are sufficient for accessing this field, otherwise private read/update are required.

hasRunningJob

Boolean

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

Update a Specific ProjectCustomField

Change settings of the specific custom field in the project.

Required permissions

Requires Update Project permission.

Request syntax

POST /api/admin/projects/{projectID}/customFields?{fields}

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

Sample

Sample request URI

https://example.myjetbrains.com/youtrack/api/admin/projects/0-0/fields/92-4?fields=id,bundle(id,isUpdateable,name,values(archived,releaseDate,released,id,name)),canBeEmpty,emptyFieldText,field(name,aliases,id,isAutoAttached,isDisplayedInIssueList,isPublic,isUpdateable),project(id,name)

Sample request body

{ "emptyFieldText": "No version" }

Sample response body

{ "bundle": { "values": [ { "releaseDate": 1548936000000, "released": false, "archived": false, "name": "2019.1", "id": "133-19", "$type": "VersionBundleElement" } ], "isUpdateable": true, "name": "Sample Project: Versions", "id": "71-1", "$type": "VersionBundle" }, "field": { "aliases": "fix for, fixed in, fix version, version", "isAutoAttached": true, "isDisplayedInIssueList": true, "isUpdateable": true, "name": "Fix versions", "id": "58-5", "$type": "CustomField" }, "canBeEmpty": true, "project": { "name": "Sample Project", "id": "0-0", "$type": "Project" }, "emptyFieldText": "No version", "id": "92-4", "$type": "VersionProjectCustomField" }

Read a Specific ProjectCustomField

Get settings of the specific custom field in the project.

Required permissions

  • If the field is public, requires Create Issue OR Read Issue permission.

  • If the field is private, requires Read Issue Private Fields permission.

Request syntax

GET /api/admin/projects/{projectID}/customFields?{fields}

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

Sample

Sample request URI

https://example.myjetbrains.com/youtrack/api/admin/projects/0-0/fields/92-4?fields=id,name,aliases,bundle(id,isUpdateable,name,values(archived,releaseDate,released,id,name)),canBeEmpty,emptyFieldText,field(name,id,isAutoAttached,isDisplayedInIssueList,isPublic,isUpdateable),project(id,name)

Sample response body

{ "bundle": { "values": [ { "releaseDate": 1548936000000, "released": false, "archived": false, "name": "2019.1", "id": "133-19", "$type": "VersionBundleElement" } ], "isUpdateable": true, "name": "Sample Project: Versions", "id": "71-1", "$type": "VersionBundle" }, "field": { "isAutoAttached": true, "isDisplayedInIssueList": true, "isUpdateable": true, "name": "Fix versions", "id": "58-5", "$type": "CustomField" }, "canBeEmpty": true, "project": { "name": "Sample Project", "id": "0-0", "$type": "Project" }, "emptyFieldText": "Unscheduled", "id": "92-4", "$type": "VersionProjectCustomField" }

Delete a Specific ProjectCustomField

Remove the specific custom field from the project.

Required permissions

Requires Update Project permission.

Request syntax

DELETE /api/admin/projects/{projectID}/customFields

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

Sample

Sample request URI

https://example.myjetbrains.com/youtrack/api/admin/projects/0-0/fields/92-35
Last modified: 28 October 2020