# JQL autocomplete data and suggestions in the Jira REST API

URL: https://goingstellar.ro/reference/atlassian-rest-api/jql-autocomplete/

Two read-only endpoints feed a JQL editor. /jql/autocompletedata returns every field name with its operators, every function and the reserved words. /jql/autocompletedata/suggestions completes one value for a field, for example the statuses that start with To.

## Endpoints

| Method | Path | What it does |
|---|---|---|
| GET | `/rest/api/3/jql/autocompletedata` | Returns visible field names, functions and reserved words. |
| GET | `/rest/api/3/jql/autocompletedata/suggestions` | Returns value suggestions for a field. |
| POST | `/rest/api/3/jql/parse` | Validates JQL. |

## Examples

### GET /rest/api/3/jql/autocompletedata

Reads the full reference data. The excerpt shows the first two fields and the shape of each entry.

```bash
curl \
  -u "you@example.com:$ATLASSIAN_API_TOKEN" \
  -H 'Accept: application/json' \
  'https://your-domain.atlassian.net/rest/api/3/jql/autocompletedata'
```

```python
import os
import requests

EMAIL = "you@example.com"
r = requests.get(
    'https://your-domain.atlassian.net/rest/api/3/jql/autocompletedata',
    auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
    headers={'Accept': 'application/json'},
)
print(r.status_code, r.text)
```

Response: HTTP 200

```
{
 "visibleFieldNames": [
  {
   "value": "\"[CHART] Date of First Response\"",
   "displayName": "[CHART] Date of First Response - cf[10026]",
   "orderable": "true",
   "searchable": "true",
   "cfid": "cf[10026]",
   "operators": [
    "=",
    "!=",
    "in",
    "not in",
    "is",
    "is not",
    "<",
    "<=",
    ">",
    ">="
   ],
   "types": [
    "java.util.Date"
   ]
  },
  {
   "value": "\"[CHART] Time in Status\"",
   "displayName": "[CHART] Time in Status - cf[10027]",
   "orderable": "true",
   "searchable": "true",
   "cfid": "cf[10027]",
   "operators": [
    "~",
    "!~",
    "is",
    "is not"
   ],
   "types": [
    "java.lang.String"
   ]
  }
 ],
 "visibleFunctionNames": [
  {
   "value": "approved()",
   "displayName": "approved()"
  },
  {
   "value": "approver(\"\")",
   "displayName": "approver(\"\")"
  }
 ],
 "jqlReservedWords": [
  "fetch",
  "function"
 ]
}
```

Response headers:

```
X-Ratelimit-Limit: 350
```

Sent to Atlassian Cloud on 29 Nov 2026.

### GET /rest/api/3/jql/autocompletedata/suggestions

Asks for values of status that contain To. The match is wrapped in bold tags in displayName.

```bash
curl -G \
  -u "you@example.com:$ATLASSIAN_API_TOKEN" \
  -H 'Accept: application/json' \
  --data-urlencode 'fieldName=status' \
  --data-urlencode 'fieldValue=To' \
  'https://your-domain.atlassian.net/rest/api/3/jql/autocompletedata/suggestions'
```

```python
import os
import requests

EMAIL = "you@example.com"
r = requests.get(
    'https://your-domain.atlassian.net/rest/api/3/jql/autocompletedata/suggestions',
    auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
    headers={'Accept': 'application/json'},
    params={'fieldName': 'status', 'fieldValue': 'To'},
)
print(r.status_code, r.text)
```

Response: HTTP 200

```
{
 "results": [
  {
   "value": "\"To Do\"",
   "displayName": "<b>To</b> Do"
  }
 ]
}
```

Sent to Atlassian Cloud on 29 Nov 2026.

### POST /rest/api/3/jql/parse

Validates a query that uses the field and value learned from the suggestions.

```bash
curl -X POST \
  -u "you@example.com:$ATLASSIAN_API_TOKEN" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data '{
  "queries": [
    "project = WEB AND status = Done",
    "project = "
  ]
}' \
  'https://your-domain.atlassian.net/rest/api/3/jql/parse?validation=strict'
```

```python
import os
import requests

EMAIL = "you@example.com"
r = requests.post(
    'https://your-domain.atlassian.net/rest/api/3/jql/parse?validation=strict',
    auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
    headers={'Accept': 'application/json'},
    params={'validation': 'strict'},
    json={'queries': ['project = WEB AND status = Done', 'project = ']},
)
print(r.status_code, r.text)
```

Response: HTTP 200

```
{
 "queries": [
  {
   "query": "project = WEB AND status = Done",
   "structure": {
    "where": {
     "clauses": [
      {
       "field": {
        "name": "project",
        "encodedName": "project"
       },
       "operator": "=",
       "operand": {
        "value": "WEB",
        "encodedValue": "WEB"
       }
      },
      {
       "field": {
        "name": "status",
        "encodedName": "status"
       },
       "operator": "=",
       "operand": {
        "value": "Done",
        "encodedValue": "Done"
       }
      }
     ],
     "operator": "and"
    }
   }
  }
 ]
}
```

Sent to Atlassian Cloud on 29 Nov 2026.

## How it behaves

- The data call returned 184 field names, 67 function names and 178 reserved words on this instance. The field list includes entries added by installed apps, such as "[CHART] Date of First Response".
- Each field entry has value (already quoted when the name needs it), displayName with the custom field id appended, orderable, searchable, the operators it accepts and its Java types.
- The suggestion for fieldName=status and fieldValue=To was one result: value "To Do" with the quotes included, and displayName with the typed part wrapped in <b> tags.

## Pitfalls

- displayName in suggestions contains HTML. Strip or render it before putting it in a plain text field.
- Use value, not displayName, when you build a JQL string. value already carries the quotes JQL needs.
- The list differs by site and by installed app, so cache it per site and not across sites.

## Questions and answers

### Can I filter suggestions by prefix?

Yes. fieldValue takes the partial text. With status and To the response contained only To Do.

## Related

- [Parse and validate JQL](https://goingstellar.ro/reference/atlassian-rest-api/jql-parse/)
- [Search with JQL](https://goingstellar.ro/reference/atlassian-rest-api/search-jql/)
- [Fields, work types, priorities, statuses](https://goingstellar.ro/reference/atlassian-rest-api/fields-issuetypes-priorities/)
- [expand, fields and properties parameters](https://goingstellar.ro/reference/atlassian-rest-api/expand-fields-properties/)

## Sources

- [The Jira Cloud platform REST API v3 (Atlassian Developer)](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/)
- [Get field auto complete suggestions (Jira REST API v3)](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-jql/#api-rest-api-3-jql-autocompletedata-suggestions-get)

