From 5a609549973898d824d43c48d0d6951166a1e6af Mon Sep 17 00:00:00 2001 From: Aaron Tan Date: Fri, 2 Dec 2016 11:48:32 -0500 Subject: [PATCH 1/2] Add help text to wfjt launch endpoint. --- .../api/workflow_job_template_launch.md | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 awx/api/templates/api/workflow_job_template_launch.md diff --git a/awx/api/templates/api/workflow_job_template_launch.md b/awx/api/templates/api/workflow_job_template_launch.md new file mode 100644 index 0000000000..61d1b0855f --- /dev/null +++ b/awx/api/templates/api/workflow_job_template_launch.md @@ -0,0 +1,29 @@ +Launch a Workflow Job Template: + +Make a GET request to this resource to determine if the workflow_job_template +can be launched and whether any passwords are required to launch the +workflow_job_template. The response will include the following fields: + +* `can_start_without_user_input`: Flag indicating if the workflow_job_template + can be launched without user-input (boolean, read-only) +* `variables_needed_to_start`: Required variable names required to launch the + workflow_job_template (array, read-only) +* `survey_enabled`: Flag indicating whether the workflow_job_template has an + enabled survey (boolean, read-only) +* `extra_vars`: Text which is the `extra_vars` field of this workflow_job_template + (text, read-only) +* `warnings`: JSON object listing warnings of all workflow_job_template_nodes + contained in this workflow_job_template (JSON object, read-only) +* `workflow_job_template_data`: JSON object listing general information of + this workflow_job_template (JSON object, read-only) + +Make a POST request to this resource to launch the workflow_job_template. If any +passwords, inventory, or extra variables (extra_vars) are required, they must +be passed via POST data, with extra_vars given as a YAML or JSON string and +escaped parentheses. + +If successful, the response status code will be 201. If any required passwords +are not provided, a 400 status code will be returned. If the workflow job cannot +be launched, a 405 status code will be returned. If the provided credential or +inventory are not allowed to be used by the user, then a 403 status code will +be returned. From 7f358d893eca0c51b6c1fb9b8ad7e400c44ee8e1 Mon Sep 17 00:00:00 2001 From: Aaron Tan Date: Fri, 2 Dec 2016 14:47:38 -0500 Subject: [PATCH 2/2] Modify according to review feedback. --- awx/api/templates/api/workflow_job_template_launch.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/awx/api/templates/api/workflow_job_template_launch.md b/awx/api/templates/api/workflow_job_template_launch.md index 61d1b0855f..bb2fe1c2b8 100644 --- a/awx/api/templates/api/workflow_job_template_launch.md +++ b/awx/api/templates/api/workflow_job_template_launch.md @@ -18,8 +18,8 @@ workflow_job_template. The response will include the following fields: this workflow_job_template (JSON object, read-only) Make a POST request to this resource to launch the workflow_job_template. If any -passwords, inventory, or extra variables (extra_vars) are required, they must -be passed via POST data, with extra_vars given as a YAML or JSON string and +credential, inventory, project or extra variables (extra_vars) are required, they +must be passed via POST data, with extra_vars given as a YAML or JSON string and escaped parentheses. If successful, the response status code will be 201. If any required passwords