Get Edge CNAME Report - Data Transferred or Hits

Retrieves total data transferred or total hits statistics for each edge CNAME for which custom reports has been activated. Additionally, these statistics will be broken down by either cache status code or HTTP status code.

Request

A request to retrieve a custom report is described below.

HTTP Method Request URI

GET

https://api.edgecast.com/v2/reporting/customers/AccountNumber/media/Platform/customreport?begindate=StartDate&enddate=EndDate&metriccode=MetricCode&groupcode=GroupCode

Define the following terms 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

AccountNumber

Required

Replace this variable with a customer account number. This account number may be found in the upper right-hand corner of the MCC.

Platform

Required

Replace this variable with an integer that indicates the platform for which a report will be generated.

Valid values are:

  • 3: HTTP Large
  • 8: HTTP Small
  • 14: Application Delivery Network (ADN)

StartDate

Required

Replace this variable with the start date for the report. Only activity that took place after the specified date will be included in the report.

Format:YYYY-MM-DD

Learn more about date/time format.

EndDate

Required

Replace this variable with the end date for the report. Activity that took place after the specified date will not be included in the report.

Format:YYYY-MM-DD

Learn more about date/time format.

MetricCode

Replace this variable with the metric code that identifies the type of report to generate. By default, a "hits" report will be generated.

Use the Get Metric Codes endpoint to retrieve a list of metric codes.

GroupCode

Replace this variable with the group code that identifies the type of statistics that will be included in the report. By default, report statistics will be broken down by HTTP status codes.

Use the Get Group Codes endpoint to retrieve a list of group codes.

Request Headers

This endpointIdentifies a request's connection point to our REST API service. only takes advantage of common request headers.

Request Body

Request body parameters are not required by this endpoint.

Response

The response to the above request includes an HTTP status code, response headers, and a response body.

Status Code

A status code indicates whether the request was successfully performed.

Response Headers

The response for this endpoint only includes standard HTTP response headers.

View common response headers.

Response Body

The response body for a successful request contains the following response parameters:

Name Data Type Description

MetricCode

String

Identifies the type of report that was generated by its metric code.

Description

String

Describes the type of report that was generated.

Data

Array

This response parameter describes the report.

GroupCode

String

Data array

Identifies the type of statistics included in the report by its metric code.

Description

String

Data array

Describes the type of statistics included in the report.

Data

Array

Data array

This response parameter contains report data.

Description

String

Data array > Data array

Describes the report code (e.g., edge CNAME) for which report data is reported.

TotalCount

String

Data array > Data array

Indicates either of the following:

  • Total Hits
  • Total Data Transferred in Megabytes

The value reported in this response parameter is determined by the metric code reported by the MetricCode response parameter.

Data

Array

Data array > Data array

This response parameter contains statistics broken down by the category defined in the GroupCode response parameter.

KeyCode

String

Data array > Data array > Data array

Identifies the type of statistic being reported by its code.

Description

String

Data array > Data array > Data array

Describes the type of statistic being reported.

View a description for each field.

Count

String

Data array > Data array > Data array

Indicates either of the following for the type of statistic defined by the KeyCode response parameter:

  • Hits
  • Data Transferred in Megabytes

The value reported in this response parameter is determined by the metric code reported by the MetricCode response parameter.

Errors

The response body for an unsuccessful request may contain an error parameter that provides additional information.

View common error messages.

Sample Request and Response (JSON)

A sample JSON request is provided below.

GET https://api.edgecast.com/v2/reporting/customers/0001/media/3/customreport?begindate=2024-01-01&enddate=2024-02-01 HTTP/1.1

Authorization: TOK:12345678-1234-1234-1234-1234567890ab

Accept: application/json

Host:api.edgecast.com

A sample JSON response is provided 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: 1808

[{
		"MetricCode" : "Hits",
		"Description" : "Hits",
		"Data" : [{
				"GroupCode" : "HTTP_STATUS",
				"Description" : "HTTP Response Codes",
				"Data" : [{
						"Description" : "cdn.example.com",
						"TotalCount" : "9656108598",
						"Data" : [{
								"KeyCode" : "HTTP_STATUS_2xx",
								"Description" : "2xx",
								"Count" : "1013588860"
							}, {
								"KeyCode" : "HTTP_STATUS_3xx",
								"Description" : "3xx",
								"Count" : "32752"
							}, {
								"KeyCode" : "HTTP_STATUS_4xx",
								"Description" : "4xx",
								"Count" : "23711"
							}, {
								"KeyCode" : "HTTP_STATUS_5xx",
								"Description" : "5xx",
								"Count" : "541"
							}, {
								"KeyCode" : "HTTP_STATUS_OTHER",
								"Description" : "Other",
								"Count" : "0"
							}, {
								"KeyCode" : "000",
								"Description" : "Unassigned",
								"Count" : "8642462734"
							}
						]
					}, {
						"Description" : "stream.example.com",
						"TotalCount" : "13954422087.14",
						"Data" : [{
								"KeyCode" : "LOG_TCP_HIT",
								"Description" : "Cache Hits",
								"Count" : "740617948.87"
							}, {
								"KeyCode" : "LOG_TCP_MISS",
								"Description" : "Misses",
								"Count" : "18364385.29"
							}, {
								"KeyCode" : "LOG_CONFIG_NOCACHE",
								"Description" : "No Cache",
								"Count" : "0"
							}, {
								"KeyCode" : "LOG_UNCACHEABLE",
								"Description" : "Uncacheable",
								"Count" : "0"
							}, {
								"KeyCode" : "LOG_OTHER",
								"Description" : "Other",
								"Count" : "492443420.55"
							}, {
								"KeyCode" : "000",
								"Description" : "Unassigned",
								"Count" : "12702996332.43"
							}
						]
					}
				]
			}
		]
	}
]

