Retrieving service task of a process via REST API from running or history

Hi

I need to get a list of all Service and User tasks of a process instance. Is there any way to retrieve the Service Task list/detail from either running process or history using REST api? What is the endpoint I need to call?

thanks

@rrana these are service tasks that have actually executed?

There are two scenario:

  1. You want service tasks that are in the BPMN
  2. you want service tasks that have executed

for #1 you would use the Get BPMN XML and then parse the xml looking for service tasks

for #2 you can use: Get Historic Activity Instances | docs.camunda.org

and filer using the activityType and look at: Docs of the list of activityTypes? for the supported activity types.

In your case you want:

“serviceTask”

Then make sure you look at the other available filters in the API for ensure you get active/inactive/finished process instances, etc. Whatever you are looking for.

thank you, Stephen! I’ll give it a shot.