Get All Units

Retrieve a list of the available units of measurement.

Request

Retrieve units of measurement via the following request:

HTTP Method Request URI

GET

https://api.vdms.io/report-builder/v1/units

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 the requested endpoint.

@type

String

Returns Collection.

items

Array

Contains a list of units of measurement.

items Array

The items array describes each unit of measurement via the following properties:

Name Data Type Description

@id

String

Indicates the relative path to an endpoint through which you may retrieve the current unit of measurement.

@type

String

Returns Unit.

description

String

Indicates the unit of measurement's description.

friendly_name

String

Identifies a unit of measurement by its friendly name.

id

String

Identifies a unit of measurement by its system-defined ID.

name

String

Identifies a unit of measurement by its name.

scale

Integer

Indicates the unit of measurement's scale. This value establishes the relationship between the base and current unit of measurement.

Example:

The thousand unit has a scale of 1000. This means that it takes 1000 requests to comprise 1 thousand unit.

unit

String

Identifies a type of unit of measurement.

Find out the type of unit of measurement assigned to a metric via the unit property of the Get All Metrics endpoint. A metric may leverage any unit of measurement associated with that type.

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

{
	"@id": "/report-builder/v1/units",
	"@type": "Collection",
	"items": [{
			"@id": "/report-builder/v1/units/terabyte",
			"@type": "Unit",
			"description": "Terabyte",
			"friendly_name": "Terabyte",
			"id": "terabyte",
			"name": "TB",
			"scale": 1000000000000,
			"unit": "byte"
		}, {
			"@id": "/report-builder/v1/units/gigabyte",
			"@type": "Unit",
			"description": "Gigabyte",
			"friendly_name": "Gigabyte",
			"id": "gigabyte",
			"name": "GB",
			"scale": 1000000000,
			"unit": "byte"
		}, {
			"@id": "/report-builder/v1/units/megabyte",
			"@type": "Unit",
			"description": "Megabyte",
			"friendly_name": "Megabyte",
			"id": "megabyte",
			"name": "MB",
			"scale": 1000000,
			"unit": "byte"
		}, {
			"@id": "/report-builder/v1/units/kilobyte",
			"@type": "Unit",
			"description": "Kilobyte",
			"friendly_name": "Kilobyte",
			"id": "kilobyte",
			"name": "KB",
			"scale": 1000,
			"unit": "byte"
		}, {
			"@id": "/report-builder/v1/units/byte",
			"@type": "Unit",
			"description": "Byte",
			"friendly_name": "Byte",
			"id": "byte",
			"name": "B",
			"scale": 1,
			"unit": "byte"
		}, {
			"@id": "/report-builder/v1/units/trillion",
			"@type": "Unit",
			"description": "Trillion",
			"friendly_name": "Trillion",
			"id": "trillion",
			"name": "T",
			"scale": 1000000000000,
			"unit": "number"
		}, {
			"@id": "/report-builder/v1/units/billion",
			"@type": "Unit",
			"description": "Billion",
			"friendly_name": "Billion",
			"id": "billion",
			"name": "B",
			"scale": 1000000000,
			"unit": "number"
		}, {
			"@id": "/report-builder/v1/units/million",
			"@type": "Unit",
			"description": "Million",
			"friendly_name": "Million",
			"id": "million",
			"name": "M",
			"scale": 1000000,
			"unit": "number"
		}, {
			"@id": "/report-builder/v1/units/thousand",
			"@type": "Unit",
			"description": "Thousand",
			"friendly_name": "Thousand",
			"id": "thousand",
			"name": "k",
			"scale": 1000,
			"unit": "number"
		}, {
			"@id": "/report-builder/v1/units/one",
			"@type": "Unit",
			"description": "One",
			"friendly_name": "One",
			"id": "one",
			"name": "",
			"scale": 1,
			"unit": "number"
		}, {
			"@id": "/report-builder/v1/units/day",
			"@type": "Unit",
			"description": "Day",
			"friendly_name": "Day",
			"id": "day",
			"name": "d",
			"scale": 86400,
			"unit": "time"
		}, {
			"@id": "/report-builder/v1/units/hour",
			"@type": "Unit",
			"description": "Hour",
			"friendly_name": "Hour",
			"id": "hour",
			"name": "h",
			"scale": 3600,
			"unit": "time"
		}, {
			"@id": "/report-builder/v1/units/minute",
			"@type": "Unit",
			"description": "Minute",
			"friendly_name": "Minute",
			"id": "minute",
			"name": "m",
			"scale": 60,
			"unit": "time"
		}, {
			"@id": "/report-builder/v1/units/second",
			"@type": "Unit",
			"description": "Second",
			"friendly_name": "Second",
			"id": "second",
			"name": "s",
			"scale": 1,
			"unit": "time"
		}, {
			"@id": "/report-builder/v1/units/byte-per-second",
			"@type": "Unit",
			"description": "Byte per second",
			"friendly_name": "Byte per second",
			"id": "byte_per_second",
			"name": "Bps",
			"scale": 1,
			"unit": "data_rate"
		}, {
			"@id": "/report-builder/v1/units/kilobyte-per-second",
			"@type": "Unit",
			"description": "Kilobyte per second",
			"friendly_name": "Kilobyte per second",
			"id": "kilobyte_per_second",
			"name": "KBps",
			"scale": 1000,
			"unit": "data_rate"
		}, {
			"@id": "/report-builder/v1/units/megabyte-per-second",
			"@type": "Unit",
			"description": "Megabyte per second",
			"friendly_name": "Megabyte per second",
			"id": "megabyte_per_second",
			"name": "MBps",
			"scale": 1000000,
			"unit": "data_rate"
		}, {
			"@id": "/report-builder/v1/units/gigabyte-per-second",
			"@type": "Unit",
			"description": "Gigabyte per second",
			"friendly_name": "Gigabyte per second",
			"id": "gigabyte_per_second",
			"name": "GBps",
			"scale": 1000000000,
			"unit": "data_rate"
		}, {
			"@id": "/report-builder/v1/units/bit-per-second",
			"@type": "Unit",
			"description": "Bit per second",
			"friendly_name": "Bit per second",
			"id": "bit_per_second",
			"name": "bps",
			"scale": 0.125,
			"unit": "data_rate"
		}, {
			"@id": "/report-builder/v1/units/kilobit-per-second",
			"@type": "Unit",
			"description": "Kilobit per second",
			"friendly_name": "Kilobit per second",
			"id": "kilobit_per_second",
			"name": "Kbps",
			"scale": 125,
			"unit": "data_rate"
		}, {
			"@id": "/report-builder/v1/units/megabit-per-second",
			"@type": "Unit",
			"description": "Megabit per second",
			"friendly_name": "Megabit per second",
			"id": "megabit_per_second",
			"name": "Mbps",
			"scale": 125000,
			"unit": "data_rate"
		}, {
			"@id": "/report-builder/v1/units/gigabit-per-second",
			"@type": "Unit",
			"description": "Gigabit per second",
			"friendly_name": "Gigabit per second",
			"id": "gigabit_per_second",
			"name": "Gbps",
			"scale": 125000000,
			"unit": "data_rate"
		}
	]
}