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

# Run a Report On-Demand

> Triggers an immediate, on-demand generation of a report for a specified date range. This does not affect the regular schedule. The report generation is asynchronous and the result will appear in the Generated Reports list when complete.



## OpenAPI

````yaml /api/en/reports.yaml post /reports/sla/schedules/{scheduleId}/run
openapi: 3.0.3
info:
  title: Altostrat Reports API
  version: 1.0.0
  description: >-
    The Altostrat Reports API is the microservice responsible for scheduling,
    generating, and storing comprehensive Service Level Agreement (SLA) and
    network performance reports.


    It provides historical insights and accountability for network uptime by
    consuming fault data from across the Altostrat SDX platform and transforming
    it into scheduled, human-readable PDF reports.


    This API allows you to programmatically manage:

    - **SLA Report Schedules:** The core configuration object defining what data
    to collect, for which sites, and on what schedule (daily, weekly, monthly).

    - **Generated Reports:** The immutable, historical artifacts produced by a
    schedule run, including a detailed breakdown of site uptime and a
    downloadable PDF.


    Developers use this API to automate the creation of SLA report
    configurations and retrieve the resulting performance data for integration
    into dashboards or third-party systems.
servers:
  - url: https://v1.api.altostrat.io
    description: Altostrat Production API
security: []
tags:
  - name: SLA Report Schedules
    description: Manage the configuration of automated SLA reports.
  - name: Generated Reports
    description: Access and manage historically generated report results.
paths:
  /reports/sla/schedules/{scheduleId}/run:
    post:
      tags:
        - SLA Report Schedules
      summary: Run a Report On-Demand
      description: >-
        Triggers an immediate, on-demand generation of a report for a specified
        date range. This does not affect the regular schedule. The report
        generation is asynchronous and the result will appear in the Generated
        Reports list when complete.
      operationId: runSlaReportOnDemand
      parameters:
        - name: scheduleId
          in: path
          required: true
          description: >-
            The unique identifier for the SLA report schedule to run, prefixed
            with `sla_`.
          schema:
            type: string
            pattern: ^sla_[0-9a-zA-Z]{27}$
            example: sla_2ayc4Yy6w3g7Y2j4g4g4Yy6w3g7
      requestBody:
        description: The date range for the on-demand report.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RunReportRequest'
      responses:
        '202':
          description: Accepted. The report generation has been queued successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Report is being generated.
        '400':
          description: Bad Request - The date range is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found - The requested schedule does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal Server Error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    RunReportRequest:
      type: object
      description: Specifies the date range for an on-demand report run.
      required:
        - from_date
        - to_date
      properties:
        from_date:
          type: string
          format: date
          description: >-
            The start date for the report data (inclusive), in `YYYY-MM-DD`
            format. Must be before `to_date` and before tomorrow.
          example: '2025-10-01'
        to_date:
          type: string
          format: date
          description: >-
            The end date for the report data (inclusive), in `YYYY-MM-DD`
            format. Must be after `from_date` and before tomorrow.
          example: '2025-10-31'
    ErrorResponse:
      type: object
      properties:
        type:
          type: string
          description: A broad category for the error (e.g., 'invalid_request_error').
          example: invalid_request_error
        code:
          type: string
          description: A short, unique string identifying the specific error.
          example: parameter_missing
        message:
          type: string
          description: A human-readable description of what went wrong.
          example: The 'name' parameter is required for this request.
        doc_url:
          type: string
          description: >-
            A direct link to the documentation page for this specific error
            code.
          example: https://docs.altostrat.io/errors/parameter_missing
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Enter your authentication token.

````