Fetching multiple concepts together

Hi @Platform_Team !

Is there any endpoint from where we can get data for multiple concepts on 1 call.

For viewing test results data for Richard Jones on dev3, we are fetching 65 concepts, and it’s all running asynchronously. As expected, this is taking a lot of memory.

Having a single endpoint to fetch all the data will help out a lot.


CC: @deborah @jwnasambu @jexsie


The concept endpoint takes a references parameter which can accept multiple concepts (at least in 2.39.0+ IIRC). Note, however, that there’s a limit to how long a URL string can sensibly be, so we’d need to have some sanity checks—usually the reference is something like 2k with some services accepting up to 4k. I have no idea what our default configuration accepts. That’s for the full URL.

Reason I bring this up is if all 65 concepts are expressed as 32-character UUID strings, that’s 65 * 32 = 2080 bytes, which is already over the 2k guideline, and not counting anything else in the URL, e.g., /openmrs/ws/rest/v1/concept?references= is 40 characters, which would bring the whole thing up to 2120 bytes, which may result in the request being blocked (returning a 414 error).