REST API

Rest API Endpoint Documentation

This is the static documentation for the Customfield Editor for Jira's REST-API.

The baseUrl of the REST API might be one of the following URLs on your instance of Jira:

  • http[s]://server:port/jira/rest/jiracustomfieldeditorplugin/1.1/*
  • http[s]://server:port/rest/jiracustomfieldeditorplugin/1.1/*

You need to use Basic Authentication for every request to the API.

user-custom-field-operations

Creates a new option for the customfield.

consumes application/json produces application/json
Request Parameters
ParameterDescriptionData Type
customfieldidtype: path required: true

string default: customfield_12345
bodytype: body required: false

Don't set id and childOptions they will be ignored. Only set optionvalue and disabled. You should not set sequence, because you could damage the order of all options.
object
PropertyTypeDescription
childOptionsarray
array of object
PropertyTypeDescription
disabledboolean
idinteger
optionvaluestring
sequenceinteger
disabledboolean
idinteger
optionvaluestring
sequenceinteger
{
    "childOptions": [
        {
            "disabled": false,
            "id": 0,
            "optionvalue": "foo",
            "sequence": 0
        }
    ],
    "disabled": false,
    "id": 0,
    "optionvalue": "foo",
    "sequence": 0
}
Response Messages
StatusDescriptionSchema / JSON Example
200No response was specified
object
PropertyTypeDescription
childOptionsarray
array of object
PropertyTypeDescription
disabledboolean
idinteger
optionvaluestring
sequenceinteger
disabledboolean
idinteger
optionvaluestring
sequenceinteger
{
    "childOptions": [
        {
            "disabled": false,
            "id": 0,
            "optionvalue": "foo",
            "sequence": 0
        }
    ],
    "disabled": false,
    "id": 0,
    "optionvalue": "foo",
    "sequence": 0
}
400Validation Error for field.
object
PropertyTypeDescription
errorsarray
array of object
PropertyTypeDescription
exceptionNamestring
messagestring
namestring
{
    "errors": [
        {
            "exceptionName": "foo",
            "message": "foo",
            "name": "foo"
        }
    ]
}
401Unauthorized (no user is authenticated)
500User has no rights on customfield. Customfield with that ID does not exist. Or any other error.

list all options of a customfield. childOptions is optional and only present if the customfield's type is cascading field. You can try the api it is mocked for the customfieldId customfield_12345.

consumes application/json produces application/json
Request Parameters
ParameterDescriptionData Type
customfieldidtype: path required: true

string default: customfield_12345
Response Messages
StatusDescriptionSchema / JSON Example
200No response was specified
array of object
PropertyTypeDescription
childOptionsarray
array of object
PropertyTypeDescription
disabledboolean
idinteger
optionvaluestring
sequenceinteger
disabledboolean
idinteger
optionvaluestring
sequenceinteger
[
    {
        "childOptions": [
            {
                "disabled": false,
                "id": 0,
                "optionvalue": "foo",
                "sequence": 0
            }
        ],
        "disabled": false,
        "id": 0,
        "optionvalue": "foo",
        "sequence": 0
    }
]
401Unauthorized (no user is authenticated)
500User has no rights on customfield. Customfield with that ID does not exist. Or any other error.

Deletes an option of the customfield by its id.

consumes application/json produces application/json
Request Parameters
ParameterDescriptionData Type
customfieldidtype: path required: true

string default: customfield_12345
optionidtype: path required: true

integer default: 123
Response Messages
StatusDescriptionSchema / JSON Example
200No response was specified
object
PropertyTypeDescription
idstring
{
    "id": "foo"
}
401Unauthorized (no user is authenticated)
500User has no rights on customfield. Customfield with that ID does not exist. Or any other error.

Updates the value of an existing option for the customfield.

consumes application/json produces application/json
Request Parameters
ParameterDescriptionData Type
customfieldidtype: path required: true

string default: customfield_12345
optionidtype: path required: true

integer default: 123
bodytype: body required: false

