Red Hat Ansible Automation Platform API

API for automating IT infrastructure, application deployment, and configuration management through Ansible.

Documentation

Specifications

Other Resources

OpenAPI Specification

red-hat-ansible-automation-platform-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Red Hat Ansible Automation Platform API
  description: >-
    The Red Hat Ansible Automation Platform API provides programmatic access to
    the automation controller for managing IT infrastructure automation. It
    supports creating and launching job templates, managing inventories, tracking
    job execution status, and configuring credentials for connecting to managed
    hosts and external services.
  version: '2.6'
  contact:
    name: Red Hat Support
    url: https://access.redhat.com/support
  termsOfService: https://www.redhat.com/en/about/terms-use
externalDocs:
  description: Ansible Automation Platform API Documentation
  url: https://docs.redhat.com/en/documentation/red_hat_ansible_automation_platform/2.6/html-single/automation_execution_api_overview/index
servers:
- url: https://ansible-platform.example.com
  description: Ansible Automation Platform Server
tags:
- name: Credentials
  description: >-
    Operations for managing credentials used by automation jobs to
    authenticate with managed hosts and external services.
- name: Inventories
  description: >-
    Operations for managing inventories that define collections of hosts
    and groups for automation targeting.
- name: Job Templates
  description: >-
    Operations for managing job templates that define parameterized playbook
    runs against inventories of managed hosts.
- name: Jobs
  description: >-
    Operations for launching, monitoring, and managing automation job
    executions and their output.
- name: Organizations
  description: >-
    Operations for managing organizations that provide multi-tenancy
    and access control boundaries.
- name: Projects
  description: >-
    Operations for managing projects that represent collections of Ansible
    playbooks sourced from version control.
- name: Workflow Job Templates
  description: >-
    Operations for managing workflow job templates that chain multiple
    job templates into orchestrated automation workflows.
