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

# Runs summary

> Returns a summary of all runs (completed, failed, running, etc.) within the specified date range.
Useful for answering questions like:
- "How many agents ran yesterday?"
- "What agents failed last week?"



## OpenAPI

````yaml GET /api/v1/analytics/runs/summary
openapi: 3.0.1
info:
  title: Sequentum Cloud API
  description: API endpoints for Sequentum Cloud
  version: v1
servers: []
security:
  - ApiKey: []
    Bearer: []
paths:
  /api/v1/analytics/runs/summary:
    get:
      tags:
        - ApiAnalytics
      summary: Get runs summary for a date range
      description: >-
        Returns a summary of all runs (completed, failed, running, etc.) within
        the specified date range.

        Useful for answering questions like:

        - "How many agents ran yesterday?"

        - "What agents failed last week?"
      parameters:
        - name: startDate
          in: query
          description: Start date for the range (ISO format, defaults to yesterday)
          schema:
            type: string
            format: date-time
        - name: endDate
          in: query
          description: End date for the range (ISO format, defaults to now)
          schema:
            type: string
            format: date-time
        - name: status
          in: query
          description: 'Optional: Filter by specific status (Failed, Completed, etc.)'
          schema:
            $ref: '#/components/schemas/RunStatus'
        - name: includeDetails
          in: query
          description: 'Whether to include details of failed runs (default: true)'
          schema:
            type: boolean
            default: true
      responses:
        '200':
          description: Returns the runs summary
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RunsSummaryApiModel'
        '400':
          description: If the date range is invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestError'
        '401':
          description: If the API key is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
components:
  schemas:
    RunStatus:
      enum:
        - 0
        - 1
        - 2
        - 3
        - 4
        - 5
        - 6
        - 7
        - 8
        - 9
        - 10
        - 11
        - 12
      type: integer
      description: >-
        `0` = `Invalid`; `1` = `Running`; `2` = `Exporting`; `3` = `Starting`;
        `4` = `Queuing`; `5` = `Stopping`; `6` = `Failure`; `7` = `Failed`; `8`
        = `Stopped`; `9` = `Completed`; `10` = `Success`; `11` = `Skipped`; `12`
        = `Waiting`
      format: int32
    RunsSummaryApiModel:
      type: object
      properties:
        startDate:
          type: string
          description: Start date of the range
          format: date-time
        endDate:
          type: string
          description: End date of the range
          format: date-time
        totalRuns:
          type: integer
          description: Total number of runs in the date range
          format: int32
        completedRuns:
          type: integer
          description: Number of completed runs
          format: int32
        failedRuns:
          type: integer
          description: Number of failed runs
          format: int32
        completedWithErrorsRuns:
          type: integer
          description: Number of runs completed with errors
          format: int32
        runningRuns:
          type: integer
          description: Number of currently running runs
          format: int32
        queuedRuns:
          type: integer
          description: Number of queued runs
          format: int32
        stoppedRuns:
          type: integer
          description: Number of stopped runs
          format: int32
        failedRunDetails:
          type: array
          items:
            $ref: '#/components/schemas/FailedRunSummaryApiModel'
          description: Details of failed runs (if requested)
          nullable: true
      additionalProperties: false
      description: Response model for runs summary
    BadRequestError:
      type: object
      properties:
        statusCode:
          type: integer
          format: int32
        statusDescription:
          type: string
          nullable: true
        message:
          type: string
          nullable: true
          readOnly: true
        severity:
          $ref: '#/components/schemas/ErrorSeverity'
        errorCode:
          type: string
          description: "Optional machine-readable error code. When present, clients should switch on this\r\nvalue rather than parsing Sequentum.Enterprise.Core.ControllerError.Message. Omitted from the response when null."
          nullable: true
      additionalProperties: false
    ProblemDetails:
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
      additionalProperties: {}
    FailedRunSummaryApiModel:
      type: object
      properties:
        runId:
          type: integer
          format: int64
        agentId:
          type: integer
          format: int32
        agentName:
          type: string
          nullable: true
        startTime:
          type: string
          format: date-time
          nullable: true
        endTime:
          type: string
          format: date-time
          nullable: true
        status:
          $ref: '#/components/schemas/RunStatus'
        errorMessage:
          type: string
          nullable: true
        spaceId:
          type: integer
          format: int32
          nullable: true
        spaceName:
          type: string
          nullable: true
      additionalProperties: false
      description: Summary of a failed run
    ErrorSeverity:
      enum:
        - 0
        - 1
        - 2
        - 3
        - 4
      type: integer
      description: >-
        `0` = `Error`; `1` = `Unexpected`; `2` = `Fatal`; `3` = `Warning`; `4` =
        `Info`
      format: int32
  securitySchemes:
    ApiKey:
      type: apiKey
      description: >-
        API Key authorization header. Example: "Authorization: ApiKey
        {your-api-key}"
      name: Authorization
      in: header
    Bearer:
      type: http
      description: 'OAuth 2.0 Bearer token. Example: "Authorization: Bearer {access-token}"'
      scheme: bearer
      bearerFormat: JWT

````