From 2eb1e4bbe318dd342d4b24fb60d5d2b07fa05171 Mon Sep 17 00:00:00 2001 From: Alan Rominger Date: Mon, 7 Jun 2021 11:11:22 -0400 Subject: [PATCH 1/3] Add OPTIONS documentation for new job limit feature --- awx/api/templates/api/job_job_events_list.md | 21 ++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 awx/api/templates/api/job_job_events_list.md diff --git a/awx/api/templates/api/job_job_events_list.md b/awx/api/templates/api/job_job_events_list.md new file mode 100644 index 0000000000..678c19b829 --- /dev/null +++ b/awx/api/templates/api/job_job_events_list.md @@ -0,0 +1,21 @@ +{% include "api/sub_list_api_view.md" %} +{% ifmeth GET %} +## Special limit feature for job events + +Use the `limit` query string parameter to opt out of the pagination keys. +Doing this can improve response times for jobs that produce a large volume +of outputs. + + ?limit=25 + +This will set the page size to 25 and the `previous` and `next` keys will be +omitted from the response data. The data structure will look like this. + + { + "results": [ + ... + ] + } + + +{% endifmeth %} From 5beb68f5277d8abc22d2a7c1132987375d7acb73 Mon Sep 17 00:00:00 2001 From: Alan Rominger Date: Mon, 7 Jun 2021 11:15:19 -0400 Subject: [PATCH 2/3] Remove templates from views that were removed --- awx/api/templates/api/job_job_plays_list.md | 25 ------------------- awx/api/templates/api/job_job_tasks_list.md | 27 --------------------- 2 files changed, 52 deletions(-) delete mode 100644 awx/api/templates/api/job_job_plays_list.md delete 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 deleted file mode 100644 index e546f8d35c..0000000000 --- a/awx/api/templates/api/job_job_plays_list.md +++ /dev/null @@ -1,25 +0,0 @@ -Make a GET request to retrieve the list of aggregated play data associated with a job - -## Filtering - -This endpoints supports a limited filtering subset: - - ?event_id__in=1,2,3 - -Will show only the given ids. - - ?event_id__gt=1 - -Will show ids greater than the given one. - - ?event_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 deleted file mode 100644 index 892e8bb99e..0000000000 --- a/awx/api/templates/api/job_job_tasks_list.md +++ /dev/null @@ -1,27 +0,0 @@ -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: - - ?event_id__in=1,2,3 - -Will show only the given task ids under the play given by `event_id`. - - ?event_id__gt=1 - -Will show ids greater than the given one. - - ?event_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` From 5ab449c90f45a4a4d6698619e71e3dfa44047650 Mon Sep 17 00:00:00 2001 From: Alan Rominger Date: Tue, 8 Jun 2021 11:01:14 -0400 Subject: [PATCH 3/3] Add event-specific template to all event types --- .../templates/api/ad_hoc_command_ad_hoc_command_events_list.md | 1 + awx/api/templates/api/inventory_update_events_list.md | 1 + awx/api/templates/api/job_job_events_list.md | 2 +- awx/api/templates/api/project_update_events_list.md | 1 + awx/api/templates/api/system_job_events_list.md | 1 + 5 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 awx/api/templates/api/ad_hoc_command_ad_hoc_command_events_list.md create mode 100644 awx/api/templates/api/inventory_update_events_list.md create mode 100644 awx/api/templates/api/project_update_events_list.md create mode 100644 awx/api/templates/api/system_job_events_list.md diff --git a/awx/api/templates/api/ad_hoc_command_ad_hoc_command_events_list.md b/awx/api/templates/api/ad_hoc_command_ad_hoc_command_events_list.md new file mode 100644 index 0000000000..056ef2b685 --- /dev/null +++ b/awx/api/templates/api/ad_hoc_command_ad_hoc_command_events_list.md @@ -0,0 +1 @@ +{% include "api/job_job_events_list.md" %} diff --git a/awx/api/templates/api/inventory_update_events_list.md b/awx/api/templates/api/inventory_update_events_list.md new file mode 100644 index 0000000000..056ef2b685 --- /dev/null +++ b/awx/api/templates/api/inventory_update_events_list.md @@ -0,0 +1 @@ +{% include "api/job_job_events_list.md" %} diff --git a/awx/api/templates/api/job_job_events_list.md b/awx/api/templates/api/job_job_events_list.md index 678c19b829..2d0f69893e 100644 --- a/awx/api/templates/api/job_job_events_list.md +++ b/awx/api/templates/api/job_job_events_list.md @@ -1,6 +1,6 @@ {% include "api/sub_list_api_view.md" %} {% ifmeth GET %} -## Special limit feature for job events +## Special limit feature for event list views Use the `limit` query string parameter to opt out of the pagination keys. Doing this can improve response times for jobs that produce a large volume diff --git a/awx/api/templates/api/project_update_events_list.md b/awx/api/templates/api/project_update_events_list.md new file mode 100644 index 0000000000..056ef2b685 --- /dev/null +++ b/awx/api/templates/api/project_update_events_list.md @@ -0,0 +1 @@ +{% include "api/job_job_events_list.md" %} diff --git a/awx/api/templates/api/system_job_events_list.md b/awx/api/templates/api/system_job_events_list.md new file mode 100644 index 0000000000..056ef2b685 --- /dev/null +++ b/awx/api/templates/api/system_job_events_list.md @@ -0,0 +1 @@ +{% include "api/job_job_events_list.md" %}