Get usage for the authenticated API key.
curl --request GET \
--url https://api.infrawatch.com/api/v1/usage \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.infrawatch.com/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://api.infrawatch.com/api/v1/usage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.infrawatch.com/api/v1/usage"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"api_usage": {
"api_key": {
"key_prefix": "<string>",
"name": "<string>",
"owner_name": "<string>",
"owner_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"scopes": [
"<string>"
],
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"daily": [
{
"date": "2023-12-25",
"partial": true,
"requests": 1
}
],
"freshness": {
"current_through": "2023-11-07T05:31:56Z",
"persisted_through": "2023-11-07T05:31:56Z"
},
"from": "2023-11-07T05:31:56Z",
"month_to_date": {
"from": "2023-11-07T05:31:56Z",
"requests": 1,
"to": "2023-11-07T05:31:56Z"
},
"quotas": [
{
"exhausted": true,
"limit": 4503599627370495,
"owner_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"remaining": 1,
"reset_at": "2023-11-07T05:31:56Z",
"used": 1
}
],
"rate_limit": {
"limit": 2,
"window_seconds": 2
},
"timezone": "<string>",
"to": "2023-11-07T05:31:56Z",
"totals": {
"requests": 1
}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field_errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field_errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field_errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field_errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
],
"request_id": "<string>"
}
}Usage
Get usage for the authenticated API key.
Returns daily request counts for the authenticated API key and the shared quotas that can limit it. This visibility request is operationally rate-limited but does not consume monthly API quota.
GET
https://api.infrawatch.com/api/v1
/
usage
Get usage for the authenticated API key.
curl --request GET \
--url https://api.infrawatch.com/api/v1/usage \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.infrawatch.com/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://api.infrawatch.com/api/v1/usage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.infrawatch.com/api/v1/usage"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"api_usage": {
"api_key": {
"key_prefix": "<string>",
"name": "<string>",
"owner_name": "<string>",
"owner_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"scopes": [
"<string>"
],
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"daily": [
{
"date": "2023-12-25",
"partial": true,
"requests": 1
}
],
"freshness": {
"current_through": "2023-11-07T05:31:56Z",
"persisted_through": "2023-11-07T05:31:56Z"
},
"from": "2023-11-07T05:31:56Z",
"month_to_date": {
"from": "2023-11-07T05:31:56Z",
"requests": 1,
"to": "2023-11-07T05:31:56Z"
},
"quotas": [
{
"exhausted": true,
"limit": 4503599627370495,
"owner_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"remaining": 1,
"reset_at": "2023-11-07T05:31:56Z",
"used": 1
}
],
"rate_limit": {
"limit": 2,
"window_seconds": 2
},
"timezone": "<string>",
"to": "2023-11-07T05:31:56Z",
"totals": {
"requests": 1
}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field_errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field_errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field_errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field_errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
],
"request_id": "<string>"
}
}Authorizations
Infrawatch API key. Supply the complete key directly as the header value.
Query Parameters
UTC daily usage window ending at the current time.
Available options:
7d, 30d, 90d, 180d Response
Current API-key usage and applicable quota state.
Show child attributes
Show child attributes
⌘I