If you set _sequence_ to a number, you will destroy the internal order of options. So do not set sequence directly, use the reorder request instead. If you set sequence, be sure to set it for all options. For example: You want alphabetic order and you set a new sequence value for every option starting from 0, you will be fine.
object
PropertyTypeDescription
childOptionsarray
array of object
PropertyTypeDescription
disabledboolean
idinteger
optionvaluestring
sequenceinteger
disabledboolean
idinteger
optionvaluestring
sequenceinteger
{
    "childOptions": [
        {
            "disabled": false,
            "id": 0,
            "optionvalue": "foo",
            "sequence": 0
        }
    ],
    "disabled": false,
    "id": 0,
    "optionvalue": "foo",
    "sequence": 0
}
Response Messages
StatusDescriptionSchema / JSON Example
200No response was specified
object
PropertyTypeDescription
childOptionsarray
array of object
PropertyTypeDescription
disabledboolean
idinteger
optionvaluestring
sequenceinteger
disabledboolean
idinteger
optionvaluestring
sequenceinteger
{
    "childOptions": [
        {
            "disabled": false,
            "id": 0,
            "optionvalue": "foo",
            "sequence": 0
        }
    ],
    "disabled": false,
    "id": 0,
    "optionvalue": "foo",
    "sequence": 0
}
400Validation Error for field.
object
PropertyTypeDescription
errorsarray
array of object
PropertyTypeDescription
exceptionNamestring
messagestring
namestring
{
    "errors": [
        {
            "exceptionName": "foo",
            "message": "foo",
            "name": "foo"
        }
    ]
}
401Unauthorized (no user is authenticated)
500User has no rights on customfield. Customfield with that ID does not exist. Or any other error.

Change order for existing option of customfield depending on values of RestfulTableMoveModel.

consumes application/json produces application/json
Request Parameters
ParameterDescriptionData Type
customfieldidtype: path required: true

string default: customfield_12345
optionidtype: path required: true

integer default: 123
bodytype: body required: true

Object containing move instructions. You either set **position**=First or set **after**=optionIdToMoveAfter. Don't set both, position will be used!
object
PropertyTypeDescription
afterstring
positionstring
{
    "after": "foo",
    "position": "foo"
}
Response Messages
StatusDescriptionSchema / JSON Example
200No response was specified
object
PropertyTypeDescription
childOptionsarray
array of object
PropertyTypeDescription
disabledboolean
idinteger
optionvaluestring
sequenceinteger
disabledboolean
idinteger
optionvaluestring
sequenceinteger
{
    "childOptions": [
        {
            "disabled": false,
            "id": 0,
            "optionvalue": "foo",
            "sequence": 0
        }
    ],
    "disabled": false,
    "id": 0,
    "optionvalue": "foo",
    "sequence": 0
}
400Validation Error for field.
object
PropertyTypeDescription
errorsarray
array of object
PropertyTypeDescription
exceptionNamestring
messagestring
namestring
{
    "errors": [
        {
            "exceptionName": "foo",
            "message": "foo",
            "name": "foo"
        }
    ]
}
401Unauthorized (no user is authenticated)
500User has no rights on customfield. Customfield with that ID does not exist. Or any other error.

Creates a new child-option on the parent-option for the customfield.

consumes application/json produces application/json
Request Parameters
ParameterDescriptionData Type
customfieldidtype: path required: true

string default: customfield_12345
parentoptionidtype: path required: true

integer default: 123
bodytype: body required: false

Don't set id and childOptions they will be ignored. Only set optionvalue and disabled. You should not set sequence, because you could damage the order of all options.
object
PropertyTypeDescription
childOptionsarray
array of object
PropertyTypeDescription
disabledboolean
idinteger
optionvaluestring
sequenceinteger
disabledboolean
idinteger
optionvaluestring
sequenceinteger
{
    "childOptions": [
        {
            "disabled": false,
            "id": 0,
            "optionvalue": "foo",
            "sequence": 0
        }
    ],
    "disabled": false,
    "id": 0,
    "optionvalue": "foo",
    "sequence": 0
}
Response Messages
StatusDescriptionSchema / JSON Example
200No response was specified
object
PropertyTypeDescription
childOptionsarray
array of object
PropertyTypeDescription
disabledboolean
idinteger
optionvaluestring
sequenceinteger
disabledboolean
idinteger
optionvaluestring
sequenceinteger
{
    "childOptions": [
        {
            "disabled": false,
            "id": 0,
            "optionvalue": "foo",
            "sequence": 0
        }
    ],
    "disabled": false,
    "id": 0,
    "optionvalue": "foo",
    "sequence": 0
}
400Validation Error for field.
object
PropertyTypeDescription
errorsarray
array of object
PropertyTypeDescription
exceptionNamestring
messagestring
namestring
{
    "errors": [
        {
            "exceptionName": "foo",
            "message": "foo",
            "name": "foo"
        }
    ]
}
401Unauthorized (no user is authenticated)
500User has no rights on customfield. Customfield with that ID does not exist. Or any other error.

Lists child-options of parent-option. childOptions will be empty.

consumes application/json produces application/json
Request Parameters
ParameterDescriptionData Type
customfieldidtype: path required: true

string default: customfield_12345
parentoptionidtype: path required: true

