openapi: 3.2.0 info: title: AWX Instances API version: v2 description: AWX API Documentation contact: email: ansible-community@redhat.com license: name: Apache License tags: - name: Instances paths: /api/v2/instances/: get: operationId: instances_list description: Creates an instance if used on a Kubernetes or OpenShift deployment of Ansible Automation Platform. parameters: - in: query name: order schema: type: string description: Order results by field name. Prefix with '-' for descending order. Supports comma-separated values for multiple fields. - in: query name: order_by schema: type: string description: Order results by field name. Prefix with '-' for descending order. Supports comma-separated values for multiple fields. - name: page required: false in: query description: A page number within the paginated result set. schema: type: integer - name: page_size required: false in: query description: Number of results to return per page. schema: type: integer - in: query name: role_level schema: type: string description: Filter by role level for RBAC - name: search required: false in: query description: A search term. schema: type: string - in: query name: type schema: type: string description: Filter by object type. Supports comma-separated values for multiple types. tags: - Instances responses: '200': content: application/json: schema: $ref: '#/components/schemas/PaginatedInstanceList' description: '' x-ai-description: List instances summary: Instances list x-summary-source: derived post: operationId: instances_create description: Creates an instance if used on a Kubernetes or OpenShift deployment of Ansible Automation Platform. tags: - Instances requestBody: content: application/json: schema: $ref: '#/components/schemas/InstanceRequest' required: true responses: '201': content: application/json: schema: $ref: '#/components/schemas/Instance' description: '' x-ai-description: Register an execution or hop node instance. Only available on openshift based AAP deployments. Use the install bundle playbook to further provision the instance summary: Instances create x-summary-source: derived /api/v2/instances/{id}/: get: operationId: instances_retrieve parameters: - in: path name: id schema: type: string pattern: ^[0-9]+$ required: true tags: - Instances responses: '200': content: application/json: schema: $ref: '#/components/schemas/Instance' description: '' x-ai-description: Retrieve an instance summary: Instances retrieve x-summary-source: derived put: operationId: instances_update parameters: - in: path name: id schema: type: string pattern: ^[0-9]+$ required: true tags: - Instances requestBody: content: application/json: schema: $ref: '#/components/schemas/InstanceRequest' required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/Instance' description: '' x-ai-description: Update an instance summary: Instances update x-summary-source: derived patch: operationId: instances_partial_update parameters: - in: path name: id schema: type: string pattern: ^[0-9]+$ required: true tags: - Instances requestBody: content: application/json: schema: $ref: '#/components/schemas/PatchedInstanceRequest' responses: '200': content: application/json: schema: $ref: '#/components/schemas/Instance' description: '' x-ai-description: Update an instance summary: Instances partial update x-summary-source: derived /api/v2/instances/{id}/health_check/: get: operationId: instances_health_check_retrieve parameters: - in: path name: id schema: type: string pattern: ^[0-9]+$ required: true tags: - Instances responses: '200': content: application/json: schema: $ref: '#/components/schemas/InstanceHealthCheck' description: '' x-ai-description: Get instance health check result summary: Instances health check retrieve x-summary-source: derived post: operationId: instances_health_check_create parameters: - in: path name: id schema: type: string pattern: ^[0-9]+$ required: true tags: - Instances responses: '200': content: application/json: schema: $ref: '#/components/schemas/InstanceHealthCheck' description: '' x-ai-description: Perform instance health check summary: Instances health check create x-summary-source: derived /api/v2/instances/{id}/install_bundle/: get: operationId: instances_install_bundle_retrieve parameters: - in: path name: id schema: type: string pattern: ^[0-9]+$ required: true tags: - Instances responses: '200': content: application/json: schema: $ref: '#/components/schemas/Instance' description: '' x-ai-description: Generate and download install bundle for an instance summary: Instances install bundle retrieve x-summary-source: derived /api/v2/instances/{id}/instance_groups/: get: operationId: instances_instance_groups_list description: 'This mixin overloads attach/detach so that it calls InstanceGroup.save(), triggering a background recalculation of policy-based instance group membership.' parameters: - in: path name: id schema: type: string pattern: ^[0-9]+$ required: true - in: query name: order schema: type: string description: Order results by field name. Prefix with '-' for descending order. Supports comma-separated values for multiple fields. - in: query name: order_by schema: type: string description: Order results by field name. Prefix with '-' for descending order. Supports comma-separated values for multiple fields. - name: page required: false in: query description: A page number within the paginated result set. schema: type: integer - name: page_size required: false in: query description: Number of results to return per page. schema: type: integer - in: query name: role_level schema: type: string description: Filter by role level for RBAC - name: search required: false in: query description: A search term. schema: type: string - in: query name: type schema: type: string description: Filter by object type. Supports comma-separated values for multiple types. tags: - Instances responses: '200': content: application/json: schema: $ref: '#/components/schemas/PaginatedInstanceGroupList' description: '' x-ai-description: List instance groups of an instance summary: Instances instance groups list x-summary-source: derived post: operationId: instances_instance_groups_create description: 'This mixin overloads attach/detach so that it calls InstanceGroup.save(), triggering a background recalculation of policy-based instance group membership.' parameters: - in: path name: id schema: type: string pattern: ^[0-9]+$ required: true tags: - Instances requestBody: content: application/json: schema: $ref: '#/components/schemas/InstanceGroupRequest' required: true responses: '201': content: application/json: schema: $ref: '#/components/schemas/InstanceGroup' description: '' x-ai-description: Create an instance group of an instance summary: Instances instance groups create x-summary-source: derived /api/v2/instances/{id}/jobs/: get: operationId: instances_jobs_list parameters: - in: path name: id schema: type: string pattern: ^[0-9]+$ required: true - in: query name: order schema: type: string description: Order results by field name. Prefix with '-' for descending order. Supports comma-separated values for multiple fields. - in: query name: order_by schema: type: string description: Order results by field name. Prefix with '-' for descending order. Supports comma-separated values for multiple fields. - name: page required: false in: query description: A page number within the paginated result set. schema: type: integer - name: page_size required: false in: query description: Number of results to return per page. schema: type: integer - in: query name: role_level schema: type: string description: Filter by role level for RBAC - name: search required: false in: query description: A search term. schema: type: string - in: query name: type schema: type: string description: Filter by object type. Supports comma-separated values for multiple types. tags: - Instances responses: '200': content: application/json: schema: $ref: '#/components/schemas/PaginatedUnifiedJobListList' description: '' x-ai-description: List jobs executed on an instance summary: Instances jobs list x-summary-source: derived /api/v2/instances/{id}/peers/: get: operationId: instances_peers_list parameters: - in: path name: id schema: type: string pattern: ^[0-9]+$ required: true - in: query name: order schema: type: string description: Order results by field name. Prefix with '-' for descending order. Supports comma-separated values for multiple fields. - in: query name: order_by schema: type: string description: Order results by field name. Prefix with '-' for descending order. Supports comma-separated values for multiple fields. - name: page required: false in: query description: A page number within the paginated result set. schema: type: integer - name: page_size required: false in: query description: Number of results to return per page. schema: type: integer - in: query name: role_level schema: type: string description: Filter by role level for RBAC - name: search required: false in: query description: A search term. schema: type: string - in: query name: type schema: type: string description: Filter by object type. Supports comma-separated values for multiple types. tags: - Instances responses: '200': content: application/json: schema: $ref: '#/components/schemas/PaginatedReceptorAddressList' description: '' x-ai-description: List all peers for an instance summary: Instances peers list x-summary-source: derived /api/v2/instances/{id}/receptor_addresses/: get: operationId: instances_receptor_addresses_list parameters: - in: path name: id schema: type: string pattern: ^[0-9]+$ required: true - in: query name: order schema: type: string description: Order results by field name. Prefix with '-' for descending order. Supports comma-separated values for multiple fields. - in: query name: order_by schema: type: string description: Order results by field name. Prefix with '-' for descending order. Supports comma-separated values for multiple fields. - name: page required: false in: query description: A page number within the paginated result set. schema: type: integer - name: page_size required: false in: query description: Number of results to return per page. schema: type: integer - in: query name: role_level schema: type: string description: Filter by role level for RBAC - name: search required: false in: query description: A search term. schema: type: string - in: query name: type schema: type: string description: Filter by object type. Supports comma-separated values for multiple types. tags: - Instances responses: '200': content: application/json: schema: $ref: '#/components/schemas/PaginatedReceptorAddressList' description: '' x-ai-description: List receptor addresses of instance group summary: Instances receptor addresses list x-summary-source: derived components: schemas: InstanceGroup: type: object properties: id: type: integer readOnly: true type: type: string readOnly: true url: type: string readOnly: true related: type: string readOnly: true name: type: - string - 'null' maxLength: 250 created: type: string readOnly: true modified: type: string readOnly: true capacity: type: string readOnly: true consumed_capacity: type: string readOnly: true percent_capacity_remaining: type: string readOnly: true jobs_running: type: string readOnly: true max_concurrent_jobs: type: integer minimum: 0 default: 0 description: Maximum number of concurrent jobs to run on a group. When set to zero, no maximum is enforced. max_forks: type: integer minimum: 0 default: 0 description: Maximum number of forks to execute concurrently on a group. When set to zero, no maximum is enforced. jobs_total: type: integer readOnly: true description: Count of all jobs that target this instance group instances: type: string readOnly: true is_container_group: type: boolean description: Indicates whether instances in this group are containerized.Containerized groups have a designated Openshift or Kubernetes cluster. credential: type: - integer - 'null' policy_instance_percentage: type: integer maximum: 100 minimum: 0 default: 0 description: Minimum percentage of all instances that will be automatically assigned to this group when new instances come online. policy_instance_minimum: type: integer minimum: 0 default: 0 description: Static minimum number of Instances that will be automatically assign to this group when new instances come online. policy_instance_list: type: array items: type: string description: List of exact-match Instances that will be assigned to this group pod_spec_override: type: - string - 'null' default: '' summary_fields: type: string readOnly: true required: - name PaginatedInstanceGroupList: type: object required: - count - results properties: count: type: integer example: 123 next: type: - string - 'null' format: uri example: http://api.example.org/accounts/?page=4 previous: type: - string - 'null' format: uri example: http://api.example.org/accounts/?page=2 results: type: array items: $ref: '#/components/schemas/InstanceGroup' PatchedInstanceRequest: type: object properties: hostname: type: - string - 'null' minLength: 1 maxLength: 250 pattern: ^localhost$|^127(?:\.[0-9]+){0,2}\.[0-9]+$|^(?:0*\:)*?:?0*1$ capacity_adjustment: type: string format: decimal pattern: ^-?\d{0,1}(?:\.\d{0,2})?$ default: '1.00' enabled: type: - boolean - 'null' default: true managed_by_policy: type: - boolean - 'null' default: true node_type: enum: - control - execution - hybrid - hop - null type: - string - 'null' x-spec-enum-id: a8ac655d7e95642d default: execution description: 'Role that this node plays in the mesh. * `control` - Control plane node * `execution` - Execution plane node * `hybrid` - Controller and execution * `hop` - Message-passing node, no execution capability' node_state: enum: - provisioning - provision-fail - installed - ready - unavailable - deprovisioning - deprovision-fail - null type: - string - 'null' x-spec-enum-id: 16153846e23ecc6d default: installed description: 'Indicates the current life cycle stage of this instance. * `provisioning` - Provisioning * `provision-fail` - Provisioning Failure * `installed` - Installed * `ready` - Ready * `unavailable` - Unavailable * `deprovisioning` - De-provisioning * `deprovision-fail` - De-provisioning Failure' peers: type: array items: type: integer description: Primary keys of receptor addresses to peer to. listener_port: type: - integer - 'null' peers_from_control_nodes: type: boolean InstanceGroupRequest: type: object properties: name: type: - string - 'null' minLength: 1 maxLength: 250 max_concurrent_jobs: type: integer minimum: 0 default: 0 description: Maximum number of concurrent jobs to run on a group. When set to zero, no maximum is enforced. max_forks: type: integer minimum: 0 default: 0 description: Maximum number of forks to execute concurrently on a group. When set to zero, no maximum is enforced. is_container_group: type: boolean description: Indicates whether instances in this group are containerized.Containerized groups have a designated Openshift or Kubernetes cluster. credential: type: - integer - 'null' policy_instance_percentage: type: integer maximum: 100 minimum: 0 default: 0 description: Minimum percentage of all instances that will be automatically assigned to this group when new instances come online. policy_instance_minimum: type: integer minimum: 0 default: 0 description: Static minimum number of Instances that will be automatically assign to this group when new instances come online. policy_instance_list: type: array items: type: string minLength: 1 description: List of exact-match Instances that will be assigned to this group pod_spec_override: type: - string - 'null' default: '' required: - name InstanceRequest: type: object properties: hostname: type: - string - 'null' minLength: 1 maxLength: 250 pattern: ^localhost$|^127(?:\.[0-9]+){0,2}\.[0-9]+$|^(?:0*\:)*?:?0*1$ capacity_adjustment: type: string format: decimal pattern: ^-?\d{0,1}(?:\.\d{0,2})?$ default: '1.00' enabled: type: - boolean - 'null' default: true managed_by_policy: type: - boolean - 'null' default: true node_type: enum: - control - execution - hybrid - hop - null type: - string - 'null' x-spec-enum-id: a8ac655d7e95642d default: execution description: 'Role that this node plays in the mesh. * `control` - Control plane node * `execution` - Execution plane node * `hybrid` - Controller and execution * `hop` - Message-passing node, no execution capability' node_state: enum: - provisioning - provision-fail - installed - ready - unavailable - deprovisioning - deprovision-fail - null type: - string - 'null' x-spec-enum-id: 16153846e23ecc6d default: installed description: 'Indicates the current life cycle stage of this instance. * `provisioning` - Provisioning * `provision-fail` - Provisioning Failure * `installed` - Installed * `ready` - Ready * `unavailable` - Unavailable * `deprovisioning` - De-provisioning * `deprovision-fail` - De-provisioning Failure' peers: type: array items: type: integer description: Primary keys of receptor addresses to peer to. listener_port: type: - integer - 'null' peers_from_control_nodes: type: boolean required: - hostname ReceptorAddress: type: object properties: id: type: integer readOnly: true url: type: string readOnly: true address: type: - string - 'null' description: Routable address for this instance. maxLength: 255 port: type: integer maximum: 65535 minimum: 0 default: 27199 description: Port for the address. protocol: enum: - tcp - ws - wss - null type: - string - 'null' x-spec-enum-id: 66927b81fe0555f9 default: tcp description: 'Protocol to use for the Receptor listener, ''tcp'', ''wss'', or ''ws''. * `tcp` - TCP * `ws` - WS * `wss` - WSS' websocket_path: type: - string - 'null' default: '' description: Websocket path. maxLength: 255 is_internal: type: - boolean - 'null' default: false description: If True, only routable within the Kubernetes cluster. canonical: type: - boolean - 'null' default: false description: If True, this address is the canonical address for the instance. instance: type: integer peers_from_control_nodes: type: - boolean - 'null' default: false description: If True, control plane cluster nodes should automatically peer to it. full_address: type: string readOnly: true required: - address - instance UnifiedJobList: type: object properties: id: type: integer readOnly: true type: type: string readOnly: true url: type: string readOnly: true related: type: string readOnly: true summary_fields: type: string readOnly: true created: type: string readOnly: true modified: type: string readOnly: true name: type: - string - 'null' maxLength: 512 description: type: - string - 'null' default: '' unified_job_template: type: - integer - 'null' readOnly: true launch_type: enum: - manual - relaunch - callback - scheduled - dependency - workflow - webhook - sync - scm type: string description: '* `manual` - Manual * `relaunch` - Relaunch * `callback` - Callback * `scheduled` - Scheduled * `dependency` - Dependency * `workflow` - Workflow * `webhook` - Webhook * `sync` - Sync * `scm` - SCM Update' x-spec-enum-id: e5bed25c2e652da3 readOnly: true status: enum: - new - pending - waiting - running - successful - failed - error - canceled type: string description: '* `new` - New * `pending` - Pending * `waiting` - Waiting * `running` - Running * `successful` - Successful * `failed` - Failed * `error` - Error * `canceled` - Canceled' x-spec-enum-id: 6021859c28387823 readOnly: true execution_environment: type: - integer - 'null' description: The container image to be used for execution. failed: type: boolean readOnly: true started: type: - string - 'null' format: date-time readOnly: true description: The date and time the job was queued for starting. finished: type: - string - 'null' format: date-time readOnly: true description: The date and time the job finished execution. canceled_on: type: - string - 'null' format: date-time readOnly: true description: The date and time when the cancel request was sent. elapsed: type: string format: decimal pattern: ^-?\d{0,9}(?:\.\d{0,3})?$ readOnly: true description: Elapsed time in seconds that the job ran. job_explanation: type: string readOnly: true description: A status field to indicate the state of the job if it wasn't able to run and capture stdout execution_node: type: string readOnly: true description: The node the job executed on. controller_node: type: string readOnly: true description: The instance that managed the execution environment. launched_by: type: string readOnly: true work_unit_id: type: - string - 'null' readOnly: true description: The Receptor work unit ID associated with this job. required: - name Instance: type: object properties: id: type: integer readOnly: true hostname: type: - string - 'null' maxLength: 250 pattern: ^localhost$|^127(?:\.[0-9]+){0,2}\.[0-9]+$|^(?:0*\:)*?:?0*1$ type: type: string readOnly: true url: type: string readOnly: true related: type: string readOnly: true summary_fields: type: string readOnly: true uuid: type: - string - 'null' readOnly: true created: type: string readOnly: true modified: type: string readOnly: true last_seen: type: - string - 'null' format: date-time readOnly: true description: Last time instance ran its heartbeat task for main cluster nodes. Last known connection to receptor mesh for execution nodes. health_check_started: type: - string - 'null' format: date-time readOnly: true description: The last time a health check was initiated on this instance. health_check_pending: type: string readOnly: true last_health_check: type: - string - 'null' format: date-time readOnly: true description: Last time a health check was ran on this instance to refresh cpu, memory, and capacity. errors: type: string readOnly: true description: Any error details from the last health check. capacity_adjustment: type: string format: decimal pattern: ^-?\d{0,1}(?:\.\d{0,2})?$ default: '1.00' version: type: - string - 'null' readOnly: true capacity: type: integer minimum: 0 readOnly: true consumed_capacity: type: string readOnly: true percent_capacity_remaining: type: string readOnly: true jobs_running: type: integer readOnly: true description: Count of jobs in the running or waiting state that are targeted for this instance jobs_total: type: integer readOnly: true description: Count of all jobs that target this instance cpu: type: string format: decimal pattern: ^-?\d{0,3}(?:\.\d{0,1})?$ readOnly: true memory: type: integer readOnly: true description: Total system memory of this instance in bytes. cpu_capacity: type: integer readOnly: true mem_capacity: type: integer readOnly: true enabled: type: - boolean - 'null' default: true managed_by_policy: type: - boolean - 'null' default: true node_type: enum: - control - execution - hybrid - hop - null type: - string - 'null' x-spec-enum-id: a8ac655d7e95642d default: execution description: 'Role that this node plays in the mesh. * `control` - Control plane node * `execution` - Execution plane node * `hybrid` - Controller and execution * `hop` - Message-passing node, no execution capability' node_state: enum: - provisioning - provision-fail - installed - ready - unavailable - deprovisioning - deprovision-fail - null type: - string - 'null' x-spec-enum-id: 16153846e23ecc6d default: installed description: 'Indicates the current life cycle stage of this instance. * `provisioning` - Provisioning * `provision-fail` - Provisioning Failure * `installed` - Installed * `ready` - Ready * `unavailable` - Unavailable * `deprovisioning` - De-provisioning * `deprovision-fail` - De-provisioning Failure' managed: type: boolean readOnly: true description: If True, this instance is managed by the control plane. ip_address: type: - string - 'null' readOnly: true peers: type: array items: type: integer description: Primary keys of receptor addresses to peer to. reverse_peers: type: string readOnly: true listener_port: type: - integer - 'null' peers_from_control_nodes: type: boolean protocol: type: string readOnly: true required: - hostname PaginatedInstanceList: type: object required: - count - results properties: count: type: integer example: 123 next: type: - string - 'null' format: uri example: http://api.example.org/accounts/?page=4 previous: type: - string - 'null' format: uri example: http://api.example.org/accounts/?page=2 results: type: array items: $ref: '#/components/schemas/Instance' PaginatedUnifiedJobListList: type: object required: - count - results properties: count: type: integer example: 123 next: type: - string - 'null' format: uri example: http://api.example.org/accounts/?page=4 previous: type: - string - 'null' format: uri example: http://api.example.org/accounts/?page=2 results: type: array items: $ref: '#/components/schemas/UnifiedJobList' PaginatedReceptorAddressList: type: object required: - count - results properties: count: type: integer example: 123 next: type: - string - 'null' format: uri example: http://api.example.org/accounts/?page=4 previous: type: - string - 'null' format: uri example: http://api.example.org/accounts/?page=2 results: type: array items: $ref: '#/components/schemas/ReceptorAddress' InstanceHealthCheck: type: object properties: uuid: type: - string - 'null' readOnly: true hostname: type: - string - 'null' readOnly: true ip_address: type: - string - 'null' readOnly: true version: type: - string - 'null' readOnly: true last_health_check: type: - string - 'null' format: date-time readOnly: true description: Last time a health check was ran on this instance to refresh cpu, memory, and capacity. errors: type: string readOnly: true description: Any error details from the last health check. cpu: type: string format: decimal pattern: ^-?\d{0,3}(?:\.\d{0,1})?$ readOnly: true memory: type: integer readOnly: true description: Total system memory of this instance in bytes. cpu_capacity: type: integer readOnly: true mem_capacity: type: integer readOnly: true capacity: type: integer readOnly: true