Retrieves a specific unit.
Retrieve a unit via the following request:
HTTP Method | Request URI |
---|---|
GET |
https://api.vdms.io/report-builder/v1/units/Unit 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 |
---|---|
Replace this variable with the system-defined ID of the desired unit. Use the Get All Units endpoint to retrieve a list of units and their system-defined IDs. |
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 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 elements:
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. |
The response body for an unsuccessful request will contain an error response that provides additional information.
A sample JSON request is shown below.
GET https://api.vdms.io/report-builder/units/terabyte HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: api.vdms.io
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: 208
{ "@id": "/report-builder/v1/units/terabyte", "@type": "Unit", "description": "Terabyte", "friendly_name": "Terabyte", "id": "terabyte", "name": "TB", "scale": 1000000000000, "unit": "byte" }