Get Report

Retrieves a report that has been submitted within the last 7 days.

Requesting a report older than 7 days will result in a 404 Not Found.

Request

Retrieve a report via the following request:

HTTP Method Request URI

GET

https://api.vdms.io/report-builder/v1/reports/Report ID

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
Report ID

Identifies a report by its system-defined ID.

Use the Get All Reports endpoint to retrieve a list of reports and their system-defined IDs.

Request Headers

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

Unlike requests to api.edgecast.com, requests to our API gateway (api.vdms.io) require an access token (OAuth).

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 elements:

Name Data Type Description
@id String Indicates the relative path to an endpoint through which you may retrieve the current report.

@type

String

Returns Report.

completed_at

String

Indicates the timestamp (UTC) at which report data generation completed.

Syntax:

YYYY-MM-DDThh:mm:ss:ffffffZ

Learn more.

created_at

String

Indicates the timestamp (UTC) at which report data was requested.

Syntax:

YYYY-MM-DDThh:mm:ss:ffffffZ

Learn more.

dimensions

Array of String Values

Indicates the report's actual dimensions.

Time is automatically reported when a time interval has been defined. If the report query's configuration defines the by property, then the time dimension, if not already present, will be added to this property's value. If this occurs, then this property will not match the dimensions property in the query object.

id

String

Identifies this report by its system-defined ID.

items

Array of Objects

Contains report data. Each object, which represents a recordA record contains report data that identifies each unique combination of dimensions. in the report, contains key-value pairs that correspond to the set of fields reported by the metrics and dimensions properties.

Report data is only returned when the status property is set to completed.

A record will only be included within a report when at least one metric is set to a non-zero value. Missing records is not an indicator of data loss.

If a time interval has been defined via the by property, then the Time dimension will be automatically included in the report. This occurs regardless of whether it was defined in the report query.

metrics

Array of String Values

Indicates the report's metrics.

query

Object

Contains the query used to generate report data.

status

String

Indicates the current status for the request to generate report data. Valid values are:

submitted | processing | error | canceled | completed
query Object

The query object describes the query used to generate report data via the following properties:

Name Data Type Description

params

Object

Defines the query for the data generated in the current report.

params Object

The params object contains the following properties:

Name Data Type Description

by

String

Identifies a granularity by its system-defined ID.

Use the Get All Granularities endpoint to retrieve a list of available granularities and their system-defined IDs.

dimensions

Object

Contains a string value for each dimension assigned to this report.

Use the Get All Dimensions endpoint to retrieve a list of dimensions and their system-defined IDs.

end

String

Determines the report's relative or fixed end date/time.

Time is only relevant for reports that only contain data that occurred within the last 7 days and whose time interval is set to 5 minutes or hourly.

Fixed Date Syntax:

YYYY-MM-DDThh:mm:ss:ffffffZ

Learn more.

filter

String

Contains a list of filters.

Key information:

  • This property is an array of objects expressed as a string value. Each object in this array represents a filter. Each object contains the following properties:

    • field: A string that identifies a dimension by its system-defined ID. Report data will be filtered by this dimension.

      Use the Get All Dimensions endpoint to retrieve a list of dimensions and their system-defined IDs.

    • operator: A string that identifies a comparison operator by its system-defined ID. This comparison operator establishes the relationship between field and value that report data must meet.

      Use the Get All Operators endpoint to retrieve a list of comparison operators and their system-defined IDs.

    • value: A string, number, or array that indicates the value to which the comparison operator will be applied. The data type for this property is determined by the comparison operator's multi_value property and the dimension's field_type property.
  • Example:

    The following configuration filters by delivery platform:

    Property Value

    field

    String

    platform

    operator

    String

    in

    value

    Array of String Values

    Valid values are:

    • cache: HTTP Large
    • wac: HTTP Small
    • adn: ADN

    The following code excerpt filters by the ADN delivery platform:

    "filter": "[{\"field\":\"platform\",\"operator\":\"in\",\"value\":[\"adn\"]}]",	

limit

Integer

Determines the maximum number of rows that may be included in a report. Valid values are:

1 - 30000

metrics

Array of String Values

Identifies one or more metrics that will be included when report data is generated from this report.

Use the Get All Metrics endpoint to retrieve a list of metrics and their system-defined IDs.

sort

Array of String Values

Determines how report data will be sorted.

Key information:

  • Sort report data by dimensions or metrics.
  • Perform a reverse sort by prepending -.

    Example:

    Sort report data by number of requests in descending order.

    ["-request_count"]
  • The first string value in the array determines how records will be sorted. Additional string values determine sort order for records with the same value.

start

String

Determines the report's relative or fixed start date/time.

Time is only relevant for reports that only contain data that occurred within the last 7 days and whose time interval is set to 5 minutes or hourly.

Fixed Date Format:

YYYY-MM-DDThh:mm:ss:ffffffZ

Learn more.

units

Object

Indicates unit information for each metric defined in the report. This information is reported as a key-value pair with the following syntax:

"Metric" : "Units"

Use the Get All Units endpoint to retrieve a list of units of measurements and their system-defined IDs.

Unit information is not provided for metrics that report percentages.

Errors

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

Sample Request and Response

A sample JSON request is shown below.

A sample JSON response is shown below.

HTTP/1.1 200 OK

Cache-Control: no-cache

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

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

Content-Length: 959

{
	"@id": "/report-builder/v1/reports/5e556992611449f26b840b7c?page=1&page_size=25",
	"@type": "Report",
	"completed_at": "2020-02-25T18:38:12.483000Z",
	"created_at": "2020-02-25T18:38:10.658000Z",
	"dimensions": ["time", "method", "content_type"],
	"id": "5e556992611449f26b840b7c",
	"metrics": ["bytes_out", "file_size", "cache_hit_percentage"],
	"query": {
		"id": "5e4ef7759cdf5a3573fcac08",
		"params": {
			"by": "week",
			"dimensions": ["method", "content_type"],
			"end": "2020-02-25T18:38:10Z",
			"filter": "[{\"field\":\"platform\",\"operator\":\"in\",\"value\":[\"adn\"]},{\"field\":\"root_directory\",\"operator\":\"contains\",\"value\":\"/marketing/\"}]",
			"limit": 30000,
			"metrics": ["bytes_out", "file_size", "cache_hit_percentage"],
			"sort": ["-bytes_out"],
			"start": "2020-01-26T00:00:00Z",
			"units": {
				"bytes_out": "kilobyte",
				"file_size": "gigabyte"
			}
		}
	},
	"status": "completed"
}