integer default: 123
Response Messages
StatusDescriptionSchema / JSON Example
200No response was specified
array of object
PropertyTypeDescription
childOptionsarray
array of object
PropertyTypeDescription
disabledboolean
idinteger
optionvaluestring
sequenceinteger
disabledboolean
idinteger
optionvaluestring
sequenceinteger
[
    {
        "childOptions": [
            {
                "disabled": false,
                "id": 0,
                "optionvalue": "foo",
                "sequence": 0
            }
        ],
        "disabled": false,
        "id": 0,
        "optionvalue": "foo",
        "sequence": 0
    }
]
401Unauthorized (no user is authenticated)
500User has no rights on customfield. Customfield with that ID does not exist. Or any other error.

Deletes an child-option of an parent-option of the customfield by its id.

consumes application/json produces application/json
Request Parameters
ParameterDescriptionData Type
customfieldidtype: path required: true

string default: customfield_12345
parentoptionidtype: path required: true

integer default: 123
childoptionidtype: path required: true

integer default: 334
Response Messages
StatusDescriptionSchema / JSON Example
200No response was specified
object
PropertyTypeDescription
idstring
{
    "id": "foo"
}
401Unauthorized (no user is authenticated)
500User has no rights on customfield. Customfield with that ID does not exist. Or any other error.

Updates the value of an existing child-option of a parent-option for the customfield.

consumes application/json produces application/json
Request Parameters
ParameterDescriptionData Type
customfieldidtype: path required: true

string default: customfield_12345
parentoptionidtype: path required: true

integer default: 123
childoptionidtype: path required: true

integer default: 334
bodytype: body required: false

If you set _sequence_ to a number, you will destroy the internal order of options. So do not set sequence directly, use the reorder request instead. If you set sequence, be sure to set it for all options. For example: You want alphabetic order and you set a new sequence value for every option starting from 0, you will be fine.
object
PropertyTypeDescription
childOptionsarray
array of object
PropertyTypeDescription
disabledboolean
idinteger
optionvaluestring
sequenceinteger
disabledboolean
idinteger
optionvaluestring
sequenceinteger
{
    "childOptions": [
        {
            "disabled": false,
            "id": 0,
            "optionvalue": "foo",
            "sequence": 0
        }
    ],
    "disabled": false,
    "id": 0,
    "optionvalue": "foo",
    "sequence": 0
}
Response Messages
StatusDescriptionSchema / JSON Example
200No response was specified
object
PropertyTypeDescription
childOptionsarray
array of object
PropertyTypeDescription
disabledboolean
idinteger
optionvaluestring
sequenceinteger
disabledboolean
idinteger
optionvaluestring
sequenceinteger
{
    "childOptions": [
        {
            "disabled": false,
            "id": 0,
            "optionvalue": "foo",
            "sequence": 0
        }
    ],
    "disabled": false,
    "id": 0,
    "optionvalue": "foo",
    "sequence": 0
}
400Validation Error for field.
object
PropertyTypeDescription
errorsarray
array of object
PropertyTypeDescription
exceptionNamestring
messagestring
namestring
{
    "errors": [
        {
            "exceptionName": "foo",
            "message": "foo",
            "name": "foo"
        }
    ]
}
401Unauthorized (no user is authenticated)
500User has no rights on customfield. Customfield with that ID does not exist. Or any other error.

Change order for existing child-option of parent-option of customfield depending on values of RestfulTableMoveModel.

consumes application/json produces application/json
Request Parameters
ParameterDescriptionData Type
customfieldidtype: path required: true

string default: customfield_12345
parentoptionidtype: path required: true

integer default: 123
childoptionidtype: path required: true

integer default: 334
bodytype: body required: true

Object containing move instructions. You either set **position**=First or set **after**=optionIdToMoveAfter. Don't set both, position will be used!
object
PropertyTypeDescription
afterstring
positionstring
{
    "after": "foo",
    "position": "foo"
}
Response Messages
StatusDescriptionSchema / JSON Example
200No response was specified
object
PropertyTypeDescription
childOptionsarray
array of object
PropertyTypeDescription
disabledboolean
idinteger
optionvaluestring
sequenceinteger
disabledboolean
idinteger
optionvaluestring
sequenceinteger
{
    "childOptions": [
        {
            "disabled": false,
            "id": 0,
            "optionvalue": "foo",
            "sequence": 0
        }
    ],
    "disabled": false,
    "id": 0,
    "optionvalue": "foo",
    "sequence": 0
}
400Validation Error for field.
object
PropertyTypeDescription
errorsarray
array of object
PropertyTypeDescription
exceptionNamestring
messagestring
namestring
{
    "errors": [
        {
            "exceptionName": "foo",
            "message": "foo",
            "name": "foo"
        }
    ]
}
401Unauthorized (no user is authenticated)
500User has no rights on customfield. Customfield with that ID does not exist. Or any other error.