> ## 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.

# Get instance

> Get the details of an instance



## OpenAPI

````yaml /reference/openapi.json get /instances/{id}/
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:
  /instances/{id}/:
    get:
      tags:
        - Instance
      summary: Get instance
      description: Get the details of an instance
      operationId: instances_read
      parameters:
        - name: id
          in: path
          description: A unique integer value identifying this workflow instance.
          required: true
          schema:
            type: integer
        - name: inject_values
          in: query
          description: >-
            Set to "true" to include input values of actions inside the workflow
            snapshot
          schema:
            type: boolean
            default: false
        - name: steps_time_frame
          in: query
          description: >-
            Set to "true" to include step completion times inside the workflow
            snapshot
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Public_Instance'
components:
  schemas:
    Public_Instance:
      required:
        - process
      type: object
      properties:
        name:
          title: Name
          maxLength: 255
          type: string
          description: >-
            The name of the instance. If automatic naming has been enabled, the
            name parameter needs to be an empty string, null, or completely left
            out.
          nullable: true
          default: ''
        process:
          title: Process
          type: string
          description: >-
            The related workflow resource URI. For example
            https://core.nextmatter.com/api/processes/[IDoftheworkflowinNM]/.
                    To find the workflow ID, navigate to the respective workflow at app.nextmatter.com, and copy the number at the very end of the URL.
          format: uri
        deadline:
          title: Deadline
          type: string
          description: Time by which the instance should be completed
          format: date-time
          nullable: true
        priority:
          title: Priority
          type: string
          description: >-
            The priority of the instance. If you don't send this parameter, the
            priority will be "Regular". Other options are V - "Very High" and H
            - "High".
          nullable: true
          enum:
            - V
            - H
        tags:
          title: Tags
          type: array
          description: A list of string tags separated by a comma
          items:
            type: string
        step_assignments:
          type: array
          description: >-
            A list of user assignments per step. This is only required for
            workflows that have at least one step assignee set to
                    "Select user at workflow start".
          items:
            $ref: '#/components/schemas/StepAssignment'
        url:
          title: Url
          type: string
          description: >-
            The instance resource URI. For example
            https://core.nextmatter.com/api/instances/[instance_id]/.
          format: uri
          readOnly: true
        id:
          title: ID
          type: integer
          readOnly: true
        started_time:
          title: Started time
          type: string
          format: date-time
          readOnly: true
        completed_time:
          title: Completed time
          type: string
          format: date-time
          nullable: true
          readOnly: true
        aborted_time:
          title: Aborted time
          type: string
          format: date-time
          nullable: true
          readOnly: true
        last_updated_time:
          title: Last updated time
          type: string
          format: date-time
          readOnly: true
        process_snapshot:
          title: Process snapshot
          type: string
          description: |-
            A snapshot of the workflow structure.
                    If you set "inject_values" query parameter to "true", this will return the input values of the form fields.,
                    If you set "steps_time_frame" query parameter to "true", this will return the completion values of the form fields.
          readOnly: true
        active_step_ids:
          type: array
          description: List of active step IDs of the instance
          readOnly: true
          items:
            type: integer
        step_deadlines:
          title: Step deadlines
          type: string
          description: List of instance step deadlines
          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
          readOnly: true
        stage:
          title: Stage
          minLength: 1
          type: string
          readOnly: true
    StepAssignment:
      required:
        - step_id
        - user_id
      type: object
      properties:
        step_id:
          title: Step id
          type: integer
          description: >-
            The assigned step's ID. You can find the step id in the workflow
            editor
                by accessing the step and inspecting the URL
        user_id:
          title: User id
          type: integer
          description: >-
            The ID of the user assigned as the step's lead. If you dont know the
            user ID, get in touch with our Next Matter support team
      description: >-
        A list of user assignments per step. This is only required for workflows
        that have at least one step assignee set to
                "Select user at workflow start". 
  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

````