"maxResults" is not working on GET /process-instance

Hi,

I’m trying to get all instances with a specific workflow definition key and set the maximum returned results but I’m always getting the whole list. seems like the parameter “maxResults” is not working.

GET /process-instance

{
	"processDefinitionKey":"process_def_key",	
	"maxResults":"100"
}

The above query return the whole list of instances with the specified processDefinitionKey(about 100k)

Hi @Ghassen_Trabelsi,

maxResults should be passed as query parameter in both versions (Get & Post)

https://docs.camunda.org/manual/latest/reference/rest/process-instance/get-query/
https://docs.camunda.org/manual/latest/reference/rest/process-instance/post-query/

And if you are using the Get version then all parameters including “processDefinitionKey” should be passed as query parameters

@hassang

Thanks Hassang!
This worked for me