APIContext Schedules API

Manage monitoring schedules, the locations they run from, and scheduled downtimes at both schedule and organization level. 23 operations — the largest single capability in the contract.

Operations 23

GET /api/3/schedules/ List-Schedules #
POST /api/3/schedules/ Create-Schedule #
GET /api/3/schedules/{schedule_id} Get-Schedule #
PUT /api/3/schedules/{schedule_id} Update-Schedule #
DELETE /api/3/schedules/{schedule_id} Delete-Schedule #
POST /api/3/schedules/{schedule_id}/targets/{target_id} Add-Call-To-Schedule #
DELETE /api/3/schedules/{schedule_id}/targets/{target_id} Remove-Call-From-Schedule #
GET /api/2/schedules/call/{call_id}/ List-Schedules-By-Call #
GET /api/2/schedules/workflow/{workflow_id}/ List-Schedules-By-Workflow #
GET /api/2/schedules/ List-Schedules #
POST /api/2/schedules/ Create-Schedule #
GET /api/2/schedules/{schedule_id}/ Get-Schedule #
POST /api/2/schedules/{schedule_id}/ Update-Schedule #
DELETE /api/2/schedules/{schedule_id}/ Delete-Schedule #
POST /api/2/schedules/{schedule_id}/call/{call_id} Ensure-Schedule-Call #
DELETE /api/2/schedules/{schedule_id}/call/{call_id} Remove-Schedule-Call #
POST /api/2/schedules/{schedule_id}/run/{workflow_id} Ensure-Schedule-Workflow #
DELETE /api/2/schedules/{schedule_id}/run/{workflow_id} Remove-Schedule-Workflow #
GET /api/2/schedules/{schedule_id}/downtime/ List-Schedule-Downtimes #
POST /api/2/schedules/{schedule_id}/downtime/ Create-Schedule-Downtime #
GET /api/2/schedules/downtime/{downtime_id}/ Get-Schedule-Downtime #
POST /api/2/schedules/downtime/{downtime_id}/ Update-Schedule-Downtime #
DELETE /api/2/schedules/downtime/{downtime_id}/ Delete-Schedule-Downtime #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/apicontext-schedules-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

apicontext-schedules-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: APIContext Schedules API
  description: API for the APImetrics platform This document is the 'Schedules' slice of the APIContext
    (APImetrics) platform OpenAPI published at https://client.apimetrics.io/openapi.json.
  version: v2026-09-02
  contact:
    name: APIContext Support
    url: https://apicontext.io/
    email: support@apicontext.com
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  termsOfService: http://apimetrics.io/tos/
servers:
- url: https://client.apimetrics.io
  description: APIContext (APImetrics) platform API
tags:
- name: Schedules
  description: '

    Manage schedules for a project.


    A schedule runs one or more monitors at a fixed frequency from a chosen set of

    regions, clouds and agent locations. Targets (monitors) can be set in bulk via

    the schedule body, or added and removed individually via the

    `add-call-to-schedule` and `remove-call-from-schedule` operations.

    '
- name: Schedules
  description: Manage schedules and their scheduled downtimes.
