Get Metric Availability Data
get
                    /api/metric/AvailabilityData/read
Gets availability data for metrics of the specified instance.
Valid request combinations:
                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
                    - 
                            DeviceName(required): 
                            
                            Match All- 
    
        string
    
    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
 
- 
    
        string
    
    
- 
                            DeviceZoneID: integer
                            
                            The ID of the device zone to get performance data for. Deprecated. Use serialized device name instead.Example:1
- 
                            InstanceName(required): string
                            
                            The metric instance name corresponding to metricInstances.Example:Device
- 
                            MetricType(required): 
                            
                            Match All- 
    
        string
    
    Metric Type Name (or multiple, comma-separated Metric Type Names)Example:Latency
 
- 
    
        string
    
    
- 
                            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: 
    	
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    objectThe 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 : type
    
    	Type: 
    	
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
        Show Source
        object- 
                
                    
                    data: array
                    
                    
                
                
                    data
                
                
                
- 
                
                    
                    total: integer
                    
                    
                     
                    
                
                
                The total number of results regardless of paging.Example:1
Nested Schema : metricAvailabilityDataRead
    
    	Type: 
    	
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
        Show Source
        object- 
                
                    
                    Availability: array
                    
                    
                
                
                    Availability
                
                
                Array of times and percentage of time it was available for that time period. Availability plus Unavailability plus MissingData should add up to 100.
- 
                
                    
                    BlankData: array
                    
                    
                
                
                    BlankData
                
                
                This is used if the time range goes into the future. It ensures the chart shows the future time properly.
- 
                
                    
                    DeviceName: string
                    
                    
                     
                    
                
                
                Device NameExample:router.example.com
- 
                
                    
                    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
- 
                
                    
                    MissingData: array
                    
                    
                
                
                    MissingData
                
                
                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.
- 
                
                    
                    Retention: string
                    
                    
                     
                    
                
                
                The retention period the data is drawn from.Example:raw
- 
                
                    
                    StartTime: string
                    
                    
                     
                    
                
                
                Epoch time stringExample:1695201840
- 
                
                    
                    StopTime: string
                    
                    
                     
                    
                
                
                Epoch time stringExample:1695288240
- Unavailability: array Unavailability
Nested Schema : Availability
    
    	
    	Type: 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    arrayArray 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: 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    arrayThis 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: 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    arrayArray 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
        
        
    
    
    
    
    
    
    
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: 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    arrayThe list of errors reported. Validation errors will be keyed by record field.
    
    
    
    
    
        Show Source
        - 
            Array of: 
                object  items
            
            An error.
Nested Schema : items
    
    	Type: 
    	
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    objectAn error.
    
    
    
    
    
    
    
    
    
    
    
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"
    }
  ]
}