Sample Request and Response (XML)

A sample XML request is provided below.

GET https://api.edgecast.com/v2/reporting/customers/0001/media/3/customreport?begindate=2024-01-01&enddate=2024-02-01 HTTP/1.1

Authorization: TOK:12345678-1234-1234-1234-1234567890ab

Accept: application/xml

Host:api.edgecast.com

A sample XML response is provided below.

HTTP/1.1 200 OK

Cache-Control: private

Content-Type: application/xml; charset=utf-8

Date: Thu, 15 Apr 2021 12:00:00 GMT

Content-Length: 2961

<ArrayOfCustomReportAPI xmlns="http://www.whitecdn.com/schemas/apiservices/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
	<CustomReportAPI>
		<MetricCode>Hits</MetricCode>
		<Description>Hits</Description>
		<Data>
			<CustomReportGroup>
				<GroupCode>HTTP_STATUS</GroupCode>
				<Description>HTTP Response Codes</Description>
				<Data>
					<CustomReportCNameItem>
						<Description>cdn.example.com</Description>
						<TotalCount>9656108598</TotalCount>
						<Data>
							<CustomReportKeyItem>
								<KeyCode>HTTP_STATUS_2xx</KeyCode>
								<Description>2xx</Description>
								<Count>1013588860</Count>
							</CustomReportKeyItem>
							<CustomReportKeyItem>
								<KeyCode>HTTP_STATUS_3xx</KeyCode>
								<Description>3xx</Description>
								<Count>32752</Count>
							</CustomReportKeyItem>
							<CustomReportKeyItem>
								<KeyCode>HTTP_STATUS_4xx</KeyCode>
								<Description>4xx</Description>
								<Count>23711</Count>
							</CustomReportKeyItem>
							<CustomReportKeyItem>
								<KeyCode>HTTP_STATUS_5xx</KeyCode>
								<Description>5xx</Description>
								<Count>541</Count>
							</CustomReportKeyItem>
							<CustomReportKeyItem>
								<KeyCode>HTTP_STATUS_OTHER</KeyCode>
								<Description>Other</Description>
								<Count>0</Count>
							</CustomReportKeyItem>
							<CustomReportKeyItem>
								<KeyCode>000</KeyCode>
								<Description>Unassigned</Description>
								<Count>8642462734</Count>
							</CustomReportKeyItem>
						</Data>
					</CustomReportCNameItem>
					<CustomReportCNameItem>
						<Description>stream.example.com</Description>
						<TotalCount>13954422087.14</TotalCount>
						<Data>
							<CustomReportKeyItem>
								<KeyCode>LOG_TCP_HIT</KeyCode>
								<Description>Cache Hits</Description>
								<Count>740617948.87</Count>
							</CustomReportKeyItem>
							<CustomReportKeyItem>
								<KeyCode>LOG_TCP_MISS</KeyCode>
								<Description>Misses</Description>
								<Count>18364385.29</Count>
							</CustomReportKeyItem>
							<CustomReportKeyItem>
								<KeyCode>LOG_CONFIG_NOCACHE</KeyCode>
								<Description>No Cache</Description>
								<Count>0</Count>
							</CustomReportKeyItem>
							<CustomReportKeyItem>
								<KeyCode>LOG_UNCACHEABLE</KeyCode>
								<Description>Uncacheable</Description>
								<Count>0</Count>
							</CustomReportKeyItem>
							<CustomReportKeyItem>
								<KeyCode>LOG_OTHER</KeyCode>
								<Description>Other</Description>
								<Count>492443420.55</Count>
							</CustomReportKeyItem>
							<CustomReportKeyItem>
								<KeyCode>000</KeyCode>
								<Description>Unassigned</Description>
								<Count>12702996332.43</Count>
							</CustomReportKeyItem>
						</Data>
					</CustomReportCNameItem>
				</Data>
			</CustomReportGroup>
		</Data>
	</CustomReportAPI>
</ArrayOfCustomReportAPI>