paths:
  /api/3/schedules/:
    get:
      tags:
      - Schedules
      summary: List-Schedules
      description: List schedules for the project.
      operationId: list-schedules
      security:
      - OAuth2: []
      - ApiKey: []
      parameters:
      - name: cursor
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Pagination cursor from a previous response's meta.next_cursor
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          maximum: 100
          minimum: 1
          title: Maximum number of schedules to return
          default: 25
      - name: apimetrics-project-id
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Apimetrics-Project-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api3__schedules__router___ListResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
      - Schedules
      summary: Create-Schedule
      description: Create a new schedule for the project.
      operationId: create-schedule
      security:
      - OAuth2: []
      - ApiKey: []
      parameters:
      - name: apimetrics-project-id
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Apimetrics-Project-Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EditableScheduleBody'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiSchedule'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/3/schedules/{schedule_id}:
    get:
      tags:
      - Schedules
      summary: Get-Schedule
      description: Get a specific schedule by ID.
      operationId: get-schedule
      security:
      - OAuth2: []
      - ApiKey: []
      parameters:
      - name: schedule_id
        in: path
        required: true
        schema:
          type: string
          pattern: ^[A-Za-z0-9_-]+$
          title: Schedule ID
      - name: apimetrics-project-id
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Apimetrics-Project-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiSchedule'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    put:
      tags:
      - Schedules
      summary: Update-Schedule
      description: Update an existing schedule.
      operationId: update-schedule
      security:
      - OAuth2: []
      - ApiKey: []
      parameters:
      - name: schedule_id
        in: path
        required: true
        schema:
          type: string
          pattern: ^[A-Za-z0-9_-]+$
          title: Schedule ID
      - name: apimetrics-project-id
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Apimetrics-Project-Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EditableScheduleBody'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiSchedule'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - Schedules
      summary: Delete-Schedule
      description: Delete an existing schedule for this org.
      operationId: delete-schedule
      security:
      - OAuth2: []
      - ApiKey: []
      parameters:
      - name: schedule_id
        in: path
        required: true
        schema:
          type: string
          pattern: ^[A-Za-z0-9_-]+$
          title: Schedule ID
      - name: apimetrics-project-id
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Apimetrics-Project-Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/3/schedules/{schedule_id}/targets/{target_id}:
    post:
      tags:
      - Schedules
      summary: Add-Call-To-Schedule
      description: Add a target to an existing schedule.
      operationId: add-call-to-schedule
      security:
      - OAuth2: []
      - ApiKey: []
      parameters:
      - name: schedule_id
        in: path
        required: true
        schema:
          type: string
          pattern: ^[A-Za-z0-9_-]+$
          title: Schedule ID
      - name: target_id
        in: path
        required: true
        schema:
          type: string
          pattern: ^[A-Za-z0-9_-]+$
          title: Resource ID
      - name: apimetrics-project-id
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Apimetrics-Project-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiSchedule'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - Schedules
      summary: Remove-Call-From-Schedule
      description: Remove a target from an existing schedule.
      operationId: remove-call-from-schedule
      security:
      - OAuth2: []
      - ApiKey: []
      parameters:
      - name: schedule_id
        in: path
        required: true
        schema:
          type: string
          pattern: ^[A-Za-z0-9_-]+$
          title: Schedule ID
      - name: target_id
        in: path
        required: true
        schema:
          type: string
          pattern: ^[A-Za-z0-9_-]+$
          title: Resource ID
      - name: apimetrics-project-id
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Apimetrics-Project-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiSchedule'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/2/schedules/call/{call_id}/:
    get:
      tags:
      - Schedules
      summary: List-Schedules-By-Call
      description: List schedules that target a specific API call.
      operationId: list-schedules-by-call
      security:
      - OAuth2: []
      - ApiKey: []
      parameters:
      - name: call_id
        in: path
        required: true
        schema:
          type: string
          pattern: ^[A-Za-z0-9_-]+$
          title: API Monitor ID
      - name: cursor
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Cursor
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          maximum: 1000
          minimum: 1
          default: 100
          title: Limit
      - name: apimetrics-project-id
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Apimetrics-Project-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScheduleListResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/2/schedules/workflow/{workflow_id}/:
    get:
      tags:
      - Schedules
      summary: List-Schedules-By-Workflow
      description: List schedules that target a specific workflow.
      operationId: list-schedules-by-workflow
      security:
      - OAuth2: []
      - ApiKey: []
      parameters:
      - name: workflow_id
        in: path
        required: true
        schema:
          type: string
          pattern: ^[A-Za-z0-9_-]+$
          title: Workflow ID
      - name: cursor
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Cursor
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          maximum: 1000
          minimum: 1
          default: 100
          title: Limit
      - name: apimetrics-project-id
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Apimetrics-Project-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScheduleListResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/2/schedules/:
    get:
      tags:
      - Schedules
      summary: List-Schedules
      description: 'List all schedules for the authenticated project.


        A project with no schedules and no cursor gets a freshly-created

        "Default Schedule".


        Deprecated: use ``GET /api/3/schedules/`` instead.'
      operationId: list-schedules
      deprecated: true
      security:
      - OAuth2: []
      - ApiKey: []
      parameters:
      - name: cursor
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Cursor
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          maximum: 1000
          minimum: 1
          default: 100
          title: Limit
      - name: apimetrics-project-id
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Apimetrics-Project-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScheduleListResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
      - Schedules
      summary: Create-Schedule
      description: 'Create a new schedule.


        Deprecated: use ``POST /api/3/schedules/`` instead.'
      operationId: create-schedule
      deprecated: true
      security:
      - OAuth2: []
      - ApiKey: []
      parameters:
      - name: apimetrics-project-id
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Apimetrics-Project-Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScheduleCreateBody'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScheduleResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/2/schedules/{schedule_id}/:
    get:
      tags:
      - Schedules
      summary: Get-Schedule
      description: 'Get a single schedule by id.


        Deprecated: use ``GET /api/3/schedules/{schedule_id}`` instead.'
      operationId: get-schedule
      deprecated: true
      security:
      - OAuth2: []
      - ApiKey: []
      parameters:
      - name: schedule_id
        in: path
        required: true
        schema:
          type: string
          pattern: ^[A-Za-z0-9_-]+$
          title: Schedule ID
      - name: apimetrics-project-id
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Apimetrics-Project-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScheduleResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
      - Schedules
      summary: Update-Schedule
      description: 'Partially update a schedule (only supplied fields change).


        Deprecated: use ``PUT /api/3/schedules/{schedule_id}`` instead.'
      operationId: update-schedule
      deprecated: true
      security:
      - OAuth2: []
      - ApiKey: []
      parameters:
      - name: schedule_id
        in: path
        required: true
        schema:
          type: string
          pattern: ^[A-Za-z0-9_-]+$
          title: Schedule ID
      - name: apimetrics-project-id
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Apimetrics-Project-Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScheduleUpdateBody'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScheduleResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - Schedules
      summary: Delete-Schedule
      description: 'Delete a schedule and return its last representation.


        Deprecated: use ``DELETE /api/3/schedules/{schedule_id}`` instead.'
      operationId: delete-schedule
      deprecated: true
      security:
      - OAuth2: []
      - ApiKey: []
      parameters:
      - name: schedule_id
        in: path
        required: true
        schema:
          type: string
          pattern: ^[A-Za-z0-9_-]+$
          title: Schedule ID
      - name: apimetrics-project-id
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Apimetrics-Project-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScheduleResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/2/schedules/{schedule_id}/call/{call_id}:
    post:
      tags:
      - Schedules
      summary: Ensure-Schedule-Call
      description: 'Associate an API call with a schedule (idempotent; 202 if already associated).


        Deprecated: use ``POST /api/3/schedules/{schedule_id}/targets/{target_id}``

        instead.'
      operationId: ensure-schedule-call
      deprecated: true
      security:
      - OAuth2: []
      - ApiKey: []
      parameters:
      - name: schedule_id
        in: path
        required: true
        schema:
          type: string
          pattern: ^[A-Za-z0-9_-]+$
          title: Schedule ID
      - name: call_id
        in: path
        required: true
        schema:
          type: string
          pattern: ^[A-Za-z0-9_-]+$
          title: API Monitor ID
      - name: apimetrics-project-id
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Apimetrics-Project-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScheduleResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - Schedules
      summary: Remove-Schedule-Call
      description: 'Disassociate an API call from a schedule (202 if it was not associated).


        Deprecated: use ``DELETE /api/3/schedules/{schedule_id}/targets/{target_id}``

        instead.'
      operationId: remove-schedule-call
      deprecated: true
      security:
      - OAuth2: []
      - ApiKey: []
      parameters:
      - name: schedule_id
        in: path
        required: true
        schema:
          type: string
          pattern: ^[A-Za-z0-9_-]+$
          title: Schedule ID
      - name: call_id
        in: path
        required: true
        schema:
          type: string
          pattern: ^[A-Za-z0-9_-]+$
          title: API Monitor ID
      - name: apimetrics-project-id
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Apimetrics-Project-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScheduleResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/2/schedules/{schedule_id}/run/{workflow_id}:
    post:
      tags:
      - Schedules
      summary: Ensure-Schedule-Workflow
      description: 'Associate a workflow with a schedule (idempotent; 202 if already associated).


        Deprecated: use ``POST /api/3/schedules/{schedule_id}/targets/{target_id}``

        instead -- it accepts both call and workflow target ids.'
      operationId: ensure-schedule-workflow
      deprecated: true
      security:
      - OAuth2: []
      - ApiKey: []
      parameters:
      - name: schedule_id
        in: path
        required: true
        schema:
          type: string
          pattern: ^[A-Za-z0-9_-]+$
          title: Schedule ID
      - name: workflow_id
        in: path
        required: true
        schema:
          type: string
          pattern: ^[A-Za-z0-9_-]+$
          title: Workflow ID
      - name: apimetrics-project-id
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Apimetrics-Project-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScheduleResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - Schedules
      summary: Remove-Schedule-Workflow
      description: 'Disassociate a workflow from a schedule (202 if it was not associated).


        Deprecated: use ``DELETE /api/3/schedules/{schedule_id}/targets/{target_id}``

        instead -- it accepts both call and workflow target ids.'
      operationId: remove-schedule-workflow
      deprecated: true
      security:
      - OAuth2: []
      - ApiKey: []
      parameters:
      - name: schedule_id
        in: path
        required: true
        schema:
          type: string
          pattern: ^[A-Za-z0-9_-]+$
          title: Schedule ID
      - name: workflow_id
        in: path
        required: true
        schema:
          type: string
          pattern: ^[A-Za-z0-9_-]+$
          title: Workflow ID
      - name: apimetrics-project-id
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Apimetrics-Project-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScheduleResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/2/schedules/{schedule_id}/downtime/:
    get:
      tags:
      - Schedules
      summary: List-Schedule-Downtimes
      description: List scheduled downtimes for a schedule.
      operationId: list-schedule-downtimes
      security:
      - OAuth2: []
      - ApiKey: []
      parameters:
      - name: schedule_id
        in: path
        required: true
        schema:
          type: string
          pattern: ^[A-Za-z0-9_-]+$
          title: Schedule ID
      - name: cursor
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Cursor
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          maximum: 1000
          minimum: 1
          default: 100
          title: Limit
      - name: apimetrics-project-id
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Apimetrics-Project-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DowntimeListResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
      - Schedules
      summary: Create-Schedule-Downtime
      description: Create a scheduled downtime under a schedule.
      operationId: create-schedule-downtime
      security:
      - OAuth2: []
      - ApiKey: []
      parameters:
      - name: schedule_id
        in: path
        required: true
        schema:
          type: string
          pattern: ^[A-Za-z0-9_-]+$
          title: Schedule ID
      - name: apimetrics-project-id
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Apimetrics-Project-Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DowntimeCreateBody'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DowntimeResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/2/schedules/downtime/{downtime_id}/:
    get:
      tags:
      - Schedules
      summary: Get-Schedule-Downtime
      description: Get a single scheduled downtime by id.
      operationId: get-schedule-downtime
      security:
      - OAuth2: []
      - ApiKey: []
      parameters:
      - name: downtime_id
        in: path
        required: true
        schema:
          type: string
          pattern: ^[A-Za-z0-9_-]+$
          title: Resource ID
      - name: apimetrics-project-id
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Apimetrics-Project-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DowntimeResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
      - Schedules
      summary: Update-Schedule-Downtime
      description: Partially update a scheduled downtime (only supplied fields change).
      operationId: update-schedule-downtime
      security:
      - OAuth2: []
      - ApiKey: []
      parameters:
      - name: downtime_id
        in: path
        required: true
        schema:
          type: string
          pattern: ^[A-Za-z0-9_-]+$
          title: Resource ID
      - name: apimetrics-project-id
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Apimetrics-Project-Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DowntimeUpdateBody'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DowntimeResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - Schedules
      summary: Delete-Schedule-Downtime
      description: Delete a scheduled downtime and return its last representation.
      operationId: delete-schedule-downtime
      security:
      - OAuth2: []
      - ApiKey: []
      parameters:
      - name: downtime_id
        in: path
        required: true
        schema:
          type: string
          pattern: ^[A-Za-z0-9_-]+$
          title: Resource ID
      - name: apimetrics-project-id
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Apimetrics-Project-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DowntimeResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  securitySchemes:
    OAuth2:
      type: oauth2
      flows:
        authorizationCode:
          scopes:
            openid: OpenID Connect identity
            profile: User profile
            email: User email address
          authorizationUrl: https://auth.apimetrics.io/authorize?audience=https://client.apimetrics.io
          tokenUrl: https://auth.apimetrics.io/oauth/token
    ApiKey:
      type: apiKey
      in: header
      name: X-Api-Key
  schemas:
    ApiSchedule:
      properties:
        meta:
          $ref: '#/components/schemas/ApiScheduleMeta'
        schedule:
          $ref: '#/components/schemas/ApiScheduleSpec'
      type: object
      required:
      - meta
      - schedule
      title: ApiSchedule
    ApiScheduleMeta:
      properties:
        id:
          type: string
          title: Id
          description: Unique identifier for the schedule
        name:
          type: string
          title: Name
          description: Display name for the schedule
        owner:
          type: string
          title: Owner
          description: ID of the project that owns the schedule
        created:
          type: string
          format: date-time
          title: Created
          description: When the schedule was first created
        last_update:
          type: string
          format: date-time
          title: Last Update
          description: When the schedule was most recently modified
        tags:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Tags
          description: Tags applied to the schedule
      type: object
      required:
      - id
      - name
      - owner
      - created
      - last_update
      - tags
      title: ApiScheduleMeta
    ApiScheduleSpec:
      properties:
        frequency:
          type: integer
          title: Frequency
          description: Run interval in seconds
        target_ids:
          items:
            type: string
          type: array
          title: Target Ids
          description: IDs of the monitors run on this schedule
        regions:
          items:
            type: string
          type: array
          title: Regions
          description: Regions and clouds the schedule runs from (['all'] when worldwide)
        locations:
          items:
            type: string
          type: array
          title: Locations
          description: Specific agent locations the schedule runs from
        backoff_method:
          anyOf:
          - $ref: '#/components/schemas/BackoffMethod'
          - type: 'null'
          description: Retry backoff strategy applied on failure
      type: object
      required:
      - frequency
      - target_ids
      - regions
      - locations
      - backoff_method
      title: ApiScheduleSpec
    BackoffMethod:
      type: string
      enum:
      - fibo
      - expo
      - constant
      - none
      title: BackoffMethod
    DowntimeBodyResponse:
      properties:
        start_time:
          type: string
          title: Start Time
        end_time:
          type: string
          title: End Time
        zone:
          type: string
          title: Zone
        repeated:
          type: boolean
          title: Repeated
        repeat_days:
          type: integer
          title:

# --- truncated at 32 KB (43 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/apicontext/refs/heads/main/openapi/apicontext-schedules-api-openapi.yml