Use a complex AQL query in the Post object AQL API in JSM Cloud Assets
Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.
Summary
This article explains how to correctly format a complex AQL query when using the Post object aql API endpoint.
Solution
Here's an example of an AQL query:
objectType = "Netbox Sites" AND "Site Code" in ("CRHQSFST")
The body of the API request can be any one of these:
"qlQuery": "objectType = \"Netbox Sites\" AND \"Site Code\" IN (\"CRHQSFST\")"
"qlQuery": "objectType = \"Netbox Sites\" AND \"Site Code\" IN (CRHQSFST)"
"qlQuery": "objectType = \"Netbox Sites\" AND \"Site Code\" = CRHQSFST"
You must use the escape character to parse the quotation mark that follows it in a sequence. So in this example, the body of the request could be like:
{
"qlQuery": "objectType = \"Netbox Sites\" AND \"Site Code\" = CRHQSFST"
}
Updated on June 26, 2025
Was this helpful?
Still need help?
The Atlassian Community is here for you.