Red Hat Ansible Automation Platform Constructed Inventories API

The constructed_inventories API from Red Hat Ansible Automation Platform — 2 operation(s) for constructed_inventories.

Operations 6

GET /api/v2/constructed_inventories/ Constructed inventories list #
POST /api/v2/constructed_inventories/ Constructed inventories create #
GET /api/v2/constructed_inventories/{id}/ Constructed inventories retrieve #
PUT /api/v2/constructed_inventories/{id}/ Constructed inventories update #
PATCH /api/v2/constructed_inventories/{id}/ Constructed inventories partial update #
DELETE /api/v2/constructed_inventories/{id}/ Constructed inventories destroy #

Work with this as data

Every API 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 apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • 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 API
curl "https://apis.io/api/v1/apis/red-hat-ansible-automation-platform-constructed-inventories-api"
All apis
curl "https://apis.io/api/v1/apis?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.

OpenAPI Specification

red-hat-ansible-automation-platform-constructed-inventories-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: AWX Constructed Inventories API
  version: v2
  description: AWX API Documentation
  contact:
    email: ansible-community@redhat.com
  license:
    name: Apache License
tags:
- name: constructed_inventories
paths:
  /api/v2/constructed_inventories/:
    get:
      operationId: constructed_inventories_list
      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:
      - constructed_inventories
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedConstructedInventoryList'
          description: ''
      x-ai-description: A list of inventories.
      summary: Constructed inventories list
      x-summary-source: derived
    post:
      operationId: constructed_inventories_create
      tags:
      - constructed_inventories
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConstructedInventoryRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConstructedInventory'
          description: ''
      x-ai-description: Create a constructed inventory
      summary: Constructed inventories create
      x-summary-source: derived
  /api/v2/constructed_inventories/{id}/:
    get:
      operationId: constructed_inventories_retrieve
      parameters:
      - in: path
        name: id
        schema:
          type: string
          pattern: ^[0-9]+$
        required: true
      tags:
      - constructed_inventories
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConstructedInventory'
          description: ''
      x-ai-description: Retrieve a constructed inventory
      summary: Constructed inventories retrieve
      x-summary-source: derived
    put:
      operationId: constructed_inventories_update
      parameters:
      - in: path
        name: id
        schema:
          type: string
          pattern: ^[0-9]+$
        required: true
      tags:
      - constructed_inventories
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConstructedInventoryRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConstructedInventory'
          description: ''
      x-ai-description: Update a constructed inventory
      summary: Constructed inventories update
      x-summary-source: derived
    patch:
      operationId: constructed_inventories_partial_update
      parameters:
      - in: path
        name: id
        schema:
          type: string
          pattern: ^[0-9]+$
        required: true
      tags:
      - constructed_inventories
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedConstructedInventoryRequest'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConstructedInventory'
          description: ''
      x-ai-description: Update a constructed inventory
      summary: Constructed inventories partial update
      x-summary-source: derived
    delete:
      operationId: constructed_inventories_destroy
      parameters:
      - in: path
        name: id
        schema:
          type: string
          pattern: ^[0-9]+$
        required: true
      tags:
      - constructed_inventories
      responses:
        '204':
          description: No response body
      x-ai-description: Delete a constructed inventory
      summary: Constructed inventories destroy
      x-summary-source: derived
