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

@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.