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:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 { "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" } ] }




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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 { "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": [] } ] }




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

1 2 3 { "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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 { "schemeOptions":[ { "id": 10006, "name":"Select List (multiple choices) Value 1", "position": 1, "disabled": false }, { "id": 10007, "name":"Select List (multiple choices) Value 2", "postion": 2, "disabled": true } ] }
  • Example for cascading field (Select list (cascading))

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 { "schemeOptions":[ { "id": 10008, "name":"Select List (cascading) Parent Value 1", "postion": 1, "disabled": false, "childOptions":[ { "parentId": 10008, "name":"Select List (cascading) Children Parent 1 Value 1", "postion": 1, "id": 10010, "disabled": false }, { "parentId": 10008, "name":"Select List (cascading) Children Parent 1 Value 2", "postion": 2, "id": 10011, "disabled": false }, { "parentId": 10008, "name":"Select List (cascading) Children Parent 1 Value 3", "postion": 3, "id": 10012, "disabled": false } ] }, { "id": 10009, "name":"Select List (cascading) Parent Value 2", "postion": 2, "disabled": true, "childOptions":[ { "parentId": 10009, "name":"Select List (cascading) Children Parent 2 Value 1", "postion": 1, "id": 10013, "disabled": false }, { "parentId": 10009, "name":"Select List (cascading) Children Parent 2 Value 2", "postion": 2, "id": 10014, "disabled": false } ] } ] }




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)

1 2 3 { "optionName": ["New option"] }
  • Example for several values (Single List fields)

1 2 3 { "optionName": ["New option 1", "New Option 2", "New Option 3"] }
  • Example for one value (Cascading fields)

1 2 3 4 { "parentId": 10105, "optionName": ["New option 1"] }
  • Example for several values (Cascading fields)

1 2 3 4 { "parentId": 10105, "optionName": ["New option 1", "New Option 2", "New Option 3"] }

Response format - JSON

Example response

1 2 3 4 { "message": "values 'New value 1', 'New value 2' added to 10104 config scheme id", "status": "done" }



1 2 3 4 { "message": "scheme config does not exist", "status": "done" }




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

1 2 3 4 5 6 { "parentId": 10303, "disabled" : true, "name": "New name", "position": 10 }
  • Disable value in field

1 2 3 { "disabled" : true }
  • Rename value in Cascading field

1 2 3 4 { "parentId": 10105, "name": "New name - child" }
  • Change value position

1 2 3 { "position": 14 }
  • 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

1 2 3 4 { "message": "option '10307' changed (state: enabled, name: New name, position: 1)", "status": "done" }




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

1 2 3 { "optionId": [10013] }
  • Example for several values

1 2 3 { "optionId": [10013, 10014] }

Response format - JSON

Example response

1 2 3 4 5 6 7 8 { "message": "all options deleted", "skipped": [], "deleted": [ "10013", "10014" ] }



1 2 3 4 5 6 7 { "message": "options deleted, some options skipped", "skipped": [ "1001300000" ], "deleted": [] }




Add custom fields

Method type - PUT

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

Request format - JSON

Example request (all parameters)

1 2 3 4 5 6 7 8 9 { "fieldName": "FIELD NAME", "fieldDescription": "FIELD DESCRIPTION", "fieldTypeKey": "FIELD TYPE KEY", "schemeName": "FIELD CONFIG SCHEME NAME", "schemeDescription": "FIELD CONFIG SCHEME DESCRIPTION", "issueTypes": ["ISSUE_TYPE_NAME", "ISSUE_TYPE_ID"], "projects": ["PROJECT_KEY", "PROJECT_ID"] }
  • 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)

Response format - JSON

Example response

1 2 3 4 5 { "customFieldId": "customfield_10008", "configSchemeId": 10109, "message": "custom field 'Field3' created" }




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

1 2 3 { "customField": ["FELD_NAME"] }
  • Example for several custom fields

1 2 3 { "customField": ["FELD_NAME", "FIELD_ID"]; }

Response format - JSON

1 2 3 4 5 { "message": "custom fields deleted", "skipped": [], "deleted": ["Field Number Two (customfield_10004)"] }



1 2 3 4 5 { "message": "custom fields deleted, some custome fields skipped", "skipped": ["10001"], "deleted": ["Field Number One"] }




Add custom fields schemes

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)

1 2 3 4 5 6 { "schemeName": "FIELD CONFIG SCHEME NAME", "schemeDescription": "FIELD CONFIG SCHEME DESCRIPTION", "issueTypes": ["ISSUE_TYPE_NAME", "ISSUE_TYPE_ID"], "projects": ["PROJECT_KEY", "PROJECT_ID"] }
  • 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

1 2 3 4 { "message": "config scheme id '10100' created for field '{CUTOME_FIELD_NAME}'", "configSchemeId": 10100 }




Update custom fields schemes

Method type - PUT

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

  • where {configSchemeId} is config scheme id

Request format - JSON

Example request

  • Example (all parameters)

1 2 3 4 5 { "schemeName": "FIELD CONFIG SCHEME NAME", "schemeDescription": "FIELD CONFIG SCHEME DESCRIPTION", "projects": ["PROJECT_KEY", "PROJECT_ID"] }
  • 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 - default value (all projects)

Response format - JSON

Example response

1 2 3 { "message": "config scheme id '10100' was changed" }




Get custom fields types

Method type - GET

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

Response format - JSON

Example response

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 { "customFieldTypes": [ { "name": "Approvals", "description": "Provides search options for Jira Service Management approvals information. This custom field is created programmatically and required by Jira Service Management.", "descriptorKey": "sd-approvals", "key": "com.atlassian.servicedesk.approvals-plugin:sd-approvals", }, { "name": "Bug Import Id", "description": "A read-only custom field that points back to the previously imported bug id.", "descriptorKey": "bug-importid", "key": "com.atlassian.jira.plugins.jira-importers-plugin:bug-importid", }, { "name": "Checkboxes", "description": "Choose multiple values using checkboxes.", "descriptorKey": "multicheckboxes", "key": "com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes", } ] }

 


Changes

Since v. 1.1.1

  • Get values for custom field configuration scheme - added flag “disabled” (true/false) for options

Since v. 1.5.0

  • New API - Delete custom fields

Since v. 1.6.0

  • New APIs - Add custom fields, Add custom fields schemes, Update custom fields schemes, Get custom fields types

Since v. 1.65.*

  • Get all custom fields informations - added “lastValueUpdate” and “issuesWithValue” value for Jira Data Center >= 8.16

Since v. 1.7.2

  • Get configuration scheme for custom field - added value “associatedProjects” and "issueTypes" for config scheme

Since v. 1.7.3

  • New API - Remove configuration scheme for custom field

Since v. 2.20.*

  • New API - Change values in custom field configuration scheme

  • Get values for custom field configuration scheme - added “position” value

  • Get all custom fields informations - added “description” value

  • Get configuration scheme for custom field - added “description” value

  • Get custom fields types - added “descriptorKey” value

  • Some fields in the JSON request / response in all APIs have been changed

    • id (string) → id (integer)

    • id for issue types Global (all issues)global (string)

    • parent_id (string) → parentId (integer)

    • disabled (string) → disabled (boolean)

    • parentOptionId (string) → parentId (integer)

    • configSchemeId (string) → configSchemeId (integer)