Get a Summary of Availability Information for an Instance

get

/api/metric/AvailabilityData/readSummary

Gets a summary in pie chart format of availability information for the specified instance.
An example path with query parameters is:
/api/metric/AvailabilityData/readSummary?DeviceName=router.example.com%3Bz3&MetricType=Latency&InstanceName=Device

Request

Query Parameters
  • The device name, including the zone ID (serialized device name). Oracle recommends including the zone ID with the device name. If you do not, you must include it in the DeviceZoneID parameter.
    Example:
    router.example.com;z1 OR router.example.com
  • The database ID corresponding to the device zone. Deprecated. Use serialized device name instead.
    Example:
    1
  • The metric instance name corresponding to the MetricInstances database table InstanceName field.
    Example:
    Device
  • The metric type name corresponding to the MetricTypes database table MetricTypeName field.
    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 : metricAvailabilityDataReadSummary
Type: object
Show Source
Nested Schema : GraphData
Type: array
This holds 2 Type/Value objects. Type is Available and Unavailable. Value is percent of time available (0-100), and percent of time unavailable (0-100).
Show Source
Example:
[
    {
        "Type":"Available",
        "Value":"100"
    },
    {
        "Type":"Unavailable",
        "Value":"0"
    }
]
Nested Schema : items
Type: object
Show Source

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 example shows how to use query parameters in Get a Summary of Availability Information for an Instance requests. The parameters specify to get latency metrics for an instance that is a device, and provide the device's serialized name (the device name followed by zone number).

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

http://hostFQDN/api/metric/AvailabilityData/readSummary?DeviceName=router.example.com%3Bz3&MetricType=Latency&InstanceName=Device

Example of the Response Body

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

{
  "success": "true",
  "message": "Loaded 1 entries",
  "data": [
    {
      "DeviceName": "router.example.com",
      "MetricInstanceName": "Device",
      "MetricTypeName": "Latency",
      "Maximum": "0",
      "MetricID": 642677,
      "StartTime": 1695201840,
      "StopTime": 1695288240,
      "Retention": "raw",
      "GraphData": [
        {
          "Type": "Available",
          "Value": "100"
        },
        {
          "Type": "Unavailable",
          "Value": "0"
        }
      ]
    }
  ]
}
Back to Top