> ## 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 (v2)

> List the instances of a given workflow, optionally filtered (v2 with cursor pagination).

    Use the filters to narrow down the results. Multiple filters can be combined.

    Dates follow the ISO8601 format and UTC standard.
    Page size is 100 by default, 500 maximum. Uses cursor pagination for better performance.




## OpenAPI

````yaml /reference/openapi.json get /v2/processes/{process_id}/instances/
openapi: 3.0.3
info:
  title: Next Matter API
  version: v1
  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: support@nextmatter.com
servers:
  - url: https://core.nextmatter.com/api/
    description: Base URL
security: []
paths:
  /v2/processes/{process_id}/instances/:
    get:
      tags:
        - Instance
      summary: List workflow instances (v2)
      description: >
        List the instances of a given workflow, optionally filtered (v2 with
        cursor pagination).

            Use the filters to narrow down the results. Multiple filters can be combined.

            Dates follow the ISO8601 format and UTC standard.
            Page size is 100 by default, 500 maximum. Uses cursor pagination for better performance.
      operationId: v2_processes_instances_list
      parameters:
        - in: query
          name: aborted_time_after
          schema:
            type: string
            format: date-time
        - in: query
          name: aborted_time_before
          schema:
            type: string
            format: date-time
        - in: query
          name: active_step_id
          schema:
            type: string
        - in: query
          name: completed_time_after
          schema:
            type: string
            format: date-time
        - in: query
          name: completed_time_before
          schema:
            type: string
            format: date-time
        - name: cursor
          required: false
          in: query
          description: The pagination cursor value.
          schema:
            type: string
        - in: query
          name: deadline_after
          schema:
            type: string
            format: date-time
        - in: query
          name: deadline_before
          schema:
            type: string
            format: date-time
        - in: query
          name: ended_time_after
          schema:
            type: string
            format: date-time
        - in: query
          name: ended_time_before
          schema:
            type: string
            format: date-time
        - in: query
          name: last_updated_time_after
          schema:
            type: string
            format: date-time
        - in: query
          name: last_updated_time_before
          schema:
            type: string
            format: date-time
        - in: query
          name: lead_user
          schema:
            type: integer
        - in: query
          name: name
          schema:
            type: string
        - in: query
          name: ordering
          schema:
            type: array
            items:
              type: string
              enum:
                - '-deadline'
                - '-ended_time'
                - '-last_updated_time'
                - '-name'
                - '-priority'
                - '-progress'
                - '-started_time'
                - '-status'
                - '-total_runtime'
                - deadline
                - ended_time
                - last_updated_time
                - name
                - priority
                - progress
                - started_time
                - status
                - total_runtime
          description: |-
            Ordering

            * `name` - Name
            * `-name` - Name (descending)
            * `started_time` - Started time
            * `-started_time` - Started time (descending)
            * `last_updated_time` - Last updated time
            * `-last_updated_time` - Last updated time (descending)
            * `status` - Status
            * `-status` - Status (descending)
            * `priority` - Priority
            * `-priority` - Priority (descending)
            * `progress` - Progress
            * `-progress` - Progress (descending)
            * `deadline` - Deadline
            * `-deadline` - Deadline (descending)
            * `ended_time` - Ended time
            * `-ended_time` - Ended time (descending)
            * `total_runtime` - Total runtime
            * `-total_runtime` - Total runtime (descending)
          explode: false
          style: form
        - in: query
          name: organization
          schema:
            type: integer
        - name: page_size
          required: false
          in: query
          description: Number of results to return per page
          schema:
            type: integer
        - in: query
          name: priority
          schema:
            type: string
            nullable: true
            enum:
              - H
              - V
          description: |-
            * `V` - Very high
            * `H` - High
        - in: query
          name: process
          schema:
            type: integer
        - in: path
          name: process_id
          schema:
            type: string
            pattern: ^\d+$
          required: true
        - in: query
          name: progress_max
          schema:
            type: integer
            maximum: 100
            minimum: 0
        - in: query
          name: progress_min
          schema:
            type: integer
            maximum: 100
            minimum: 0
        - in: query
          name: query
          schema:
            type: string
        - in: query
          name: started_time_after
          schema:
            type: string
            format: date-time
        - in: query
          name: started_time_before
          schema:
            type: string
            format: date-time
        - in: query
          name: status
          schema:
            type: array
            items:
              type: string
              enum:
                - aborted
                - completed
                - running
          description: |-
            * `running` - Running
            * `completed` - Completed
            * `aborted` - Aborted
          explode: true
          style: form
        - in: query
          name: step_deadline_after
          schema:
            type: string
            format: date-time
        - in: query
          name: step_deadline_before
          schema:
            type: string
            format: date-time
        - in: query
          name: tags
          schema:
            type: array
            items:
              type: string
          description: Multiple values may be separated by commas.
          explode: false
          style: form
        - in: query
          name: total_runtime_max
          schema:
            type: string
            format: duration
        - in: query
          name: total_runtime_min
          schema:
            type: string
            format: duration
      responses:
        '200':
          content:
            application/json; version=v1:
              schema:
                $ref: '#/components/schemas/PaginatedInstanceListElementList'
          description: ''
      security:
        - Bearer: []
components:
  schemas:
    PaginatedInstanceListElementList:
      type: object
      required:
        - count
        - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/InstanceListElement'
    InstanceListElement:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        name:
          type: string
          description: The name of the instance
          maxLength: 255
        status:
          type: string
          readOnly: true
        public_url:
          type: string
          description: |2-

                    The public URL of the instance, for status tracking, if enabled in the workflow settings
                
      required:
        - id
        - name
        - public_url
        - status
  securitySchemes:
    Bearer:
      type: apiKey
      name: Authorization
      in: header
      x-default: Api-Key YOUR_NM_API_KEY
      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
        ".


````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.