I have been using the REST API for some time in several custom applications and it has been very helpful. However, I repeatedly come across the same problem of querying data for a list of keys and hitting a URL limit.
Say I have a list of part numbers and I would like to get a field called “ClassID” for each. I end up with a HTTP GET url that ends with something like this:
If I want to do the same with a list of 25-50 part numbers, the URL seems to exceed some length (~2000 characters) and I get an error (404).
Thus, I have been splitting the list into several smaller API requests and merging the result.
What I’ve tried so far:
- Splitting the list into several smaller API requests and merging the result.
- The “in” syntax from Odata v4 is a little more compact and could fit more part numbers in the query url and would probably satisfy my need. Unfortunately, that results in “Error: Expression not yet supported: In”
- The $batch and $query syntax of Odata v4.01. It seems that neither of these functions are implemented in the API.
Is there a better way to do this type of request? It would be nice if there was some way POST the query in the body for a longer query.
Currently on Epicor 10.2.6