IT Process Automation

 View Only

 Suspend and Reset Processes with REST API

Jump to Best Answer
Nicholas Kozell's profile image
Nicholas Kozell posted Sep 08, 2021 11:20 AM
Greetings!

Hoping someone can point me to the correct place, I'm looking for some documentation to help me with filtering requests to pull lists of process instances based on criteria like runtime, InstanceName and RunState. It seems most links to documentation I find just take me to the main page for Broadcom documentation and not an actual file, any help would be much appreciated!

Thanks,
Nic
Michael St. Laurent's profile image
Michael St. Laurent Best Answer
In v SP05 you build the filter clause in the URI.  I couldn't find the syntax in any documentation or in swagger, so I had to open a case.
You append the following to the url and encode it:
?filter=<property>==<value>
Example:
?filter=runstate == running
Encoded:
$PAMBaseURL
 = "https://capa.company.com/api/rest"
$URI = "$PAMBaseURL/v2/processinstances?filter=RunState%20%3D%3D%20Blocked"