REST API - queryProcessInstances

The table summarizes the REST API - queryProcessInstances.

Request

Format
GET <baseurl>/process/query/instance/<query>/<pagesize>
Path parameters
  • query: Full (SQL syntax) query string. The "FROM process" clause should be included in the query.

    For information about valid SQL syntax, see Sorting and Filtering Lists of Process Templates and Instances .

  • pagesize: Page size to be used to return the list of process instances. One of the following values:
    • 0: Return the entire result set in a single, non-paged list. The result set when using this value is restricted to 500 entries.
    • -1: Return the result set in a paged list, using the default page size.
    • positive integer: return the result set in a paged list, with the specified number of items on each page.

      If you specify a paged result (pageSize = -1 or a number greater than 0), use the queryFirstPage , queryLastPage , queryNextPage , and queryPreviousPage operations to navigate the paged list, and queryDone to clear resources when you are finished with the paged list. (Note that the result limit for non-paginated queries (pageSize=0) is 500.)

Query parameters
  • name=string (0..n): Name of the template attribute.
  • type=string (0..n): Data type of the template attribute.
  • statusmode: (Optional) Users will be able to use the parameter "statusmode" to filter process instances. If set, the query will show ACTIVE only, TERMINATED only, or ACTIVE_AND_ TERMINATED processes. If not set, it will only show ACTIVE processes.

Response

JSON Returns a JSON representation of the content of the queryProcessInstancesOutput element.
XML Returns the content of the a queryProcessInstancesOutput element (from the ProcessManagement schema).

Example

Request
GET <baseurl>/process/query/instance/SELECT%20ContactName%20FROM%20process%20WHERE%20INSTANCE.STATUS%20%3D%20'ACTIVE'/0?name=ContactName&type=String
Response
{

  "xml-fragment": {

    "proc:processInstances": {

      "@xmlns:proc": "http://www.tibco.com/bx/2009/management/processManagerType",

      "proc:processInstance": [

        {

          "proc:customAttributes": {

            "proc:customAttribute": {

              "proc:name": "ContactName",

              "proc:value": "Bob Wilson"

            }

          }

        },

        {

          "proc:customAttributes": {

            "proc:customAttribute": {

              "proc:name": "ContactName",

              "proc:value": "Nancy Small"

            }

          }

        },

                     .

                     .

                     .

{

          "proc:customAttributes": {

            "proc:customAttribute": {

              "proc:name": "ContactName",

              "proc:value": "Bob Campanella"

            }

          }

        }

      ]

    },

    "proc:pagingID": {

      "@xmlns:proc": "http://www.tibco.com/bx/2009/management/processManagerType",

      "#text": "0"

    }

  }

}