How to customize responses of built-in REST endpoints?

Hi,

I’m modeling a process at work where I have to set local variables on task and embedded subprocess level. The local variables I’m setting help me distinguish one task from the other. However, the built-in REST endpoints return results without what ever variables I set. I know I can make an extra API call if I want to get the value of a specific variable, but is it possible to add the variables in the response?

One other issue I’m facing is with history endpoints. Take the tasks history endpoint “/history/task” for example, it is only possible to get a list of history tasks and checking local variables of these history tasks is not possible. Is there a way I can get the task variables in the response of the history tasks?

Hey @hassank

Both endpoints don’t support that at the moment.

But do you need to check the local variables on the client side?

Because you can set the taskVariables parameter in the request and filter only the tasks you need. It’s pretty flexible in defining the evaluation conditions. You can check it out here.

Best,
Nikola