security:
- bearerAuth: []
paths:
  /api/v2/job_templates/:
    get:
      operationId: listJobTemplates
      summary: Red Hat List Job Templates
      description: >-
        Retrieves a paginated list of job templates. Job templates define the
        parameters for running Ansible playbooks against specified inventories,
        including the project, playbook, credentials, and extra variables.
      tags:
      - Job Templates
      parameters:
      - $ref: '#/components/parameters/PageParam'
      - $ref: '#/components/parameters/PageSizeParam'
      - $ref: '#/components/parameters/SearchParam'
      - $ref: '#/components/parameters/OrderingParam'
      responses:
        '200':
          description: Successfully retrieved job templates
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedJobTemplateList'
              examples:
                Listjobtemplates200Example:
                  summary: Default listJobTemplates 200 response
                  x-microcks-default: true
                  value:
                    count: 10
                    next: https://www.example.com
                    previous: https://www.example.com
                    results:
                    - id: abc123
                      name: Example Title
                      description: A sample description.
                      job_type: run
                      inventory: 10
                      project: 10
                      playbook: example_value
                      forks: 10
                      limit: example_value
                      verbosity: 0
                      extra_vars: example_value
                      ask_variables_on_launch: true
                      ask_inventory_on_launch: true
                      ask_credential_on_launch: true
                      survey_enabled: true
                      created: '2026-01-15T10:30:00Z'
                      modified: '2026-01-15T10:30:00Z'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      operationId: createJobTemplate
      summary: Red Hat Create a Job Template
      description: >-
        Creates a new job template with the specified configuration. Requires
        at minimum a name, project, playbook, and inventory reference.
      tags:
      - Job Templates
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/JobTemplate'
            examples:
              CreatejobtemplateRequestExample:
                summary: Default createJobTemplate request
                x-microcks-default: true
                value:
                  id: abc123
                  name: Example Title
                  description: A sample description.
                  job_type: run
                  inventory: 10
                  project: 10
                  playbook: example_value
                  forks: 10
                  limit: example_value
                  verbosity: 0
                  extra_vars: example_value
                  ask_variables_on_launch: true
                  ask_inventory_on_launch: true
                  ask_credential_on_launch: true
                  survey_enabled: true
                  created: '2026-01-15T10:30:00Z'
                  modified: '2026-01-15T10:30:00Z'
      responses:
        '201':
          description: Job template created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobTemplate'
              examples:
                Createjobtemplate201Example:
                  summary: Default createJobTemplate 201 response
                  x-microcks-default: true
                  value:
                    id: abc123
                    name: Example Title
                    description: A sample description.
                    job_type: run
                    inventory: 10
                    project: 10
                    playbook: example_value
                    forks: 10
                    limit: example_value
                    verbosity: 0
                    extra_vars: example_value
                    ask_variables_on_launch: true
                    ask_inventory_on_launch: true
                    ask_credential_on_launch: true
                    survey_enabled: true
                    created: '2026-01-15T10:30:00Z'
                    modified: '2026-01-15T10:30:00Z'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /api/v2/job_templates/{id}/:
    get:
      operationId: getJobTemplate
      summary: Red Hat Get a Job Template
      description: >-
        Retrieves the details of a specific job template by its identifier.
      tags:
      - Job Templates
      parameters:
      - $ref: '#/components/parameters/IdParam'
      responses:
        '200':
          description: Successfully retrieved job template
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobTemplate'
              examples:
                Getjobtemplate200Example:
                  summary: Default getJobTemplate 200 response
                  x-microcks-default: true
                  value:
                    id: abc123
                    name: Example Title
                    description: A sample description.
                    job_type: run
                    inventory: 10
                    project: 10
                    playbook: example_value
                    forks: 10
                    limit: example_value
                    verbosity: 0
                    extra_vars: example_value
                    ask_variables_on_launch: true
                    ask_inventory_on_launch: true
                    ask_credential_on_launch: true
                    survey_enabled: true
                    created: '2026-01-15T10:30:00Z'
                    modified: '2026-01-15T10:30:00Z'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    patch:
      operationId: updateJobTemplate
      summary: Red Hat Update a Job Template
      description: >-
        Updates an existing job template. Only the fields provided in the
        request body will be modified.
      tags:
      - Job Templates
      parameters:
      - $ref: '#/components/parameters/IdParam'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/JobTemplate'
            examples:
              UpdatejobtemplateRequestExample:
                summary: Default updateJobTemplate request
                x-microcks-default: true
                value:
                  id: abc123
                  name: Example Title
                  description: A sample description.
                  job_type: run
                  inventory: 10
                  project: 10
                  playbook: example_value
                  forks: 10
                  limit: example_value
                  verbosity: 0
                  extra_vars: example_value
                  ask_variables_on_launch: true
                  ask_inventory_on_launch: true
                  ask_credential_on_launch: true
                  survey_enabled: true
                  created: '2026-01-15T10:30:00Z'
                  modified: '2026-01-15T10:30:00Z'
      responses:
        '200':
          description: Job template updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobTemplate'
              examples:
                Updatejobtemplate200Example:
                  summary: Default updateJobTemplate 200 response
                  x-microcks-default: true
                  value:
                    id: abc123
                    name: Example Title
                    description: A sample description.
                    job_type: run
                    inventory: 10
                    project: 10
                    playbook: example_value
                    forks: 10
                    limit: example_value
                    verbosity: 0
                    extra_vars: example_value
                    ask_variables_on_launch: true
                    ask_inventory_on_launch: true
                    ask_credential_on_launch: true
                    survey_enabled: true
                    created: '2026-01-15T10:30:00Z'
                    modified: '2026-01-15T10:30:00Z'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    delete:
      operationId: deleteJobTemplate
      summary: Red Hat Delete a Job Template
      description: >-
        Deletes a job template. Associated job runs will not be deleted but
        will no longer be linked to a template.
      tags:
      - Job Templates
      parameters:
      - $ref: '#/components/parameters/IdParam'
      responses:
        '204':
          description: Job template deleted successfully
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /api/v2/job_templates/{id}/launch/:
    post:
      operationId: launchJobTemplate
      summary: Red Hat Launch a Job Template
      description: >-
        Launches a job from the specified job template. Optional extra variables,
        credentials, and inventory overrides can be provided in the request
        body. Returns the created job record with its identifier for tracking
        execution progress.
      tags:
      - Job Templates
      parameters:
      - $ref: '#/components/parameters/IdParam'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                extra_vars:
                  type: object
                  description: Additional variables to pass to the playbook run.
                inventory:
                  type: integer
                  description: Override inventory for this job launch.
                credentials:
                  type: array
                  description: Override credentials for this job launch.
                  items:
                    type: integer
                limit:
                  type: string
                  description: Host pattern to further limit the inventory.
                tags:
                  type: string
                  description: Comma-separated list of playbook tags to run.
            examples:
              LaunchjobtemplateRequestExample:
                summary: Default launchJobTemplate request
                x-microcks-default: true
                value:
                  extra_vars: example_value
                  inventory: 10
                  credentials:
                  - 10
                  limit: example_value
                  tags: example_value
      responses:
        '201':
          description: Job launched successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Job'
              examples:
                Launchjobtemplate201Example:
                  summary: Default launchJobTemplate 201 response
                  x-microcks-default: true
                  value:
                    id: abc123
                    name: Example Title
                    status: new
                    failed: true
                    started: '2026-01-15T10:30:00Z'
                    finished: '2026-01-15T10:30:00Z'
                    elapsed: 42.5
                    job_template: 10
                    inventory: 10
                    project: 10
                    playbook: example_value
                    launch_type: manual
                    created: '2026-01-15T10:30:00Z'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /api/v2/jobs/:
    get:
      operationId: listJobs
      summary: Red Hat List Jobs
      description: >-
        Retrieves a paginated list of job executions. Jobs represent individual
        runs of job templates against inventories.
      tags:
      - Jobs
      parameters:
      - $ref: '#/components/parameters/PageParam'
      - $ref: '#/components/parameters/PageSizeParam'
      - $ref: '#/components/parameters/SearchParam'
      - $ref: '#/components/parameters/OrderingParam'
      responses:
        '200':
          description: Successfully retrieved jobs
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedJobList'
              examples:
                Listjobs200Example:
                  summary: Default listJobs 200 response
                  x-microcks-default: true
                  value:
                    count: 10
                    next: https://www.example.com
                    previous: https://www.example.com
                    results:
                    - id: abc123
                      name: Example Title
                      status: new
                      failed: true
                      started: '2026-01-15T10:30:00Z'
                      finished: '2026-01-15T10:30:00Z'
                      elapsed: 42.5
                      job_template: 10
                      inventory: 10
                      project: 10
                      playbook: example_value
                      launch_type: manual
                      created: '2026-01-15T10:30:00Z'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /api/v2/jobs/{id}/:
    get:
      operationId: getJob
      summary: Red Hat Get a Job
      description: >-
        Retrieves the details of a specific job execution, including its
        status, timing, and associated template information.
      tags:
      - Jobs
      parameters:
      - $ref: '#/components/parameters/IdParam'
      responses:
        '200':
          description: Successfully retrieved job details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Job'
              examples:
                Getjob200Example:
                  summary: Default getJob 200 response
                  x-microcks-default: true
                  value:
                    id: abc123
                    name: Example Title
                    status: new
                    failed: true
                    started: '2026-01-15T10:30:00Z'
                    finished: '2026-01-15T10:30:00Z'
                    elapsed: 42.5
                    job_template: 10
                    inventory: 10
                    project: 10
                    playbook: example_value
                    launch_type: manual
                    created: '2026-01-15T10:30:00Z'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /api/v2/jobs/{id}/cancel/:
    post:
      operationId: cancelJob
      summary: Red Hat Cancel a Job
      description: >-
        Cancels a running job. Only jobs that are currently pending or running
        can be cancelled.
      tags:
      - Jobs
      parameters:
      - $ref: '#/components/parameters/IdParam'
      responses:
        '202':
          description: Job cancellation accepted
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /api/v2/inventories/:
    get:
      operationId: listInventories
      summary: Red Hat List Inventories
      description: >-
        Retrieves a paginated list of inventories. Inventories contain
        the hosts and groups that automation jobs run against.
      tags:
      - Inventories
      parameters:
      - $ref: '#/components/parameters/PageParam'
      - $ref: '#/components/parameters/PageSizeParam'
      - $ref: '#/components/parameters/SearchParam'
      responses:
        '200':
          description: Successfully retrieved inventories
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedInventoryList'
              examples:
                Listinventories200Example:
                  summary: Default listInventories 200 response
                  x-microcks-default: true
                  value:
                    count: 10
                    next: https://www.example.com
                    previous: https://www.example.com
                    results:
                    - id: abc123
                      name: Example Title
                      description: A sample description.
                      organization: 10
                      kind: ''
                      host_count: 10
                      total_groups: 10
                      has_inventory_sources: true
                      created: '2026-01-15T10:30:00Z'
                      modified: '2026-01-15T10:30:00Z'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      operationId: createInventory
      summary: Red Hat Create an Inventory
      description: >-
        Creates a new inventory within the specified organization.
      tags:
      - Inventories
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Inventory'
            examples:
              CreateinventoryRequestExample:
                summary: Default createInventory request
                x-microcks-default: true
                value:
                  id: abc123
                  name: Example Title
                  description: A sample description.
                  organization: 10
                  kind: ''
                  host_count: 10
                  total_groups: 10
                  has_inventory_sources: true
                  created: '2026-01-15T10:30:00Z'
                  modified: '2026-01-15T10:30:00Z'
      responses:
        '201':
          description: Inventory created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Inventory'
              examples:
                Createinventory201Example:
                  summary: Default createInventory 201 response
                  x-microcks-default: true
                  value:
                    id: abc123
                    name: Example Title
                    description: A sample description.
                    organization: 10
                    kind: ''
                    host_count: 10
                    total_groups: 10
                    has_inventory_sources: true
                    created: '2026-01-15T10:30:00Z'
                    modified: '2026-01-15T10:30:00Z'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /api/v2/projects/:
    get:
      operationId: listProjects
      summary: Red Hat List Projects
      description: >-
        Retrieves a paginated list of projects. Projects represent collections
        of Ansible playbooks sourced from a version control system.
      tags:
      - Projects
      parameters:
      - $ref: '#/components/parameters/PageParam'
      - $ref: '#/components/parameters/PageSizeParam'
      - $ref: '#/components/parameters/SearchParam'
      responses:
        '200':
          description: Successfully retrieved projects
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedProjectList'
              examples:
                Listprojects200Example:
                  summary: Default listProjects 200 response
                  x-microcks-default: true
                  value:
                    count: 10
                    next: https://www.example.com
                    previous: https://www.example.com
                    results:
                    - id: abc123
                      name: Example Title
                      description: A sample description.
                      scm_type: ''
                      scm_url: https://www.example.com
                      scm_branch: example_value
        '401':
          $ref: '#/components/responses/UnauthorizedError'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /api/v2/credentials/:
    get:
      operationId: listCredentials
      summary: Red Hat List Credentials
      description: >-
        Retrieves a paginated list of credentials used for authenticating
        automation jobs with managed hosts and external services.
      tags:
      - Credentials
      parameters:
      - $ref: '#/components/parameters/PageParam'
      - $ref: '#/components/parameters/PageSizeParam'
      - $ref: '#/components/parameters/SearchParam'
      responses:
        '200':
          description: Successfully retrieved credentials
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedCredentialList'
              examples:
                Listcredentials200Example:
                  summary: Default listCredentials 200 response
                  x-microcks-default: true
                  value:
                    count: 10
                    next: https://www.example.com
                    previous: https://www.example.com
                    results:
                    - id: abc123
                      name: Example Title
                      description: A sample description.
                      credential_type: 10
                      organization: 10
        '401':
          $ref: '#/components/responses/UnauthorizedError'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /api/v2/workflow_job_templates/:
    get:
      operationId: listWorkflowJobTemplates
      summary: Red Hat List Workflow Job Templates
      description: >-
        Retrieves a paginated list of workflow job templates. Workflows chain
        multiple job templates into orchestrated automation sequences with
        conditional branching.
      tags:
      - Workflow Job Templates
      parameters:
      - $ref: '#/components/parameters/PageParam'
      - $ref: '#/components/parameters/PageSizeParam'
      - $ref: '#/components/parameters/SearchParam'
      responses:
        '200':
          description: Successfully retrieved workflow job templates
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedList'
              examples:
                Listworkflowjobtemplates200Example:
                  summary: Default listWorkflowJobTemplates 200 response
                  x-microcks-default: true
                  value:
                    count: 10
                    next: https://www.example.com
                    previous: https://www.example.com
                    results:
                    - {}
        '401':
          $ref: '#/components/responses/UnauthorizedError'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /api/v2/organizations/:
    get:
      operationId: listOrganizations
      summary: Red Hat List Organizations
      description: >-
        Retrieves a paginated list of organizations that provide multi-tenancy
        boundaries for access control and resource management.
      tags:
      - Organizations
      parameters:
      - $ref: '#/components/parameters/PageParam'
      - $ref: '#/components/parameters/PageSizeParam'
      - $ref: '#/components/parameters/SearchParam'
      responses:
        '200':
          description: Successfully retrieved organizations
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedList'
              examples:
                Listorganizations200Example:
                  summary: Default listOrganizations 200 response
                  x-microcks-default: true
                  value:
                    count: 10
                    next: https://www.example.com
                    previous: https://www.example.com
                    results:
                    - {}
        '401':
          $ref: '#/components/responses/UnauthorizedError'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        OAuth 2.0 Bearer token for authenticating API requests to the
        automation controller.
  parameters:
    IdParam:
      name: id
      in: path
      required: true
      description: The unique numeric identifier of the resource.
      schema:
        type: integer
    PageParam:
      name: page
      in: query
      description: The page number for paginated results.
      schema:
        type: integer
        minimum: 1
        default: 1
    PageSizeParam:
      name: page_size
      in: query
      description: The number of results to return per page.
      schema:
        type: integer
        minimum: 1
        maximum: 200
        default: 25
    SearchParam:
      name: search
      in: query
      description: A search term to filter results by name or description.
      schema:
        type: string
    OrderingParam:
      name: ordering
      in: query
      description: >-
        The field to use for ordering results. Prefix with a dash for
        descending order (e.g., -created).
      schema:
        type: string
  responses:
    UnauthorizedError:
      description: Authentication credentials are missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    BadRequestError:
      description: The request is malformed or contains invalid data.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFoundError:
      description: The requested resource was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    JobTemplate:
      type: object
      description: >-
        A job template defines the parameters for running an Ansible playbook
        against an inventory of managed hosts.
      properties:
        id:
          type: integer
          description: The unique identifier of the job template.
          example: abc123
        name:
          type: string
          description: The name of the job template.
          example: Example Title
        description:
          type: string
          description: A description of the job template.
          example: A sample description.
        job_type:
          type: string
          description: The type of job to execute.
          enum:
          - run
          - check
          example: run
        inventory:
          type: integer
          description: The ID of the inventory to run against.
          example: 10
        project:
          type: integer
          description: The ID of the project containing the playbook.
          example: 10
        playbook:
          type: string
          description: The playbook filename to execute from the project.
          example: example_value
        forks:
          type: integer
          description: The number of parallel processes to use for execution.
          default: 0
          example: 10
        limit:
          type: string
          description: A host pattern to further limit the inventory scope.
          example: example_value
        verbosity:
          type: integer
          description: The verbosity level for job output (0-5).
          enum: [0, 1, 2, 3, 4, 5]
          default: 0
          example: 0
        extra_vars:
          type: string
          description: Extra variables in YAML or JSON format.
          example: example_value
        ask_variables_on_launch:
          type: boolean
          description: Whether to prompt for extra variables on launch.
          example: true
        ask_inventory_on_launch:
          type: boolean
          description: Whether to prompt for inventory on launch.
          example: true
        ask_credential_on_launch:
          type: boolean
          description: Whether to prompt for credentials on launch.
          example: true
        survey_enabled:
          type: boolean
          description: Whether the survey is enabled for this template.
          example: true
        created:
          type: string
          format: date-time
          description: The date and time the template was created.
          example: '2026-01-15T10:30:00Z'
        modified:
          type: string
          format: date-time
          description: The date and time the template was last modified.
          example: '2026-01-15T10:30:00Z'
    Job:
      type: object
      description: >-
        A job represents a single execution of a job template, tracking
        the playbook run status, timing, and output.
      properties:
        id:
          type: integer
          description: The unique identifier of the job.
          example: abc123
        name:
          type: string
          description: The 

# --- truncated at 32 KB (40 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/red-hat/refs/heads/main/openapi/red-hat-ansible-automation-platform-openapi.yml