Analytics API¶
This API provides daily requests, bandwidth usage metrics for a specified domain. It helps users monitor and analyze requests, bandwidth consumption to gain insights into network performance.
Prerequisite¶
- You must have an account on Nitrogen.
- Your target domain on which you want to get bandwith or requests, must have been registered on Nitrogen.
- You must have a service account configured with Editor access. If not, you can refer this article for the same.
API Request & Response¶
Endpoint¶
or
Authorization¶
API Request Payload¶
The following is the api request payload.
Example¶
curl --request PUT --location 'https://dash.n7.io/api/v2/sense/metric/bandwidth' \
--header 'Authorization: Token <api-key-of-service-account>' \
--header 'Content-Type: application/json' \
--data-raw '{
"domain": "www.example.com",
"date": "2024-10-10T00:00:00Z"
}'
or
curl --request PUT --location 'https://dash.n7.io/api/v2/sense/metric/requests' \
--header 'Authorization: Token <api-key-of-service-account>' \
--header 'Content-Type: application/json' \
--data-raw '{
"domain": "www.example.com",
"date": "2024-10-10T00:00:00Z"
}'
Request Payload¶
domain
: The domain name for which you want to retrieve requests or bandwidth metrics, e.g., "www.example.com"date
: The target date in YYYY-MM-DDTHH:MM:SSZ format (UTC) for which the requests or bandwidth data is requested.
Payload Fields¶
Field | Type | Default |
---|---|---|
domain | required | (none) |
date | required | (none) |
API Response Object¶
The following is the api response
Response Fields¶
value
: containing requests or bandwidth value for the specified domain and date.