diff --git a/awx/api/templates/api/job_relaunch.md b/awx/api/templates/api/job_relaunch.md new file mode 100644 index 0000000000..7e9ea316ce --- /dev/null +++ b/awx/api/templates/api/job_relaunch.md @@ -0,0 +1,3 @@ +Relaunch a job: + +Make a POST request to this resource to launch a job. If any passwords or variables are required then they should be passed in via POST data. In order to determine what values are required in order to launch a job based on this job template you may make a GET request to this endpoint. \ No newline at end of file diff --git a/awx/api/templates/api/job_template_launch.md b/awx/api/templates/api/job_template_launch.md new file mode 100644 index 0000000000..5167f2ec6b --- /dev/null +++ b/awx/api/templates/api/job_template_launch.md @@ -0,0 +1,3 @@ +Launch a Job Template: + +Make a POST request to this resource to launch a job. If any passwords or variables are required then they should be passed in via POST data. In order to determine what values are required in order to launch a job based on this job template you may make a GET request to this endpoint. \ No newline at end of file diff --git a/awx/api/views.py b/awx/api/views.py index ee2c21a9b7..27c41a2035 100644 --- a/awx/api/views.py +++ b/awx/api/views.py @@ -1468,6 +1468,8 @@ class JobTemplateSurveySpec(GenericAPIView): return Response(dict(error="'question_description' missing from survey element %s" % str(idx)), status=status.HTTP_400_BAD_REQUEST) if "variable" not in survey_item: return Response(dict(error="'variable' missing from survey element %s" % str(idx)), status=status.HTTP_400_BAD_REQUEST) + if "required" not in survey_item: + return Response(dict(error="'required' missing from survey element %s" % str(idx)), status=status.HTTP_400_BAD_REQUEST) idx += 1 obj.save() return Response()