REST API - getProcessInstanceReport

The table summarizes the REST API - getProcessInstanceReport.

Request

Format
GET <baseurl>/audit/report/proc_inst/<reference>
Path Parameters reference: identifies the instance ID whose events you want to audit. Can be obtained from listProcessInstances, queryProcessInstances or queryProcessInstancesAlt.
Query Parameters
  • requireallattributes=string (optional, default=false). Whether all attributes should be returned. Can be obtained from getAllAttributes or getAttributes. The default is false.
  • requiredattribute=string (optional). Specific attributes that should be returned for each event found. Can be obtained from getAllAttributes or getAttributes.
  • sortorder=string (0-n, optional): What attribute or attributes the results should be sorted on, and in what direction the sort should run. Specify this in the following format:

    attribute 1:ASCENDING|DESCENDING;attribute 2:ASCENDING|DESCENDING; … attribute n:ASCENDING|DESCENDING

  • details=string (optional). Specify this to return the work items associated with the given process instance.
  • gettotalcount=string (optional, default=true). Whether to include a count of the total number of events in the list. The count is returned in the totalItems value in the response. You should set getTotalCount to false unless you specifically need the total figure, because setting it to true is expensive in terms of database access time. Note that:
    • If you pass false in this attribute, and there is at least one item in the list, the totalItems value returned in the response is -1. However, if you pass false and there are no work items in the list, the totalItems value in the response is 0 (zero).
    • If you pass true in this attribute but numberOfItems is set to zero, the totalItems value in the response is 0 regardless of how many items are actually in the list. The total count of items is only available when you are fetching one or more items.
  • numberofitems=integer (optional, default=-1). The maximum number of events to return. Specifying -1 returns all events for the process instance.
  • populateattributenames=string (optional). Specify that attribute names be returned in the list of events.
  • startposition=integer (optional, default=-1). The position in the list from which to start the page of results. The list is zero-based. To start at the first item, specify 0.
  • advancedoptions=string. This is for internal use only and should not be used.
  • fetchcomments=boolean (optional). Returns all comments for the process instance.
  • subprocdepth =integer (optional, default=-1). Determines how many sub-processes to return. By default, this is set to -1 which returns all sub-processes. Note that numberOfItems and startPosition only apply to the first process instance. Any work items or sub processes are returned in full.

Response

JSON Returns a JSON representation of the content of the getProcessInstanceAuditResponse element.
XML Returns the content of the getProcessInstanceAuditResponse element (from the EventCollectorReportService schema).

Example

Request
GET <baseurl>/audit/report/proc_inst/pvm:0a122
Response
{
   "xml-fragment":
   {
       "endPosition": 7,
       "startPosition": 0,
       "totalItems": 7,
       "entry":
       [
           {
               "creationTime": "2014-02-11T11:00:21.837Z",
               "componentId": "BX",
               "messageId": "BX_INSTANCE_PROCESS_STARTED",
               "severity": "AUDIT",
               "message": "Process Instance started.",
               "priority": "MEDIUM",
               "correlationId": "",
               "messageCategory": "PROCESS_INSTANCE",
               "principalId": "tibco-admin",
               "principalName": "tibco-admin",
               "managedObjectId": "pvm:0a122",
               "managedObjectName": "WelcomeUsers",
               "managedObjectVersion": "1.0.0.201402111100",
               "parentObjectId": "pvm:0a112",
               "additionalAttributes":
               {
                   "attribute":
                   [
                       {
                           "@type": "base:StringEntryAttribute",
                           "attributeId": 271,
                           "attributeName": "parentProcessInstanceId",
                           "type": "STRING",
                           "value": " "
                       },
                   .
                   .
                   .
               }
           }
       ],
       "processInstanceRef":
       {
           "instanceId": "pvm:0a122"
       }
   }
}