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

# List agentic automation runs

> List runs of agentic automations, newest first. With no filters, the list has every run in the caller's teamspace. `agent_id` keeps the runs of one agent, and an unknown agent gives an empty list. `resource_type` is the kind of record, for example `Submittals`, and `resource_id` is the id of the record, as a string; either one keeps only app-event runs on matching records. Add `type` to keep only scheduled or only app-event runs, `status` to keep one status, and `invocation` to keep only some ways a run started, for example `automatic,manual` to leave out test runs. All filters can be combined. Page with the `id` of the last or first run as `after` / `before`; send both to list only the runs between two runs. Each run carries `result` and `structured_result`.



## OpenAPI

````yaml get /agentic-automations/runs
openapi: 3.0.3
info:
  version: 0.1.1
  title: Datagrid API
  description: Datagrid API
servers:
  - url: https://api.datagrid.com/v1
security:
  - BearerAuth: []
paths:
  /agentic-automations/runs:
    get:
      tags:
        - Agentic Automations
      summary: List agentic automation runs
      description: >-
        List runs of agentic automations, newest first. With no filters, the
        list has every run in the caller's teamspace. `agent_id` keeps the runs
        of one agent, and an unknown agent gives an empty list. `resource_type`
        is the kind of record, for example `Submittals`, and `resource_id` is
        the id of the record, as a string; either one keeps only app-event runs
        on matching records. Add `type` to keep only scheduled or only app-event
        runs, `status` to keep one status, and `invocation` to keep only some
        ways a run started, for example `automatic,manual` to leave out test
        runs. All filters can be combined. Page with the `id` of the last or
        first run as `after` / `before`; send both to list only the runs between
        two runs. Each run carries `result` and `structured_result`.
      operationId: ListAgenticAutomationRuns
      parameters:
        - name: agent_id
          in: query
          required: false
          description: The ID of the agent whose runs to list.
          schema:
            type: string
            maxLength: 128
        - name: resource_type
          in: query
          required: false
          description: >-
            The kind of record, for example `Submittals`. Keeps only app-event
            runs on records of this kind.
          schema:
            type: string
            maxLength: 128
        - name: resource_id
          in: query
          required: false
          description: >-
            The id of the record, for example the Submittal's id, as a string.
            Keeps only app-event runs on records with this id. Add
            `resource_type` if ids can repeat across kinds.
          schema:
            type: string
            maxLength: 512
        - name: type
          in: query
          required: false
          description: >-
            Keep only runs of this kind: `scheduled` for runs started by a
            schedule, `app_event` for runs started by an app event.
          schema:
            type: string
            enum:
              - scheduled
              - app_event
        - name: status
          in: query
          required: false
          description: Keep only runs in this status.
          schema:
            type: string
            enum:
              - queued
              - running
              - succeeded
              - failed
              - cancelling
              - cancelled
              - awaiting_approval
              - needs_attention
              - timed_out
        - name: invocation
          in: query
          required: false
          description: >-
            Keep only runs that started this way. A comma-separated list, for
            example `automatic,manual` to leave out test runs. All runs appear
            when omitted.
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
              enum:
                - automatic
                - manual
                - test
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/after'
        - $ref: '#/components/parameters/before'
      responses:
        '200':
          description: The runs
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgenticAutomationRunList'
        '400':
          description: >-
            Bad request. The message names the invalid query parameter, for
            example `type`, `status` or `invocation` is not an allowed value, or
            `after` or `before` is not a run id. If more than one is wrong, it
            names the first.
        '429':
          description: >-
            Rate limit exceeded. The request has been throttled because the rate
            limit for this endpoint has been reached. Check the `Retry-After`
            response header and retry after the specified number of seconds.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateLimitError'
