Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Wat is the maximum length limit for AQL query strings, when using the REST API?

Kasper Furnesvik
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 27, 2023

Greetings,

I am developing a small integration for JSM Assets, using the REST API, which is documented here.

I have to perform some actions which requires looking up a large number of objects from a JSM Assets schema, by matching against specific ids (these ids are stored as 'Text' attributes on the objects. This is the only way for me to get the identities of the objects in relation to an external system).


Therefore I am doing a number of requests against the /aql/objects endpoint, where I construct aql queries on the following form:

"object.id_attr = <value1> OR object.id_attr = <value2> OR object.id_attr = <value3> ..." etc.

The aql string ends up being quite long, containing about 100 OR-clauses. When i run the GET request the endpoint returns a 'HTTP 413: Payload Too Large' error. I assume because the supplied aql string is too long.

I could solve this by only asking for 1 id at a time, thus doing 100s of GET requests in a row. However, I want to try and reduce the number of HTTP requests as much as possible, to limit network overhead (there is already a considerable amount of REST calls being done in the application).

I want to try and build the aql string to be as long as possible, while still being below the limit. Is there a specific limit I can use, or at least a 'maximum range' that I should try to stay under?

 

Regards

- Kasper

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events