Hello,
I’m trying to fetch all process with variable filter using operate variable api.
I have let say 40000 process I want to fetch all process instance where we have particular variable value X.
Since variable api is paginated we can get maximum 999 records only in one request so we need to apply searchAfter filter if want to fetch more records.
But with searchAfter I’m getting below error.
**EndPoint**- /v1/variables/search
**SAMPLE REQUEST**
{
"filter": {
"name": "taskAction",
"value": "\"Active\""
},
"size":1000,
"sort": [
{
"field": "processInstanceKey",
"order": "ASC"
}
],
"searchAfter": [
"processInstanceKey",
4503599629177009
]
}
ERROR
{
"status": 500,
"message": "Error in reading incidents",
"instance": "984804b0-3f19-4026-ad5b-93067436c0d1",
"type": "API application error"
}
This is sample request I have created to hit the api from postman.
ThankYou!!
Hi @dandotiya9722
Do you see this behavior for any processInstanceKey in the “searchAfter”? Have you tried a few more?
@Alex_Voloshyn yes tried multiple times with different different processes instance keys. Getting same error.
Hi @Alex_Voloshyn
do you have any idea on how can I fix this issue if you have come across one? or it is a bug in api itself?
I’m a bit puzzled by the message you’re receiving: ‘Error in reading incidents.’ Could you provide more details about the specific instances when this occurs? Screenshots and any other relevant information would also be helpful.
Hi @Alex_Voloshyn
Thankyou for your response!!!
I just have a simple process with few variables. The same api works fine if I’m not using “searchAfter” parameter. Even the “sort” is also working as expected only when I’m using “searchAfter” it’s throwing this error. Other Operate API is also working as expected.
Please let me know if there is any specific details should I share with you in order for you to reproduce this issue.
I’m working with camunda 8 self managed deployed in Azure.
What if you update this part to the following:
"searchAfter": [
{
"processInstanceKey": "4503599629177009",
"order": "ASC"
}
]
Hi @Alex_Voloshyn
I have tried it. Now api is throwing 403 Forbidden error.
Please let me know if there is any other way. I’m also checking on it will update here If I was able to solve it.
Thank you for the help!!!
That is interesting because 403 forbidden typically means you don’t have permission to access this resource.