openapi: 3.0.1 info: title: Mage Blocks Pipeline Schedules API description: REST API exposed by the self-hosted Mage data pipeline app. It covers triggering pipeline runs via API triggers (pipeline schedules), reading pipeline runs, and managing pipelines, blocks, and pipeline schedules. Requests are authenticated with an api_key (query parameter or request body) plus an OAuth token supplied via the OAUTH-TOKEN header or the oauth_token cookie. The default local server runs on port 6789. termsOfService: https://www.mage.ai/terms contact: name: Mage url: https://www.mage.ai version: '1.0' servers: - url: http://localhost:6789/api description: Default self-hosted Mage app - url: https://{host}/api description: Custom self-hosted or Mage Pro cloud deployment variables: host: default: localhost:6789 description: Host and port of the Mage deployment security: - ApiKeyAuth: [] OAuthToken: [] tags: - name: Pipeline Schedules description: Manage triggers (schedule, event, and API triggers). paths: /pipeline_schedules: get: operationId: listPipelineSchedules tags: - Pipeline Schedules summary: List pipeline schedules parameters: - name: api_key in: query required: false schema: type: string responses: '200': description: A collection of pipeline schedules. content: application/json: schema: $ref: '#/components/schemas/PipelineSchedulesResponse' /pipelines/{uuid}/pipeline_schedules: post: operationId: createPipelineSchedule tags: - Pipeline Schedules summary: Create a pipeline schedule (trigger) for a pipeline parameters: - name: uuid in: path required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreatePipelineScheduleRequest' responses: '200': description: The created pipeline schedule. content: application/json: schema: $ref: '#/components/schemas/PipelineScheduleResponse' /pipeline_schedules/{id}: put: operationId: updatePipelineSchedule tags: - Pipeline Schedules summary: Update a pipeline schedule parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpdatePipelineScheduleRequest' responses: '200': description: The updated pipeline schedule. content: application/json: schema: $ref: '#/components/schemas/PipelineScheduleResponse' components: schemas: CreatePipelineScheduleRequest: type: object required: - pipeline_schedule properties: pipeline_schedule: type: object properties: name: type: string schedule_type: type: string schedule_interval: type: string PipelineScheduleResponse: type: object properties: pipeline_schedule: $ref: '#/components/schemas/PipelineSchedule' PipelineSchedulesResponse: type: object properties: pipeline_schedules: type: array items: $ref: '#/components/schemas/PipelineSchedule' PipelineSchedule: type: object properties: id: type: integer name: type: string pipeline_uuid: type: string schedule_type: type: string enum: - time - event - api schedule_interval: type: string status: type: string enum: - active - inactive token: type: string UpdatePipelineScheduleRequest: type: object properties: pipeline_schedule: $ref: '#/components/schemas/PipelineSchedule' securitySchemes: ApiKeyAuth: type: apiKey in: query name: api_key description: API key passed as the api_key query parameter or in the request body. OAuthToken: type: apiKey in: header name: OAUTH-TOKEN description: Decoded OAuth token passed in the OAUTH-TOKEN header, or the raw token passed via the oauth_token cookie.