> ## Documentation Index
> Fetch the complete documentation index at: https://help.nextmatter.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List workflow instances

> List the instances of a given workflow, optionally filtered.

Filtering can be applied using the following query parameters:

- `name`: All instances with the name containing this substring
- `ordering`: Sorting by ascending or descending options: status, priority, ended_time, total_runtime, started_time. Use `-` to sort in a descending manner, for example: `-status`
- `status`: Use one of the options: `running`, `completed`, `aborted`
- `progress`: With suffix `_min` or `_max`
- `active_step_id`: Returns all instances of a workflow for which the step with the specified ID hasn't been completed and is currently active
- `priority`: Use one of the options: `V` (Very High) or `H` (High)
- `started_time`: With suffix `_after` or `_before`
- `last_updated_time`: With suffix `_after` or `_before`
- `deadline`: With suffix `_after` or `_before`
- `step_deadline`: With suffix `_after` or `_before`
- `aborted_time`: With suffix `_after` or `_before`
- `completed_time`: With suffix `_after` or `_before`
- `ended_time`: With suffix `_after` or `_before`
- `total_runtime_min`: Instance duration as `%d %H:%M:%S.%f` or ISO format
- `total_runtime_max`: Instance duration as `%d %H:%M:%S.%f` or ISO format
- `tags`: Name of the tag or tags separated by comma. Multiple tags are searched as OR condition.
- `page`: For pagination.

Dates follow the ISO8601 format and UTC standard.

Page size is 100 by default, 500 maximum. To paginate, follow the standard usage of `limit` and `page` parameters.



## OpenAPI

````yaml /reference/openapi.json get /processes/{process_id}/instances/
openapi: 3.0.1
info:
  title: Next Matter API
  description: >-
    # Introduction

    This is reference documentation for the Next Matter API. It is a RESTful API
    that can be interacted with by sending JSON-formatted requests. Responses
    are also returned in a JSON format.

            The API doesn't expose any endpoints of the workflow editor.
            This means you can't use this API to edit the underlying workflow structure or change definitions.
     # Testing a request

            Use a third party client, such as curl, Postman, or Advanced REST Client, to test our REST API.
  termsOfService: https://www.nextmatter.com/terms-of-service
  contact:
    email: development@nextmatter.com
  version: v1
  x-logo:
    url: >-
      https://assets-global.website-files.com/5fcecdf27451306b2081fedc/5ff43812707834743db939be_NextMatter_Logo_Horizontal.svg
    backgroundColor: '#FFFFFF'
    altText: Next Matter logo
servers:
  - url: https://core.nextmatter.com/api
security:
  - Bearer: []
