cURL
curl --request GET \
--url https://api.relay.link/metrics/usageconst options = {method: 'GET'};
fetch('https://api.relay.link/metrics/usage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.relay.link/metrics/usage"
response = requests.get(url)
print(response.text){
"metrics": [
{
"apiKey": "<string>",
"timestamp": "<string>",
"endpoint": "<string>",
"statusCode": 123,
"errorCode": "<string>",
"count": 123
}
]
}API Reference
Get Usage
This API returns API call counts for the authenticated API key, grouped by endpoint, status code, and error code.
GET
/
metrics
/
usage
cURL
curl --request GET \
--url https://api.relay.link/metrics/usageconst options = {method: 'GET'};
fetch('https://api.relay.link/metrics/usage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.relay.link/metrics/usage"
response = requests.get(url)
print(response.text){
"metrics": [
{
"apiKey": "<string>",
"timestamp": "<string>",
"endpoint": "<string>",
"statusCode": 123,
"errorCode": "<string>",
"count": 123
}
]
}Headers
Integrator API key.
Query Parameters
Time bucket granularity. minutely defaults to last 24h, hourly to last 7d, daily to last 14d.
Available options:
minutely, hourly, daily Start of the query window as a Unix timestamp (seconds). Defaults based on granularity.
End of the query window as a Unix timestamp (seconds). Defaults to now.
Filter metrics by API key. Accepts a single value or a comma-separated list (e.g. key1,key2) — results include metrics matching any of the supplied keys. Maximum 50 keys.
Response
200 - application/json
Default Response
Show child attributes
Show child attributes
Was this page helpful?