Retrieve Availability Status

get

/iot/api/v2/monitoring/availability

Returns the availability status for the Oracle IoT Cloud Service Instance. The status is either up or down. The status of the service instance depends on the status of the components. If all the components are up, the status is up; otherwise it is down. The returned response indicates the overall status of the instance, the service instance timestamp, the response time (in milliseconds), the thresholdTime(the max time taken to respond) and the significance (set only when status = "Down") .

Request

There are no request parameters for this operation.

Back to Top

Response

Supported Media Types

200 Response

OK
Body ()
Root Schema : Availability
Type: object
The availability information for the Service Instance.
Show Source
Nested Schema : details
Type: array
Array of components status
Show Source
Nested Schema : ComponentStatus
Type: object
The status of the Component of the Service Instance
Show Source
Nested Schema : failures
Type: array
Array of Failures. This is set only when the status of the Component = "Down"
Show Source
Nested Schema : Failures
Type: object
The failure details
Show Source

401 Response

Unauthorized. This error is returned if the access token is not valid or has expired.

403 Response

Forbidden. This error is returned if the operation is not allowed for the request.
Back to Top

Examples

The following example shows how to view the availability status of the IoT Cloud Service instance by submitting a GET request on the REST resource using cURL. For more information about cURL, see Use cURL.

Note:

In the request and response, iotserver will be replaced by name and port of your assigned Oracle IoT Cloud Service instance. The format of the Cloud Service instance is myinstance-myidentitydomain.iot.us.oraclecloud.com and the default port is 443.
curl -X GET -k -H 'Accept: application/json' -u 'username@example.com:password' http://iotserver/iot/api/v2/monitoring/availability

Example of Response Header

The following shows an example of the response header.

HTTP/1.1 200 OK
Content-Type: application/json

Example of Response Body

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

{
    "status": "Up",
    "time": "2021-08-19T09:31:31.080Z",
    "responseTime": 280,
    "thresholdTime": 30000,
    "details": [
        {
            "component": "cache",
            "status": "Up",
            "responseTime": 1,
            "thresholdTime": 5000,
            "significance": "High"
        },
        {
            "component": "database",
            "status": "Up",
            "responseTime": 3,
            "thresholdTime": 10000,
            "significance": "High"
        },
        {
            "component": "searchEngine",
            "status": "Up",
            "responseTime": 3,
            "thresholdTime": 5000,
            "significance": "High"
        },
        {
            "component": "messageBus",
            "status": "Up",
            "responseTime": 8,
            "thresholdTime": 10000,
            "significance": "Medium"
        },
        {
            "component": "analyticsEngine",
            "status": "Up",
            "responseTime": 82,
            "thresholdTime": 20000,
            "significance": "High"
        },
        {
            "component": "storage",
            "status": "Up",
            "responseTime": 131,
            "thresholdTime": 15000,
            "significance": "Medium"
        },
        {
            "component": "credentialStore",
            "status": "Up",
            "responseTime": 280,
            "thresholdTime": 15000,
            "significance": "High"
        }
    ],
    "links": [
        {
            "href":"http://iotserver/iot/api/v2/monitoring/availability",
            "rel": "self"
        },
        {
            "href":"http://iotserver/iot/api/v2/monitoring/availability",
            "rel": "canonical"
        }
    ]
}
Back to Top