How to get task and variables in same object using Rest API

I have attached my requirement where in we are expecting for both task detail and variables to be retrieved in a single object.

hi @santhoshantony, I think camunda doesn’t has such api, probably you will need to create your custom rest api to achieve that

Thanks Kyle for your quick response.

I am using the below api to get response of activity-instance. When using the api i am getting the task ids of tasks which are now moved to another activity-instance.

http://localhost:8080/engine-rest/history/activity-instance?activityId=namQA

Is there any api that provides only the list of tasks in the respective activity-instance

According to the documentation you can pass the ‘activityType’ as parameter

https://docs.camunda.org/manual/latest/reference/rest/history/activity-instance/get-activity-instance-query/

http://localhost:8080/engine-rest/history/activity-instance?processInstanceId={processInstanceId}&activityType=userTask

Thank you Kyle for your response, we have figured out a way to get the tasks in a specific activity by using the below api

http://localhost:8080/engine-rest/task?processDefinitionKey=namquoteadministration&taskDefinitionKey=namQA