arazzo: 1.0.1 info: title: ZenML Track Scheduled Pipeline summary: Resolve a schedule, find the run it produced for its pipeline, and read that run. description: >- Tracks a scheduled pipeline from its schedule definition through to an actual run. The workflow lists schedules to resolve a schedule and its target pipeline, lists the runs for that pipeline to find the most recent one the schedule produced, and reads that run in detail. Every step spells out its request inline, including the bearer Authorization header, so the flow can be read and executed without opening the underlying OpenAPI description. version: 1.0.0 sourceDescriptions: - name: zenmlApi url: ../openapi/zenml-openapi.yml type: openapi workflows: - workflowId: track-scheduled-pipeline summary: From a schedule, locate and read the latest run of its target pipeline. description: >- Lists schedules to resolve a schedule and its pipeline id, lists runs for that pipeline, and reads the most recent run in detail. inputs: type: object required: - accessToken properties: accessToken: type: string description: ZenML JWT access token obtained from the login endpoint. steps: - stepId: resolveSchedule description: >- List schedules and select the first active schedule to resolve its target pipeline id. operationId: listSchedules parameters: - name: Authorization in: header value: Bearer $inputs.accessToken - name: page in: query value: 1 - name: size in: query value: 20 successCriteria: - condition: $statusCode == 200 outputs: scheduleId: $response.body#/items/0/id cronExpression: $response.body#/items/0/cron_expression pipelineId: $response.body#/items/0/pipeline_id - stepId: findScheduledRun description: >- List the runs for the schedule's pipeline, newest first, to find the run the schedule most recently produced. operationId: listPipelineRuns parameters: - name: Authorization in: header value: Bearer $inputs.accessToken - name: pipeline_id in: query value: $steps.resolveSchedule.outputs.pipelineId - name: page in: query value: 1 - name: size in: query value: 1 successCriteria: - condition: $statusCode == 200 outputs: runId: $response.body#/items/0/id - stepId: readScheduledRun description: >- Read the most recent scheduled run in detail to surface its status and timing. operationId: getPipelineRun parameters: - name: Authorization in: header value: Bearer $inputs.accessToken - name: run_id in: path value: $steps.findScheduledRun.outputs.runId successCriteria: - condition: $statusCode == 200 outputs: runId: $response.body#/id status: $response.body#/status startTime: $response.body#/start_time outputs: scheduleId: $steps.resolveSchedule.outputs.scheduleId cronExpression: $steps.resolveSchedule.outputs.cronExpression runStatus: $steps.readScheduledRun.outputs.status