How to retrieve custom field types using the Jira Cloud API or Jira Service Desk API

Using the Jira Service Desk REST API, you can retrieve the fields of a request as shown below.

    "requestFieldValues": [
        {
            "fieldId": "summary",
            "label": "Summary",
            "value": "Value"
        },
        {
            "fieldId": "customfield_10000",
            "label": "label",
            "value": [
                {
                    "self": "https://{yoursite}/rest/api/2/customFieldOption/{id}",
                    "value": "value",
                    "id": "id"
                }
            ]
        }

At this time, I want to know the types of these fields (e.g., Date Time Picker, Checkboxes, Select List (single choice), etc.). Is there an API that can easily accomplish this? Please advise, brother.

Hi @ko-shindo
The easiest way I know:

  1. Get all the available fields from ‘/rest/api/3/field’ (https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-fields/#api-rest-api-3-field-get).
  2. Find the field description by ‘fieldId’/‘id’.
  3. Use the ‘schema’ property to identify checkbox, time picker, or other types.
2 Likes

@AndreiPisklenov
Oh, that’s exactly what I was looking for. This will be a great help to me.
Thank you, brother.