From 9e0d0e566df0862a4dc360ebf06fdcb16910bab4 Mon Sep 17 00:00:00 2001 From: Wayne Witzel III Date: Wed, 7 Jun 2017 16:42:52 -0400 Subject: [PATCH] Update `/update_inventory_sources` endpoint documentation --- .../api/inventory_inventory_sources_update.md | 23 +++++++++++++++++++ awx/api/urls.py | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 awx/api/templates/api/inventory_inventory_sources_update.md diff --git a/awx/api/templates/api/inventory_inventory_sources_update.md b/awx/api/templates/api/inventory_inventory_sources_update.md new file mode 100644 index 0000000000..3699d9b782 --- /dev/null +++ b/awx/api/templates/api/inventory_inventory_sources_update.md @@ -0,0 +1,23 @@ +# Update Inventory Sources + +Make a GET request to this resource to determine if any of the inventory sources for +this inventory can be updated. The response will include the following fields for each +inventory source: + +* `inventory_source`: ID of the inventory_source + (integer, read-only) +* `can_update`: Flag indicating if this inventory source can be updated + (boolean, read-only) + +Make a POST request to this resource to update the inventory sources. The response +status code will be a 202. The response will contain the follow fields for each of the individual +inventory sources: + +* `status`: `started` or message why the update could not be started. + (string, read-only) +* `inventory_update`: ID of the inventory update job that was started. + (integer, read-only) +* `project_update`: ID of the project update job that was started if this inventory source is an SCM source. + (interger, read-only, optional) + +{% include "api/_new_in_awx.md" %} diff --git a/awx/api/urls.py b/awx/api/urls.py index 7d1daae471..c42d059b82 100644 --- a/awx/api/urls.py +++ b/awx/api/urls.py @@ -94,7 +94,7 @@ inventory_urls = patterns('awx.api.views', url(r'^(?P[0-9]+)/script/$', 'inventory_script_view'), url(r'^(?P[0-9]+)/tree/$', 'inventory_tree_view'), url(r'^(?P[0-9]+)/inventory_sources/$', 'inventory_inventory_sources_list'), - url(r'^(?P[0-9]+)/update_inventory_sources/$', 'inventory_inventory_sources_update'), + url(r'^(?P[0-9]+)/update_inventory_sources/$', 'inventory_inventory_sources_update'), url(r'^(?P[0-9]+)/activity_stream/$', 'inventory_activity_stream_list'), url(r'^(?P[0-9]+)/job_templates/$', 'inventory_job_template_list'), url(r'^(?P[0-9]+)/scan_job_templates/$', 'inventory_scan_job_template_list'),