Retrieve an Inventory Update

get

/api/v2/inventory_updates/{id}/

Make GET request to this resource to retrieve a single inventory update record containing the following fields:

  • id: Database ID for this inventory update. (integer)
  • type: Data type for this inventory update. (choice)
  • url: URL for this inventory update. (string)
  • related: Data structure with URLs of related resources. (object)
  • summary_fields: Data structure with name/description for related resources. The output for some objects may be limited for performance reasons. (object)
  • created: Timestamp when this inventory update was created. (datetime)
  • modified: Timestamp when this inventory update was last modified. (datetime)
  • name: Name of this inventory update. (string)
  • description: Optional description of this inventory update. (string)
  • source: (choice)
    • file: File, Directory or Script
    • scm: Sourced from a Project
    • ec2: Amazon EC2
    • gce: Google Compute Engine
    • azure_rm: Microsoft Azure Resource Manager
    • vmware: VMware vCenter
    • satellite6: Red Hat Satellite 6
    • openstack: OpenStack
    • rhv: Red Hat Virtualization
    • tower: Ansible Tower
    • custom: Custom Script
  • source_path: (string)
  • source_script: (id)
  • source_vars: Inventory source variables in YAML or JSON format. (string)
  • credential: Cloud credential to use for inventory updates. (integer)
  • enabled_var: Retrieve the enabled state from the given dict of host variables. The enabled variable may be specified as "foo.bar", in which case the lookup will traverse into nested dicts, equivalent to: from_dict.get("foo", {}).get("bar", default) (string)
  • enabled_value: Only used when enabled_var is set. Value when the host is considered enabled. For example if enabled_var="status.power_state"and enabled_value="powered_on" with host variables:{ "status": { "power_state": "powered_on", "created": "2018-02-01T08:00:00.000000Z:00", "healthy": true }, "name": "foobar", "ip_address": "192.168.2.1"}The host would be marked enabled. If power_state where any value other than powered_on then the host would be disabled when imported into Tower. If the key is not found then the host will be enabled (string)
  • host_filter: Regex where only matching hosts will be imported into Tower. (string)
  • overwrite: Overwrite local groups and hosts from remote inventory source. (boolean)
  • overwrite_vars: Overwrite local variables from remote inventory source. (boolean)
  • custom_virtualenv: (string)
  • timeout: The amount of time (in seconds) to run before the task is canceled. (integer)
  • verbosity: (choice)
    • 0: 0 (WARNING)
    • 1: 1 (INFO)
    • 2: 2 (DEBUG)
  • unified_job_template: (id)
  • launch_type: (choice)
    • manual: Manual
    • relaunch: Relaunch
    • callback: Callback
    • scheduled: Scheduled
    • dependency: Dependency
    • workflow: Workflow
    • webhook: Webhook
    • sync: Sync
    • scm: SCM Update
  • status: (choice)
    • new: New
    • pending: Pending
    • waiting: Waiting
    • running: Running
    • successful: Successful
    • failed: Failed
    • error: Error
    • canceled: Canceled
  • failed: (boolean)
  • started: The date and time the job was queued for starting. (datetime)
  • finished: The date and time the job finished execution. (datetime)
  • canceled_on: The date and time when the cancel request was sent. (datetime)
  • elapsed: Elapsed time in seconds that the job ran. (decimal)
  • job_args: (string)
  • job_cwd: (string)
  • job_env: (json)
  • job_explanation: A status field to indicate the state of the job if it wasn't able to run and capture stdout (string)
  • execution_node: The node the job executed on. (string)
  • result_traceback: (string)
  • event_processing_finished: Indicates whether all of the events generated by this unified job have been saved to the database. (boolean)
  • inventory: (id)
  • inventory_source: (id)
  • license_error: (boolean)
  • org_host_limit_error: (boolean)
  • source_project_update: Inventory files from this Project Update were used for the inventory update. (id)
  • source_project: The project used for this job. (field)

Request

Supported Media Types
Path Parameters
Query Parameters
Back to Top

Response

Supported Media Types

200 Response

Body
Example Response (application/json)
{
    "canceled_on":null,
    "created":"2018-02-01T08:00:00.000000Z",
    "credential":null,
    "custom_virtualenv":null,
    "description":"",
    "elapsed":0,
    "enabled_value":"",
    "enabled_var":"",
    "event_processing_finished":false,
    "execution_node":"",
    "failed":false,
    "finished":null,
    "host_filter":"",
    "id":3,
    "inventory":null,
    "inventory_source":3,
    "job_args":"",
    "job_cwd":"",
    "job_env":{
    },
    "job_explanation":"",
    "launch_type":"manual",
    "license_error":false,
    "modified":"2018-02-01T08:00:00.000000Z",
    "name":"",
    "org_host_limit_error":false,
    "overwrite":false,
    "overwrite_vars":false,
    "related":{
        "cancel":"/api/v2/inventory_updates/3/cancel/",
        "credentials":"/api/v2/inventory_updates/3/credentials/",
        "events":"/api/v2/inventory_updates/3/events/",
        "inventory_source":"/api/v2/inventory_sources/3/",
        "notifications":"/api/v2/inventory_updates/3/notifications/",
        "stdout":"/api/v2/inventory_updates/3/stdout/",
        "unified_job_template":"/api/v2/inventory_sources/3/"
    },
    "result_traceback":"",
    "source":"ec2",
    "source_path":"",
    "source_project":null,
    "source_project_update":null,
    "source_script":null,
    "source_vars":"",
    "started":null,
    "status":"new",
    "summary_fields":{
        "credentials":[
        ],
        "inventory_source":{
            "source":"ec2",
            "status":"never updated"
        },
        "unified_job_template":{
            "description":"",
            "id":3,
            "name":"single-inv-src",
            "unified_job_type":"inventory_update"
        },
        "user_capabilities":{
            "delete":true,
            "start":false
        }
    },
    "timeout":0,
    "type":"inventory_update",
    "unified_job_template":3,
    "url":"/api/v2/inventory_updates/3/",
    "verbosity":1
}
Back to Top