components:
  schemas:
    PaginatedConstructedInventoryList:
      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/ConstructedInventory'
    PatchedConstructedInventoryRequest:
      type: object
      properties:
        name:
          type:
          - string
          - 'null'
          minLength: 1
          maxLength: 512
        description:
          type:
          - string
          - 'null'
          default: ''
        organization:
          type:
          - integer
          - 'null'
          description: Organization containing this inventory.
        variables:
          type:
          - string
          - 'null'
          default: ''
          description: Inventory variables in JSON or YAML format.
        prevent_instance_group_fallback:
          type:
          - boolean
          - 'null'
          default: false
          description: If enabled, the inventory will prevent adding any organization instance groups to the list of preferred instances groups to run associated job templates on.If this setting is enabled and you provided an empty list, the global instance groups will be applied.
        opa_query_path:
          type:
          - string
          - 'null'
          description: The query path for the OPA policy to evaluate prior to job execution. The query path should be formatted as package/rule.
          maxLength: 128
        source_vars:
          type: string
          description: The source_vars for the related auto-created inventory source, special to constructed inventory.
        update_cache_timeout:
          type:
          - integer
          - 'null'
          minimum: 0
          description: The cache timeout for the related auto-created inventory source, special to constructed inventory
        limit:
          type: string
          description: The limit to restrict the returned hosts for the related auto-created inventory source, special to constructed inventory.
        verbosity:
          type:
          - integer
          - 'null'
          maximum: 5
          minimum: 0
          description: The verbosity level for the related auto-created inventory source, special to constructed inventory
    ConstructedInventoryRequest:
      type: object
      properties:
        name:
          type:
          - string
          - 'null'
          minLength: 1
          maxLength: 512
        description:
          type:
          - string
          - 'null'
          default: ''
        organization:
          type:
          - integer
          - 'null'
          description: Organization containing this inventory.
        variables:
          type:
          - string
          - 'null'
          default: ''
          description: Inventory variables in JSON or YAML format.
        prevent_instance_group_fallback:
          type:
          - boolean
          - 'null'
          default: false
          description: If enabled, the inventory will prevent adding any organization instance groups to the list of preferred instances groups to run associated job templates on.If this setting is enabled and you provided an empty list, the global instance groups will be applied.
        opa_query_path:
          type:
          - string
          - 'null'
          description: The query path for the OPA policy to evaluate prior to job execution. The query path should be formatted as package/rule.
          maxLength: 128
        source_vars:
          type: string
          description: The source_vars for the related auto-created inventory source, special to constructed inventory.
        update_cache_timeout:
          type:
          - integer
          - 'null'
          minimum: 0
          description: The cache timeout for the related auto-created inventory source, special to constructed inventory
        limit:
          type: string
          description: The limit to restrict the returned hosts for the related auto-created inventory source, special to constructed inventory.
        verbosity:
          type:
          - integer
          - 'null'
          maximum: 5
          minimum: 0
          description: The verbosity level for the related auto-created inventory source, special to constructed inventory
      required:
      - name
      - organization
    ConstructedInventory:
      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: ''
        organization:
          type:
          - integer
          - 'null'
          description: Organization containing this inventory.
        kind:
          enum:
          - ''
          - smart
          - constructed
          - null
          type:
          - string
          - 'null'
          x-spec-enum-id: 2ff9e8df76c2ad0e
          readOnly: true
          description: 'Kind of inventory being represented.


            * `` - Hosts have a direct link to this inventory.

            * `smart` - Hosts for inventory generated using the host_filter property.

            * `constructed` - Parse list of source inventories with the constructed inventory plugin.'
        variables:
          type:
          - string
          - 'null'
          default: ''
          description: Inventory variables in JSON or YAML format.
        has_active_failures:
          type: boolean
          readOnly: true
          description: This field is deprecated and will be removed in a future release. Flag indicating whether any hosts in this inventory have failed.
        total_hosts:
          type: integer
          minimum: 0
          readOnly: true
          description: This field is deprecated and will be removed in a future release. Total number of hosts in this inventory.
        hosts_with_active_failures:
          type: integer
          minimum: 0
          readOnly: true
          description: This field is deprecated and will be removed in a future release. Number of hosts in this inventory with active failures.
        total_groups:
          type: integer
          minimum: 0
          readOnly: true
          description: This field is deprecated and will be removed in a future release. Total number of groups in this inventory.
        has_inventory_sources:
          type: boolean
          readOnly: true
          description: This field is deprecated and will be removed in a future release. Flag indicating whether this inventory has any external inventory sources.
        total_inventory_sources:
          type: integer
          minimum: 0
          readOnly: true
          description: Total number of external inventory sources configured within this inventory.
        inventory_sources_with_failures:
          type: integer
          minimum: 0
          readOnly: true
          description: Number of external inventory sources in this inventory with failures.
        pending_deletion:
          type: boolean
          readOnly: true
          description: Flag indicating the inventory is being deleted.
        prevent_instance_group_fallback:
          type:
          - boolean
          - 'null'
          default: false
          description: If enabled, the inventory will prevent adding any organization instance groups to the list of preferred instances groups to run associated job templates on.If this setting is enabled and you provided an empty list, the global instance groups will be applied.
        opa_query_path:
          type:
          - string
          - 'null'
          description: The query path for the OPA policy to evaluate prior to job execution. The query path should be formatted as package/rule.
          maxLength: 128
        source_vars:
          type: string
          description: The source_vars for the related auto-created inventory source, special to constructed inventory.
        update_cache_timeout:
          type:
          - integer
          - 'null'
          minimum: 0
          description: The cache timeout for the related auto-created inventory source, special to constructed inventory
        limit:
          type: string
          description: The limit to restrict the returned hosts for the related auto-created inventory source, special to constructed inventory.
        verbosity:
          type:
          - integer
          - 'null'
          maximum: 5
          minimum: 0
          description: The verbosity level for the related auto-created inventory source, special to constructed inventory
      required:
      - name
      - organization