List usage records
curl --request GET \
--url https://go-fetch.io/api/v1/usage/ \
--header 'X-API-Key: <api-key>'import requests
url = "https://go-fetch.io/api/v1/usage/"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://go-fetch.io/api/v1/usage/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"total": 123,
"offset": 123,
"limit": 123,
"count": 123,
"results": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"event_id": "<string>",
"environment_name": "<string>",
"platform": "<string>",
"unit_price": "<string>",
"total_cost": "<string>",
"plan_name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"organization": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"job": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"environment": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"posts_scraped": 1
}
]
}Usage
List usage records
One record per charge, newest first: items, unit price and total cost. Every filter is optional.
GET
/
api
/
v1
/
usage
/
List usage records
curl --request GET \
--url https://go-fetch.io/api/v1/usage/ \
--header 'X-API-Key: <api-key>'import requests
url = "https://go-fetch.io/api/v1/usage/"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://go-fetch.io/api/v1/usage/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"total": 123,
"offset": 123,
"limit": 123,
"count": 123,
"results": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"event_id": "<string>",
"environment_name": "<string>",
"platform": "<string>",
"unit_price": "<string>",
"total_cost": "<string>",
"plan_name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"organization": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"job": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"environment": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"posts_scraped": 1
}
]
}Authorizations
Query Parameters
ISO date or datetime, inclusive; start_date is an alias.
ISO date or datetime, inclusive; a date covers the whole day. end_date is an alias.
An environment slug.
A job id.
Number of results to return per page.
The initial index from which to return the results.
Which field to use when ordering the results.
A scraper type; scraper_type is an alias.