Get Metric Availability Data

get

/api/metric/AvailabilityData/read

Gets availability data for metrics of the specified instance.
Valid request combinations:
  • Serialized device name
    /api/metric/AvailabilityData/read?DeviceName=router.example.com;z3&MetricType=Latency&InstanceName=Device&TimeRange=now-24h..now
  • Device name and device zone
    /api/metric/AvailabilityData/read?DeviceName=router.example.com&DeviceZoneID=3&MetricType=Latency&InstanceName=Device&TimeRange=now-24h..now

Request

Query Parameters
  • Match All
    • The serialized device name (or multiple, comma-separated serialized device names). The device name may be serialized (include the zone id) or just the name if the zone is included separately.
      Example: router.example.com OR router.example.com;z1
  • The ID of the device zone to get performance data for. Deprecated. Use serialized device name instead.
    Example:
    1
  • The metric instance name corresponding to metricInstances.
    Example:
    Device
  • Match All
    • Metric Type Name (or multiple, comma-separated Metric Type Names)
      Example: Latency
  • Match All
    • Shorthand string that encompasses the start and end times in RFC3339 format or relative time literal format. It will take precedence over StartTime if both are passed in.
      Example: now-24h..now

There's no request body for this operation.

Back to Top

Response

Supported Media Types

200 Response

Successful operation
Body ()
Root Schema : schema
Match All
Show Source
Nested Schema : SuccessfulGetOperation
Type: object
The response body for a successful get operation.
Show Source
Nested Schema : type
Type: object
Show Source
Nested Schema : data
Type: array
Show Source
Nested Schema : metricAvailabilityDataRead
Type: object
Show Source
Nested Schema : Availability
Type: array
Array of times and percentage of time it was available for that time period. Availability plus Unavailability plus MissingData should add up to 100.
Show Source
Nested Schema : BlankData
Type: array
This is used if the time range goes into the future. It ensures the chart shows the future time properly.
Show Source
Nested Schema : MissingData
Type: array
Array of times and percentage of time there was no data for that time period. Availability plus Unavailability plus MissingData should add up to 100.
Show Source
Nested Schema : Unavailability
Type: array
Array of times and percentage of time it was unavailable for that time period. Availability plus Unavailability plus MissingData should add up to 100.
Show Source
Nested Schema : items
Type: array
Show Source
Example:
[
    "1695200400000",
    100
]
Nested Schema : items
Type: array
Show Source
Nested Schema : items
Type: array
Show Source
Example:
[
    "1695200400000",
    0
]
Nested Schema : items
Type: array
Show Source
Example:
[
    "1695200400000",
    0
]

Default Response

Failed operation
Body ()
Root Schema : schema
Type: object
Show Source
Nested Schema : errors
Type: array
The list of errors reported. Validation errors will be keyed by record field.
Show Source
Nested Schema : items
Type: object
An error.
Back to Top

Examples

The following examples show how to use query parameters in Get Availability Data requests.

You can submit requests using cURL, an API client, or your browser.

To get availability data for metrics using a serialized device name (device name followed by zone number, router.example.com;z3):

http://hostFQDN/api/metric/AvailabilityData/read?DeviceName=router.example.com;z3&MetricType=Latency&InstanceName=Device&TimeRange=now-24h..now

To get availability data for metrics using a device name and device zone in separate parameters (DeviceName=router.example.com&DeviceZoneID=3):

http://hostFQDN/api/metric/AvailabilityData/read?DeviceName=router.example.com&DeviceZoneID=3&MetricType=Latency&InstanceName=Device&TimeRange=now-24h..now

Example of the Response Body

The following example shows the contents of a response body in JSON format:

{
  "success": "true",
  "message": "Loaded 1 entries",
  "total": "1",
  "data": [
    {
      "DeviceName": "router.example.com",
      "MetricInstanceName": "Device",
      "MetricTypeName": "Latency",
      "Maximum": "0",
      "MetricID": 642677,
      "Unavailability": [
        [
          1695200400000,
          0
        ]
      ],
      "Availability": [
        [
          1695200400000,
          100
        ]
      ],
      "MissingData": [
        [
          1695200400000,
          0
        ]
      ],
      "BlankData": [
        []
      ],
      "StartTime": 1695201840,
      "StopTime": 1695288240,
      "Retention": "raw"
    }
  ]
}
Back to Top