components:
  parameters:
    limit:
      name: limit
      in: query
      schema:
        type: integer
        default: 50
        minimum: 1
        maximum: 100
      required: false
      description: The limit on the number of objects to return, ranging between 1 and 100.
    after:
      name: after
      in: query
      schema:
        type: string
      required: false
      description: >-
        A cursor to use in pagination. `after` is an object ID that defines your
        place in the list. For example, if you make a list request and receive
        100 objects, ending with `obj_foo`, your subsequent call can include
        `after=obj_foo` to fetch the next page of the list.
    before:
      name: before
      in: query
      schema:
        type: string
      required: false
      description: >-
        A cursor to use in pagination. `before` is an object ID that defines
        your place in the list. For example, if you make a list request and
        receive 100 objects, starting with `obj_bar`, your subsequent call can
        include `before=obj_bar` to fetch the previous page of the list.
  schemas:
    AgenticAutomationRunList:
      type: object
      required:
        - object
        - data
        - has_more
      properties:
        object:
          type: string
          enum:
            - list
          description: The object type, always 'list'.
        data:
          type: array
          items:
            $ref: '#/components/schemas/AgenticAutomationRun'
          description: The runs on this page, newest first.
        has_more:
          type: boolean
          description: >-
            Whether more runs exist beyond this page in the direction you are
            paging.
    RateLimitError:
      type: object
      description: >-
        Returned when the rate limit is exceeded. Rate limits are enforced per
        teamspace, endpoint path, and HTTP method over a 60-second sliding
        window. Each endpoint may have its own limit — check the
        X-RateLimit-Limit response header for the effective value.
      required:
        - error
        - message
        - retryable
        - status_code
      properties:
        status_code:
          type: integer
          description: The HTTP status code (429).
        statusCode:
          type: integer
          deprecated: true
          description: Deprecated. Use status_code instead.
        error:
          type: string
          enum:
            - rate_limit_exceeded
          description: The error code identifying this as a rate limit error.
        message:
          type: string
          description: A human-readable error message.
        mitigation:
          type: string
          description: Suggested action to resolve the error.
        retryable:
          type: boolean
          description: Whether the request can be retried after a delay.
        details:
          type: object
          properties:
            reason:
              type: string
              description: A detailed explanation of why the rate limit was exceeded.
    AgenticAutomationRun:
      type: object
      required:
        - object
        - id
        - automation_id
        - agent_id
        - agent_name
        - automation_name
        - invocation
        - status
        - failure_reason
        - triggered_by_user_id
        - created_at
        - started_at
        - ended_at
        - cancelled_at
        - output_conversation_id
        - type
        - resource_type
        - resource_id
        - result
        - structured_result
      properties:
        object:
          type: string
          enum:
            - agentic_automation_run
          description: The object type, always 'agentic_automation_run'.
        id:
          type: string
          description: Unique identifier for the run.
        automation_id:
          type: string
          description: The ID of the automation this run belongs to.
        agent_id:
          type: string
          description: The ID of the agent that ran.
        agent_name:
          type: string
          description: Name of the agent that ran.
        automation_name:
          type: string
          description: Name of the automation this run belongs to.
        invocation:
          type: string
          enum:
            - automatic
            - manual
            - test
          description: >-
            How the run started. `automatic` for a schedule or app event,
            `manual` for a person running it, `test` for a test run.
        status:
          type: string
          enum:
            - queued
            - running
            - succeeded
            - failed
            - cancelling
            - cancelled
            - awaiting_approval
            - needs_attention
            - timed_out
          description: Where the run is in its life.
        failure_reason:
          type: string
          enum:
            - exception
            - agent_error
            - no_response
            - resource_unavailable
            - user_unavailable
            - unauthorized
            - out_of_credits
            - timed_out
          description: Why the run did not succeed. Null when it has not failed.
          nullable: true
        triggered_by_user_id:
          type: string
          description: The user who started the run. Null for an automatic run.
          nullable: true
        created_at:
          type: string
          format: date-time
          description: ISO 8601 timestamp of when the run was created.
        started_at:
          type: string
          format: date-time
          description: ISO 8601 timestamp of when the run started. Null until it starts.
          nullable: true
        ended_at:
          type: string
          format: date-time
          description: ISO 8601 timestamp of when the run ended. Null while it is open.
          nullable: true
        cancelled_at:
          type: string
          format: date-time
          description: >-
            ISO 8601 timestamp of when the run was cancelled. Null if it was
            not.
          nullable: true
        output_conversation_id:
          type: string
          description: The conversation the run wrote to. Null when the run has none.
          nullable: true
        type:
          type: string
          enum:
            - scheduled
            - app_event
          description: 'What starts the automation: a schedule or an app event.'
        resource_type:
          type: string
          description: >-
            The kind of record an app event run was started for, for example
            `Submittals`. Null for a scheduled run.
          nullable: true
        resource_id:
          type: string
          description: The id of that record, as a string. Null for a scheduled run.
          nullable: true
        result:
          type: string
          nullable: true
          description: >-
            What the agent answered, as text. Null unless `status` is
            `succeeded`, and null once the answer has been deleted.


            Prose, not a rendering: an embedded chart reads as `[Chart: ...]`
            and a table as `[Table: ...]`.
        structured_result:
          type: object
          additionalProperties: true
          nullable: true
          description: >-
            Whatever the agent stored for the record, as opaque JSON. Datagrid
            does not name or validate its keys, so they are an agreement between
            the agent and its reader, and you cannot sort or filter on one.


            Null when the agent stored nothing, and null when `result` is empty.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````

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