paths:
  /processes/{process_id}/instances/:
    get:
      tags:
        - Instance
      summary: List workflow instances
      description: >-
        List the instances of a given workflow, optionally filtered.


        Filtering can be applied using the following query parameters:


        - `name`: All instances with the name containing this substring

        - `ordering`: Sorting by ascending or descending options: status,
        priority, ended_time, total_runtime, started_time. Use `-` to sort in a
        descending manner, for example: `-status`

        - `status`: Use one of the options: `running`, `completed`, `aborted`

        - `progress`: With suffix `_min` or `_max`

        - `active_step_id`: Returns all instances of a workflow for which the
        step with the specified ID hasn't been completed and is currently active

        - `priority`: Use one of the options: `V` (Very High) or `H` (High)

        - `started_time`: With suffix `_after` or `_before`

        - `last_updated_time`: With suffix `_after` or `_before`

        - `deadline`: With suffix `_after` or `_before`

        - `step_deadline`: With suffix `_after` or `_before`

        - `aborted_time`: With suffix `_after` or `_before`

        - `completed_time`: With suffix `_after` or `_before`

        - `ended_time`: With suffix `_after` or `_before`

        - `total_runtime_min`: Instance duration as `%d %H:%M:%S.%f` or ISO
        format

        - `total_runtime_max`: Instance duration as `%d %H:%M:%S.%f` or ISO
        format

        - `tags`: Name of the tag or tags separated by comma. Multiple tags are
        searched as OR condition.

        - `page`: For pagination.


        Dates follow the ISO8601 format and UTC standard.


        Page size is 100 by default, 500 maximum. To paginate, follow the
        standard usage of `limit` and `page` parameters.
      operationId: processes_instances_list
      parameters:
        - name: process_id
          in: path
          required: true
          schema:
            type: string
        - name: organization
          in: query
          description: organization
          schema:
            type: string
        - name: process
          in: query
          description: process
          schema:
            type: string
        - name: lead_user
          in: query
          description: lead_user
          schema:
            type: string
        - name: progress
          in: query
          description: progress
          schema:
            type: string
        - name: ordering
          in: query
          description: Ordering
          schema:
            type: string
            enum:
              - name
              - '-name'
              - started_time
              - '-started_time'
              - last_updated_time
              - '-last_updated_time'
              - status
              - '-status'
              - priority
              - '-priority'
              - progress
              - '-progress'
              - deadline
              - '-deadline'
              - ended_time
              - '-ended_time'
              - total_runtime
              - '-total_runtime'
        - name: status
          in: query
          description: status
          schema:
            type: string
            enum:
              - running
              - completed
              - aborted
        - name: name
          in: query
          description: name
          schema:
            type: string
        - name: query
          in: query
          description: query
          schema:
            type: string
        - name: priority
          in: query
          description: priority
          schema:
            type: string
            enum:
              - V
              - H
        - name: started_time
          in: query
          description: started_time
          schema:
            type: string
        - name: last_updated_time
          in: query
          description: last_updated_time
          schema:
            type: string
        - name: deadline
          in: query
          description: deadline
          schema:
            type: string
        - name: step_deadline
          in: query
          description: step_deadline
          schema:
            type: string
        - name: aborted_time
          in: query
          description: aborted_time
          schema:
            type: string
        - name: completed_time
          in: query
          description: completed_time
          schema:
            type: string
        - name: ended_time
          in: query
          description: ended_time
          schema:
            type: string
        - name: total_runtime_min
          in: query
          description: total_runtime_min
          schema:
            type: string
        - name: total_runtime_max
          in: query
          description: total_runtime_max
          schema:
            type: string
        - name: active_step_id
          in: query
          description: active_step_id
          schema:
            type: string
        - name: tags
          in: query
          description: tags
          schema:
            type: string
        - name: page
          in: query
          description: A page number within the paginated result set.
          schema:
            type: integer
        - name: page_size
          in: query
          description: Number of results to return per page.
          schema:
            type: integer
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                required:
                  - count
                  - results
                type: object
                properties:
                  count:
                    type: integer
                  next:
                    type: string
                    format: uri
                    nullable: true
                  previous:
                    type: string
                    format: uri
                    nullable: true
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/InstanceListElement'
components:
  schemas:
    InstanceListElement:
      required:
        - name
        - public_url
      type: object
      properties:
        id:
          title: ID
          type: integer
          readOnly: true
        name:
          title: Name
          maxLength: 255
          minLength: 1
          type: string
          description: The name of the instance
        status:
          title: Status
          type: string
          readOnly: true
        public_url:
          title: Public url
          minLength: 1
          type: string
          description: >

            The public URL of the instance, for status tracking, if enabled in
            the workflow settings
  securitySchemes:
    Bearer:
      type: apiKey
      description: >

        Authentication is API key based. As an admin, you can generate an API
        key in Next Matter by going to Company > Next Matter API keys.


        When sending requests to the API, authenticate by passing the API key in
        the "Authorization"

        HTTP header, prepended with the string "Api-Key ".


        For example:

         Authorization: Api-Key xyzabc.12fsfe242ubdgakew
      name: Authorization
      in: header
      x-default: Api-Key YOUR_NM_API_KEY

````