POST
/api/v1/cdn/domain-usage/
curl --request POST \ --url 'https://api.e2enetworks.com/myaccount/api/v1/cdn/domain-usage/?project_id=<PROJECT_ID>&location=<LOCATION>&apikey=<API_KEY>' \ --header 'Authorization: Bearer <API_TOKEN>' \ --header 'Content-Type: application/json' \ --data '{ "domain": "all", "end_date": "2022-05-19", "granularity": "daily", "start_date": "2022-05-04"}'import requests
response = requests.post( "https://api.e2enetworks.com/myaccount/api/v1/cdn/domain-usage/", params={"project_id": "<PROJECT_ID>", "location": "<LOCATION>", "apikey": "<API_KEY>"}, headers={"Authorization": "Bearer <API_TOKEN>"}, json={ "domain": "all", "end_date": "2022-05-19", "granularity": "daily", "start_date": "2022-05-04", },)print(response.json())const url = new URL("https://api.e2enetworks.com/myaccount/api/v1/cdn/domain-usage/");url.search = new URLSearchParams({ project_id: "<PROJECT_ID>", location: "<LOCATION>", apikey: "<API_KEY>" });
const response = await fetch(url, { method: "POST", headers: { "Authorization": "Bearer <API_TOKEN>", "Content-Type": "application/json" }, body: JSON.stringify({ "domain": "all", "end_date": "2022-05-19", "granularity": "daily", "start_date": "2022-05-04" }),});console.log(await response.json());Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”project_id
required
integer
Project ID Find your project id here
location
required
string
Deployment region for the resource. Accepted values: Delhi, Chennai.
Mumbai region has been discontinued. Delhi and Chennai are the only supported regions.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
domain
required
string
Example
allend_date
required
string format: date
Example
2022-05-19granularity
required
string
Example
dailystart_date
required
string format: date
Example
2022-05-04Responses
Section titled “Responses”Successful response
Media typeapplication/json
object
code
integer
data
Array
errors
object
key
additional properties
any
message
string
Example
{ "code": 200, "data": [], "errors": {}, "message": "Success"}