Red Hat · Arazzo Workflow

Red Hat Ansible Automation Platform Launch, Monitor, and Cancel Job

Version 1.0.0

Launch an existing job template, poll its job, and cancel it if it stalls.

1 workflow 2 source APIs 1 provider
View Spec View on GitHub CloudContainersEnterpriseHybrid CloudKubernetesLinuxOpen-SourceArazzoWorkflows

Provider

red-hat

Workflows

launch-monitor-cancel-job
Launch a known job template, monitor the job, and cancel it on demand.
Reads an existing job template to confirm it is launchable, launches a job, polls the job to a terminal state, and cancels the job when the caller requests an abort.
4 steps inputs: abort, limit, templateId, token outputs: finalStatus, jobId
1
getTemplate
Retrieve the job template to confirm it exists before attempting to launch a job from it.
2
launchJob
Launch a job from the confirmed template, optionally narrowing execution with a host limit pattern.
3
pollJob
Retrieve the job record and re-poll while it remains in a non-terminal state; end the workflow once it reaches a terminal status.
4
cancelJob
Cancel the running job. The API accepts the cancellation request for jobs that are currently pending or running.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Red Hat Ansible Automation Platform Launch, Monitor, and Cancel Job
  summary: Launch an existing job template, poll its job, and cancel it if it stalls.
  description: >-
    An operational control loop for Red Hat Ansible Automation Platform. The
    workflow confirms a job template exists, launches a job from it, and polls
    the job record. When the job completes it ends cleanly; when the caller
    decides the run is stuck, the same flow cancels the running job. Each step
    inlines its bearer token, request body, documented success criteria, and
    outputs so it can be executed directly against the v2 API.
  version: 1.0.0
  x-realizes-capability-ids:
  - BC-600.40
  x-capability-derivation:
    method: 'deterministic join: sourceDescriptions -> per-tag OpenAPI -> tag/capability edge. No classification at this step.'
    min_confidence: 0.7
    sources:
    - capability_id: BC-600.40
      capability_name: IT Operations Management
      spec: red-hat-jobs-api-openapi.yml
      confidence: 0.8
    model: Turbo EA Capabilities by Vincent Verdet — Turbo EA, https://github.com/vincentmakes/turbo-ea-capabilities, CC BY 4.0
sourceDescriptions:
- name: jobTemplatesApi
  url: ../openapi/red-hat-job-templates-api-openapi.yml
  type: openapi
- name: jobsApi
  url: ../openapi/red-hat-jobs-api-openapi.yml
  type: openapi
workflows:
- workflowId: launch-monitor-cancel-job
  summary: Launch a known job template, monitor the job, and cancel it on demand.
  description: >-
    Reads an existing job template to confirm it is launchable, launches a job,
    polls the job to a terminal state, and cancels the job when the caller
    requests an abort.
  inputs:
    type: object
    required:
    - token
    - templateId
    properties:
      token:
        type: string
        description: OAuth2 bearer token for the Automation Platform API.
      templateId:
        type: integer
        description: The id of the job template to launch.
      limit:
        type: string
        description: Optional host pattern to limit the inventory for this run.
      abort:
        type: boolean
        description: When true, the running job is cancelled instead of being awaited.
  steps:
  - stepId: getTemplate
    description: >-
      Retrieve the job template to confirm it exists before attempting to
      launch a job from it.
    operationId: getJobTemplate
    parameters:
    - name: id
      in: path
      value: $inputs.templateId
    - name: Authorization
      in: header
      value: Bearer $inputs.token
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      name: $response.body#/name
  - stepId: launchJob
    description: >-
      Launch a job from the confirmed template, optionally narrowing execution
      with a host limit pattern.
    operationId: launchJobTemplate
    parameters:
    - name: id
      in: path
      value: $inputs.templateId
    - name: Authorization
      in: header
      value: Bearer $inputs.token
    requestBody:
      contentType: application/json
      payload:
        limit: $inputs.limit
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      jobId: $response.body#/id
    onSuccess:
    - name: abortRequested
      type: goto
      stepId: cancelJob
      criteria:
      - condition: $inputs.abort == true
    - name: monitor
      type: goto
      stepId: pollJob
      criteria:
      - condition: $inputs.abort == false
  - stepId: pollJob
    description: >-
      Retrieve the job record and re-poll while it remains in a non-terminal
      state; end the workflow once it reaches a terminal status.
    operationId: getJob
    parameters:
    - name: id
      in: path
      value: $steps.launchJob.outputs.jobId
    - name: Authorization
      in: header
      value: Bearer $inputs.token
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      status: $response.body#/status
    onSuccess:
    - name: stillRunning
      type: goto
      stepId: pollJob
      criteria:
      - context: $response.body
        condition: $.status == 'new' || $.status == 'pending' || $.status == 'waiting' || $.status == 'running'
        type: jsonpath
    - name: terminal
      type: end
      criteria:
      - context: $response.body
        condition: $.status == 'successful' || $.status == 'failed' || $.status == 'error' || $.status == 'canceled'
        type: jsonpath
  - stepId: cancelJob
    description: >-
      Cancel the running job. The API accepts the cancellation request for jobs
      that are currently pending or running.
    operationId: cancelJob
    parameters:
    - name: id
      in: path
      value: $steps.launchJob.outputs.jobId
    - name: Authorization
      in: header
      value: Bearer $inputs.token
    successCriteria:
    - condition: $statusCode == 202
  outputs:
    jobId: $steps.launchJob.outputs.jobId
    finalStatus: $steps.pollJob.outputs.status

Work with this as data

Every workflow 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 arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • 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 workflow
curl "https://apis.io/api/v1/arazzo/red-hat-aap-launch-monitor-cancel-job-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?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.