Returns billing usage data for the specified month. This data may be filtered by one of the following criteria:
A request to retrieve billing usage data is described below.
HTTP Method | Request URI |
---|---|
GET |
https://api.edgecast.com/v2/reporting/customers/AccountNumber/media/Platform/units/0/billingtraffic?begindate=BillingMonth®ion=RegionID&country=CountryCode&pops=POPs |
Define the following variables when submitting the above request:
VariableA variable represents a value that must be replaced. A variable consists of either a URL segment (e.g., "0001" in /0001/) or a query string value (e.g., "3" in mediaTypes=3). | Description |
---|---|
Required |
|
Required |
Replace this variable with an integer that indicates the service for which a report will be generated. Valid values are:
|
Required |
Replace this variable with the 1st of the month for which billing information will be returned. Syntax: YYYY-MM-01
|
Replace this variable with the ID of the billing region for which billing information will be returned. Use the Get Billing Regions endpoint to retrieve a list of billing regions and IDs. The region, country, and pops query string parameters are optional and mutually exclusive. A request to this endpoint may include up to one of these filters. The region query string parameter |
|
Replace this variable with the ISO 3166 code corresponding to the country for which billing information will be returned. A list of country codes is available from the Country Codes (ISO 3166) article in the CDN Help Center. The region, country, and pops query string parameters are optional and mutually exclusive. A request to this endpoint may include up to one of these filters. The country query string parameter (e.g., &country=US) should only be defined when billing data should be restricted to the specified country. |
|
Optional. Limit report data to one or more POPs by replacing this variable with a comma-delimited list of the desired POPs. Use the Get All Edge Nodes endpoint to retrieve a list of POPs and their codes. The region, country, and pops query string parameters are optional and mutually exclusive. A request to this endpoint may include up to one of these filters. The pops query string parameter |
This endpointIdentifies a request's connection point to our REST API service. only takes advantage of common request headers.
Request body parameters are not required by this endpoint.
The response to the above request includes an HTTP status code, response headers, and a response body.
A status code indicates whether the request was successfully performed.
The response for this endpoint only includes standard HTTP response headers.
The response body for a successful request contains the following response parameters:
Name | Data Type | Description |
---|---|---|
AccountNumber |
String |
Indicates the CDN account number associated with the requested billing data. |
MediaTypeId |
Integer |
Indicates the service associated with the requested billing data. Valid values are:
|
Country |
String |
Indicates the code for the country for which billing data was provided. This code will always match the value defined in the request's country query string parameter. This response parameter is only returned when the country query string parameter is defined in the request. |
RegionId |
Integer |
Indicates the ID of the region for which billing data was provided. This ID will always match the value defined in the request's region query string parameter. This response parameter is only returned when the region query string parameter is defined in the request. |
Pops |
String |
Indicates the set of POPs for which billing data was provided. Valid values are:
|
UsageUnits |
Integer |
This parameter should always return 0. |
Data |
Array Object Values |
Contains a data object that describes billing data. |
Bandwidth |
Number Floating Point |
Data array Indicates bandwidth usage, in Mbps, for the requested billing month. The reported usage information reflects any filters (e.g., region, country, or POPs) that may have been defined in the request. |
DataTransferred |
Number Floating Point |
Data array Indicates the total amount of data transferred, in GBs, for the requested billing month. The reported usage information reflects any filters (e.g., region, country, or POPs) that may have been defined in the request. |
StartDate |
String |
Data array Indicates the month for which billing information was reported. Syntax: YYYY-MM-01
|
The response body for an unsuccessful request may contain an error parameter that provides additional information.
A sample JSON request is shown below.
GET https://api.edgecast.com/v2/reporting/customers/0001/media/14/units/0/billingtraffic?begindate=2024-01-01 HTTP/1.1
Authorization: TOK:12345678-1234-1234-1234-1234567890ab
Accept: application/json
Content-Type: application/json
Host: api.edgecast.com
A sample JSON response is shown below.
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/json; charset=utf-8
Date: Thu, 15 Apr 2021 12:00:00 GMT
Content-Length: 248
[{
"AccountNumber": "0001",
"MediaTypeId": 14,
"Pops": "all",
"UsageUnits": 0,
"Data": [{
"Bandwidth": 1484302.2916001333,
"DataTransferred": 191320916.11106589,
"StartDate": "01\/1\/2024 12:00:00 AM"
}
]
}
]