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

# List task execution history (or stats)

> Returns past runs of scheduled tasks, each linked to the `conversationId`
of the run (fetch it with `GET /getConversation`). Filter to one task with
`taskId`. Pass `stats=true` for aggregate counts instead of the list.




## OpenAPI

````yaml /openapi.yaml get /scheduled-tasks/executions
openapi: 3.1.0
info:
  title: AsterAgents API
  version: 1.0.0
  description: >
    API for AsterAgents platform operations.


    - **Admin endpoints** (`/admin/*`) require organization admin privileges
    (`org:admin` role)

    - **Agent endpoints** (`/agents`) require agent management permissions or
    `org:admin` role

    - **Knowledge base endpoints** (`/kb/*`) require standard authentication

    - **Skills endpoints** (`/skills/*`) require standard authentication

    - **File endpoints** (`/upload/*`, `/kb/files`, `/skills/files`) require
    standard authentication
  contact:
    name: AsterAgents Support
    url: https://asteragents.com/support
servers:
  - url: https://asteragents.com/api
    description: Production
  - url: http://localhost:3000/api
    description: Local development
security:
  - bearerAuth: []
tags:
  - name: Users
    description: Manage active organization users
  - name: Invitations
    description: Manage organization invitations
  - name: Files
    description: Upload and manage files
  - name: Knowledge Bases
    description: Manage knowledge bases and their files
  - name: Knowledge Base Management
    description: Create, update, and delete knowledge bases
  - name: Agents
    description: Create, update, and delete agents
  - name: Agent Tags
    description: Organize agents with tags
  - name: Tools
    description: Discover the tool catalog available to your organization
  - name: Skills
    description: Manage agent skills
  - name: Skill Files
    description: Manage bundled files for skills
  - name: Conversations
    description: Invoke agents and retrieve conversation history and messages
  - name: Scheduled Tasks
    description: Schedule agents to run automatically on a cron schedule
paths:
  /scheduled-tasks/executions:
    get:
      tags:
        - Scheduled Tasks
      summary: List task execution history (or stats)
      description: >
        Returns past runs of scheduled tasks, each linked to the
        `conversationId`

        of the run (fetch it with `GET /getConversation`). Filter to one task
        with

        `taskId`. Pass `stats=true` for aggregate counts instead of the list.
      operationId: listScheduledTaskExecutions
      parameters:
        - name: taskId
          in: query
          required: false
          schema:
            type: integer
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 50
        - name: stats
          in: query
          required: false
          description: When true, returns aggregate counts instead of the execution list.
          schema:
            type: boolean
        - name: since
          in: query
          required: false
          description: ISO date-time; with `stats=true`, only count runs after this time.
          schema:
            type: string
            format: date-time
      responses:
        '200':
          description: |
            An array of executions, or (with `stats=true`) an object like
            `{ total, completed, failed, in_progress }`.
          content:
            application/json:
              schema:
                oneOf:
                  - type: array
                    items:
                      $ref: '#/components/schemas/ScheduledTaskExecution'
                  - type: object
                    properties:
                      total:
                        type: integer
                      completed:
                        type: integer
                      failed:
                        type: integer
                      in_progress:
                        type: integer
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    ScheduledTaskExecution:
      type: object
      properties:
        id:
          type: integer
        scheduledTaskId:
          type: integer
        conversationId:
          type: string
          format: uuid
          nullable: true
          description: >-
            Thread id of the run — fetch the full transcript with GET
            /getConversation.
        status:
          type: string
          example: completed
        createdAt:
          type: string
          format: date-time
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          example: Bad Request
        details:
          type: array
          items:
            type: object
            additionalProperties: true
  responses:
    InternalServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Internal Server Error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: |
        JWT token from Clerk authentication.

        Must be from a user with `org:admin` role.

````