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