From 985cba94ef9458cc769708578a10f57ad67075e2 Mon Sep 17 00:00:00 2001 From: Matthew Jones Date: Wed, 16 Jul 2014 15:15:29 -0400 Subject: [PATCH] Update documentation for job_plays and job_tasks endpoints --- awx/api/templates/api/job_job_plays_list.md | 25 +++++++++++++++++++ awx/api/templates/api/job_job_tasks_list.md | 27 +++++++++++++++++++++ awx/api/views.py | 4 +-- 3 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 awx/api/templates/api/job_job_plays_list.md create mode 100644 awx/api/templates/api/job_job_tasks_list.md diff --git a/awx/api/templates/api/job_job_plays_list.md b/awx/api/templates/api/job_job_plays_list.md new file mode 100644 index 0000000000..5c1c05e92c --- /dev/null +++ b/awx/api/templates/api/job_job_plays_list.md @@ -0,0 +1,25 @@ +Make a GET request to retrieve the list of aggregated play data associated with a job + +## Filtering + +This endpoints supports a limited filtering subset: + + ?id__in=1,2,3 + +Will show only the given ids. + + ?id__gt=1 + +Will show ids greater than the given one. + + ?id__lt=3 + +Will show ids less than the given one. + + ?failed=true + +Will show only failed plays. Alternatively `false` may be used. + + ?play_icontains=test + +Will filter plays matching the substring `test` diff --git a/awx/api/templates/api/job_job_tasks_list.md b/awx/api/templates/api/job_job_tasks_list.md new file mode 100644 index 0000000000..4e1902b247 --- /dev/null +++ b/awx/api/templates/api/job_job_tasks_list.md @@ -0,0 +1,27 @@ +Make a GET request to retrieve the list of aggregated task data associated with the play given by event_id. + +`event_id` is a required query parameter and must match the job event id of the parent play in order to receive the list of tasks associated with the play + +## Filtering + +This endpoints supports a limited filtering subset: + + ?id__in=1,2,3 + +Will show only the given ids. + + ?id__gt=1 + +Will show ids greater than the given one. + + ?id__lt=3 + +Will show ids less than the given one. + + ?failed=true + +Will show only failed plays. Alternatively `false` may be used. + + ?task_icontains=test + +Will filter tasks matching the substring `test` diff --git a/awx/api/views.py b/awx/api/views.py index 05eac5be52..02638b7ec9 100644 --- a/awx/api/views.py +++ b/awx/api/views.py @@ -1625,7 +1625,7 @@ class JobJobPlaysList(BaseJobEventsList): authentication_classes = [JobTaskAuthentication] + \ api_settings.DEFAULT_AUTHENTICATION_CLASSES permission_classes = (JobTaskPermission,) - new_in_150 = True + new_in_200 = True @paginated def get(self, request, limit, offset, ordering, *args, **kwargs): @@ -1700,7 +1700,7 @@ class JobJobTasksList(BaseJobEventsList): authentication_classes = [JobTaskAuthentication] + \ api_settings.DEFAULT_AUTHENTICATION_CLASSES permission_classes = (JobTaskPermission,) - new_in_150 = True + new_in_200 = True @paginated def get(self, request, limit, offset, ordering, *args, **kwargs):