Hi,
I have generate API key and I am getting data for current month by default using the curl command.
I am checking for some format how to add dates in api to retrieve data for last 3 months.
I checked documentation but didn't found any example using dates.
curl -XGET https://api.elastic-cloud.com/api/v1/billing/costs/<organization_id> \
-H "Authorization: ApiKey <yourapikey>"
Query parameters
Name | Type | Required | Description |
---|---|---|---|
from |
string |
N | A datetime for the beginning of the desired range for which to fetch costs. Defaults to start of current month. Note: there is currently a three-month maximum date range. |
to |
string |
N | A datetime for the end of the desired range for which to fetch costs. Defaults to end of current month. Note: there is currently a three-month maximum date range. |
https://www.elastic.co/guide/en/cloud/current/Billing_Costs_Analysis.html#Billing_Costs_Analysis