Custom fields

General information

All REST APIs for custom fields are ONLY available for Jira Administrators


Get all custom fields information

Method type: GET

URL: {JIRA_URL}/rest/extender/1.0/customField/all

Respons format: JSON

Example response:

{ "customFields":[ { "issuesWithValue": 0, "lastValueUpdate": "never", //String value when never updated "name":"Checkboxes", "id": 10000, "type":"Checkboxes", "key":"com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes" }, { "issuesWithValue": 900, "lastValueUpdate": 1234567890, //timestamp value "name":"Radio Buttons", "id": 10001, "type":"Radio Buttons", "key":"com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons" }, { "issuesWithValue": 0, "lastValueUpdate": "never", "name":"Select List (cascading)", "id": 10004, "type":"Select List (cascading)", "key":"com.atlassian.jira.plugin.system.customfieldtypes:cascadingselect" }, { "issuesWithValue": 0, "lastValueUpdate": "never", "name":"Select List (multiple choices)", "id": 10003, "type":"Select List (multiple choices)", "key":"com.atlassian.jira.plugin.system.customfieldtypes:multiselect" }, { "issuesWithValue": 0, "lastValueUpdate": "never", "name":"Select List (single choice)", "id": 10002, "type":"Select List (single choice)", "key":"com.atlassian.jira.plugin.system.customfieldtypes:select" } ], "startAt": 0, "total": 10, "maxResults": 100 }




Get configuration scheme for custom field

Method type - GET

URL: {JIRA_URL}/rest/extender/1.0/customField/configScheme/field/{customFieldId}

  • where {customFieldId} is custom field id

Example URL: {JIRA_URL}/rest/extender/1.0/customField/configScheme/field/10003

Respons format: JSON

Example response

{ "customFieldSchemes":[ { "name":"Default Configuration Scheme for Select List (multiple choices)", "description":"Example description", "id": 10104, "associatedProjects": [], "issueTypes": [ { "name": "Global (all issues)", "id": "global" } ] }, { "name":"Configuration Scheme for Select List", "description":"Example description", "id": 10105, "associatedProjects": [], "issueTypes": [ { "name": "Epic", "id": "10000" }, { "name": "Task", "id": "10002" } ] }, { "name":"Another configuration scheme",, "description":"Example description", "id": 10106, "associatedProjects": [ { "name": "PB", "id": 10001, "key": "PB" } ], "issueTypes": [] } ], "startAt": 0, "total": 10, "maxResults": 100 }




Remove configuration scheme for custom field

Method type - DELETE

URL: {JIRA_URL}/rest/extender/1.0/customField/removeConfigScheme/{configSchemeId}

  • where {configSchemeId} is custom field configuration scheme

Example URL: {JIRA_URL}/rest/extender/1.0/customField/removeConfigScheme/10102

Response format - JSON

Example response

{ "message": "config scheme '10102' deleted" }




Get values for custom field configuration scheme

Method type - GET

URL: {JIRA_URL}/rest/extender/1.0/customField/configScheme/getValue/{configSchemeId}

  • where {configSchemeId} is custom field configuration scheme

Example URL: {JIRA_URL}/rest/extender/1.0/customField/configScheme/getValue/10104

Response format - JSON

Example response

  • Example for standard fields (Radio buttons, Select list (sings/multiple choices), Checkboxes

  • Example for cascading field (Select list (cascading))




Add values into custom field configuration scheme

Method type - POST

URL: {JIRA_URL}/rest/extender/1.0/customField/configScheme/addValue/{configSchemeId}

  • where {configSchemeId} is custom field configuration scheme

Request format - JSON

Example request

  • Example for one value (Single List fields)

  • Example for several values (Single List fields)

  • Example for one value (Cascading fields)

  • Example for several values (Cascading fields)

Response format - JSON

Example response






Change values in custom field configuration scheme

Method type - POST

URL: {JIRA_URL}/rest/extender/1.0/customField/configScheme/editValue/{configSchemeId}/option/{optionId}

  • where {configSchemeId} is custom field configuration scheme

  • where {optionId} is custom field value id to change

Request format - JSON

Example request

  • All parameters

  • Disable value in field

  • Rename value in Cascading field

  • Change value position

  • parentId - optional - only used in cascading fields when you need to change the value in the second checkbox

  • disable - optional - (true/false) - disable or enable field value

  • name - optional - a new name for the value if you want to change it

  • position - optional - number <1, ∞) - field value position on list

Response format - JSON

Example response




Remove values from custom field configuration scheme

Method type - POST

URL: {JIRA_URL}/rest/extender/1.0/customField/configScheme/removeValue

Request format - JSON

Example request

  • Example for one value

  • Example for several values

Response format - JSON

Example response






Add custom fields

Method type - PUT

URL: {JIRA_URL}/rest/extender/1.0/customField/addCustomField

Request format - JSON

Example request (all parameters)

  • fieldName - required

  • fieldDescription - required

  • fieldTypeKey - required - uniq field type key; you can get all keys from Get custom fields types

  • schemeName - optional - custom field configuration scheme name - default value ("Default Configuration Scheme for {CUSTOM_FIELD_NAME}")

  • schemeDescription - optional - custom field configuration scheme description - default value ("Default configuration scheme generated by Extender for JIRA")

  • issueTypes - optional - issue types for field context - default value ("Global (all issues)")

  • projects - optional - project for field context - default value (all projects)

  • optionNames - optional - adding options to the field if they are supported

Response format - JSON

Example response




Delete custom fields

Deleting several custom fields at once can take a long time or slow down the application

Method type - DELETE

URL: {JIRA_URL}/rest/extender/1.0/customField/deleteCustomField

Request format - JSON

Example request

  • Example for one custom field

  • Example for several custom fields

Response format - JSON






Clear custom field schemes

API clears configurations of contexts that do not have any project mapping (global context is skipped).

Example context that will be removed:

Method type - DELETE

URL: {JIRA_URL}/rest/extender/1.0/customField/clearConfigSchemes/{customFieldId}

  • where {customFieldId} is custom field id

  • where {customFieldId} takes the value all for all custom fields

Example URL:

  • {JIRA_URL}/rest/extender/1.0/customField/clearConfigSchemes/10100

  • {JIRA_URL}/rest/extender/1.0/customField/clearConfigSchemes/all

Remember, in the case of executing the API for all custom fields, the execution time may be significantly longer

Response format - JSON

Example response

 


Add custom fields scheme

Method type - PUT

URL: {JIRA_URL}/rest/extender/1.0/customField/addConfigScheme/{customFieldId}

  • where {customFieldId} is custom field id

Request format - JSON

Example request

  • Example (all parameters)

  • schemeName - optional - custom field configuration scheme name - default value ("Default Configuration Scheme for {CUSTOM_FIELD_NAME}")

  • schemeDescription - optional - custom field configuration scheme description - default value ("Default configuration scheme generated by Extender for JIRA")

  • issueTypes - optional - issue types for field context - default value ("Global (all issues)")

  • projects - optional - project for field context - default value (all projects)

Response format - JSON

Example response

 


Add custom fields schemes in bulk

Method type - PUT

URL: {JIRA_URL}/rest/extender/1.0/customField/addConfigSchemes/{customFieldId}

  • where {customFieldId} is custom field id

Request format - JSON

Example request

  • Example (all parameters)

  • schemeName - optional - custom field configuration scheme name - default value ("Default Configuration Scheme for {CUSTOM_FIELD_NAME}")

  • schemeDescription - optional - custom field configuration scheme description - default value ("Default configuration scheme generated by Extender for JIRA")

  • issueTypes - required - array containing issue types configuration arrays for all contexts - default value for empty array ("Global (all issues)")

  • projects - required - array containing projects configuration arrays for all contexts - default value for empty array (all projects)

  • optionName - required - array containing arrays with option names for all contexts - leave array empty if field does not support options

Response format - JSON

Example response

 

Example API call:

Result:

 


Update custom fields schemes

Method type - PUT

URL: {JIRA_URL}/rest/extender/1.0/customField/updateConfigScheme/{configSchemeId}

URL: {JIRA_URL}/rest/extender/1.0/customField/updateConfigScheme/{configSchemeId}?keepExistingConfigurations=true

  • where {configSchemeId} is config scheme id

Request format - JSON

Example request

  • Example (all parameters)

  • schemeName - optional - custom field configuration scheme name - default value ("Default Configuration Scheme for {CUSTOM_FIELD_NAME}")

  • schemeDescription - optional - custom field configuration scheme description - default value ("Default configuration scheme generated by Extender for JIRA")

  • projects - optional - project for field context

    • Request without this parameter - API skips changes in project contexts

    • Request with empty array - API clear project contexts (set global for all project)

    • Request with non empty array and param keepExistingConfigurations - API will add the indicated projects to the existing configuration of project contexts

    • Request with non empty array and without param keepExistingConfigurations - API will overwrite the configuration only with the selected projects

  • issueTypes - optional - project for field context

    • Request without this parameter - API skips changes in issue type contexts

    • Request with empty array - API clear issue type contexts (set global for all project)

    • Request with non empty array and param keepExistingConfigurations - API will add the indicated issue types to the existing configuration of issue type contexts

    • Request with non empty array and without param keepExistingConfigurations - API will overwrite the configuration only with the selected issue types

Response format - JSON

Example response

Parameters

  • keepExistingConfigurations - optional - (true or empty) - sets the API working mode, whether new projects and request types are to be added to the current configuration or replaced

 


Update all custom fields schemes at once

Method type - PUT

URL: {JIRA_URL}/rest/extender/1.0/updateAllConfigSchemes/field/{customFieldId}

URL: {JIRA_URL}/rest/extender/1.0/updateAllConfigSchemes/field/{customFieldId}?keepExistingConfigurations=true

  • where {customFieldId} is custom field id

Request format - JSON

Example request

  • Example (all parameters)

  • schemeName - optional - custom field configuration scheme name - default value ("Default Configuration Scheme for {CUSTOM_FIELD_NAME}")

  • schemeDescription - optional - custom field configuration scheme description - default value ("Default configuration scheme generated by Extender for JIRA")

  • projects - optional - project for field context

    • Request without this parameter - API skips changes in project contexts

    • Request with empty array - API clear project contexts (set global for all project)

    • Request with non empty array and param keepExistingConfigurations - API will add the indicated projects to the existing configuration of project contexts

    • Request with non empty array and without param keepExistingConfigurations - API will overwrite the configuration only with the selected projects

  • issueTypes - optional - project for field context

    • Request without this parameter - API skips changes in issue type contexts

    • Request with empty array - API clear issue type contexts (set global for all project)

    • Request with non empty array and param keepExistingConfigurations - API will add the indicated issue types to the existing configuration of issue type contexts

    • Request with non empty array and without param keepExistingConfigurations - API will overwrite the configuration only with the selected issue types

Response format - JSON

Example response

Parameters

  • keepExistingConfigurations - optional - (true or empty) - sets the API working mode, whether new projects and request types are to be added to the current configuration or replaced

 


Get custom fields types

Method type - GET

URL: {JIRA_URL}/rest/extender/1.0/customField/customFieldTypes

Response format - JSON

Example response

 


Get screens where a custom field appears

Method type - GET

URL: {JIRA_URL}/rest/extender/1.0/customField/screen/field/{customFieldId}

  • where {customFieldId} is custom field id

Example URL: {JIRA_URL}/rest/extender/1.0/customField/screen/field/10118

Respons format: JSON

Example response

 


Pagination

This REST API uses pagination to improve performance for all Jira users. Pagination is enforced for methods that could return a large collection of items. When you make a request to a paged API, the response will wrap the returned array of values in a JSON object with paging metadata, for example:

Where:

  • startAt is the index of the first item returned in the page of results.

  • maxResults is the maximum number of items that can be returned per page. Each API endpoint may have a different limit for the number of items returned, and these limits may change without notice. (default value - 1000)

  • total is the total number of items contained in all pages. This number may change as the client requests the subsequent pages, therefore the client should always assume that the requested page can be empty.

 


Changes