Sanitize JQL queries
POST
/rest/api/3/jql/sanitize
JQL
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://jira.local:8080/jira/rest//rest/api/3/jql/sanitize' \
--header 'Content-Type: application/json' \
--data-raw '{
"queries": [
{
"query": "project = '\''Sample project'\''"
},
{
"accountId": "5b10ac8d82e05b22cc7d4ef5",
"query": "project = '\''Sample project'\''"
},
{
"accountId": "cda2aa1395ac195d951b3387",
"query": "project = '\''Sample project'\''"
},
{
"accountId": "5b10ac8d82e05b22cc7d4ef5",
"query": "invalid query"
}
]
}'
Response Response Example
200 - Success
{
"queries": [
{
"initialQuery": "project = 'Sample project'",
"sanitizedQuery": "project = 12345"
},
{
"initialQuery": "project = 'Sample project'",
"sanitizedQuery": "project = 'Sample project'",
"accountId": "5b10ac8d82e05b22cc7d4ef5"
},
{
"initialQuery": "project = 'Sample project'",
"sanitizedQuery": "project = 12345",
"accountId": "cda2aa1395ac195d951b3387"
},
{
"initialQuery": "non-parsable query",
"errors": {
"errorMessages": [
"Error in the JQL Query: Expecting operator but got 'query'. The valid operators are '=', '!=', '<', '>', '<=', '>=', '~', '!~', 'IN', 'NOT IN', 'IS' and 'IS NOT'. (line 1, character 9)"
],
"errors": {}
},
"accountId": "5b10ac8d82e05b22cc7d4ef5"
}
]
}
Request
Body Params application/json
Responses
Modified at 2023-07-13 03:27:27