Audit log via Rest API

Hi All,
I would like to retrieve an audit log of a completed process instance via one or more REST API calls. The audit log shall look like the one shown in Cockpit (i.e. include the same information such as the State, the Activity, the Start and End Time, and the Activity Instance ID).

I tried following operations:

  • /history/process-instance/ to get the start and end time of the process instance
  • /history/task=processInstanceId to get the manual task
  • /history/job-log to get the service task
  • /history/detail to get the process variables and their values

However, I don’t know how to get all events and gateways for the corresponding process instance.

Is there perhaps an easier way to get the log information?

Thanks

Try the call that will get you the Activity Instances of a given process instance that’ll probably have a lot of the information you’re looking for.

Hi @Niall
Thank you for the quick reply.

http://localhost:8080/engine-rest/history/activity-instance?processInstanceId={processInstanceId} worked fine for me.

Thanks.

@fbuehler

Hey guys, interesting information. What I am missing still are the variables of a specific process instance that has been completed in the past. When I try to fetch variables of a process instance that has been completed I am getting a message that this process instance does not exist. What’s the best way to retrieve this information?

My goal is to build an audit trail that will print on a pdf every step the user did and what information is also available. And all this information is in the variables.

Thank you in advance
Tk