mirror of
https://github.com/ansible/awx.git
synced 2026-05-16 13:57:39 -02:30
Remove custom API filters and suggest solution via templates
This commit is contained in:
committed by
John Westcott IV
parent
e6050804f9
commit
e38f87eb1d
18
awx/api/templates/api/host_metric_detail.md
Normal file
18
awx/api/templates/api/host_metric_detail.md
Normal file
@@ -0,0 +1,18 @@
|
||||
{% ifmeth GET %}
|
||||
# Retrieve {{ model_verbose_name|title|anora }}:
|
||||
|
||||
Make GET request to this resource to retrieve a single {{ model_verbose_name }}
|
||||
record containing the following fields:
|
||||
|
||||
{% include "api/_result_fields_common.md" %}
|
||||
{% endifmeth %}
|
||||
|
||||
{% ifmeth DELETE %}
|
||||
# Delete {{ model_verbose_name|title|anora }}:
|
||||
|
||||
Make a DELETE request to this resource to soft-delete this {{ model_verbose_name }}.
|
||||
|
||||
A soft deletion will mark the `deleted` field as true and exclude the host
|
||||
metric from license calculations.
|
||||
This may be undone later if the same hostname is automated again afterwards.
|
||||
{% endifmeth %}
|
||||
12
awx/api/templates/api/host_metric_summary_monthly_list.md
Normal file
12
awx/api/templates/api/host_metric_summary_monthly_list.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# Intended Use Case
|
||||
|
||||
To get summaries from a certain day or earlier, you can filter this
|
||||
endpoint in the following way.
|
||||
|
||||
?date__gte=2023-01-01
|
||||
|
||||
This will return summaries that were produced on that date or later.
|
||||
These host metric monthly summaries should be automatically produced
|
||||
by a background task that runs once each month.
|
||||
|
||||
{% include "api/list_api_view.md" %}
|
||||
Reference in New Issue
Block a user