REST API - queryProcessInstancesAlt

The table summarizes the REST API - queryProcessInstancesAlt.

Request

Format
GET <baseurl>/process/query/instancealt/<select>/<where>/<orderby>/<pagesize>
Path parameters
  • select: Attributes to be selected for each process instance in the result set.
  • where: Filter criteria to be used in the query.
  • orderby: Sorting/grouping criteria to be used 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.
    • -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.

    If a user-defined attribute is used in the select parameter of a paginated query, that attribute and its type should be included in the query parameters, otherwise a database query must be made to get the type of the user-defined attribute, making the request less efficient

  • statusmode: (Optional) Filters process instances returned according to their current status. The valid entries are ACTIVE, TERMINATED, or ACTIVE_AND_TERMINATED. Default = ACTIVE.

Response

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

Example

Request
get <baseurl>/process/query/instancealt/ContactName/INSTANCE.PRIORITY%20%3E%201/INSTANCE.START_DATE/0?statusmode=ACTIVE
Response
{
        "xml-fragment":
        {
            "processInstances":
            {
                "processInstance":
                [
                    {
                        "customAttributes":
                        {
                            "customAttribute":
                            {
                                "name": "ContactName",
                                "value": "Billy Smith"
                            }
                        }
                    },
                    {
                        "customAttributes":
                        {
                            "customAttribute":
                            {
                                "name": "ContactName",
                                "value": "Nancy Marshall"
                            }
                        }
                    },
                ]
            },
            "pagingID": 0
        }
    }