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:
An example path with query parameters is:
/api/metric/AvailabilityData/readSummary?DeviceName=router.example.com%3Bz3&MetricType=Latency&InstanceName=Device
Request
Query Parameters
-
DeviceName(required): string
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
-
DeviceZoneID: integer
The database ID corresponding to the device zone. Deprecated. Use serialized device name instead.Example:
1
-
InstanceName(required): string
The metric instance name corresponding to the MetricInstances database table InstanceName field.Example:
Device
-
MetricType(required): string
The metric type name corresponding to the MetricTypes database table MetricTypeName field.Example:
Latency
-
TimeRange:
Match All
-
string
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
-
string
There's no request body for this operation.
Back to TopResponse
Supported Media Types
- application/json
200 Response
Successful operation
Root Schema : schema
Match All
Show Source
-
object
SuccessfulGetOperation
The response body for a successful get operation.
-
object
type
Nested Schema : SuccessfulGetOperation
Type:
object
The response body for a successful get operation.
Show Source
-
message: string
The response message.Example:
Loaded 1 entries
-
success: boolean
Whether the operation was a success (true) or a failure (false).Example:
true
Nested Schema : metricAvailabilityDataReadSummary
Type:
Show Source
object
-
DeviceName: string
Device NameExample:
router.example.com
-
GraphData: array
GraphData
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).
-
Maximum: integer
MaximumExample:
0
-
MetricID: integer
May be a single value or a comma-separated listExample:
642677
-
MetricInstanceName: string
Metric Instance NameExample:
Device
-
MetricTypeName: string
Metric Type NameExample:
Latency
-
Retention: string
The retention period the data is drawn from.Example:
raw
-
StartTime: string
Epoch time stringExample:
1695201840
-
StopTime: string
Epoch time stringExample:
1695288240
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:
Show Source
object
-
Type: string
TypeExample:
Available
-
Value: integer
ValueExample:
100
Default Response
Failed operation
Root Schema : schema
Type:
Show Source
object
-
errors: array
errors
The list of errors reported. Validation errors will be keyed by record field.
-
message: string
The response message.Example:
Exception thrown
-
success: boolean
Whether the operation was a success (true) or a failure (false).Example:
false
Nested Schema : errors
Type:
array
The list of errors reported. Validation errors will be keyed by record field.
Show Source
-
Array of:
object items
An error.
Nested Schema : items
Type:
object
An error.
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" } ] } ] }