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 TopResponse
Supported Media Types
- application/json
200 Response
OK
Root Schema : Availability
Type:
object
The availability information for the Service Instance.
Show Source
-
details(optional):
array details
Array of components status
-
links(optional):
array links
-
responseTime(optional):
integer(int32)
Specifies the total response time in millisecondsExample:
10000
-
significance(optional):
string
Allowed Values:
[ "High", "Medium", "Low" ]
This field will be set only if status = "Down". The highest among the significance values of the Component which are Down. If at least one "High" Component is down, top-level significance is "High". If all unhealthy components are "Medium" or "Low", top-level significance is "Medium"Example:High
-
status(optional):
string
Allowed Values:
[ "Up", "Down" ]
The overall status of IOT Service which is either Up or Down. The status is Up when Status of all Components is Up. The status is Down when status of one of the Component is Down.Example:Up
-
thresholdTime(optional):
integer(int32)
Specifies the maximum time in milliseconds for receiving the response from all the ComponentsExample:
30000
-
time(optional):
string(date-time)
Specifies the Service Instance timestampExample:
2015-01-29T13:37:26Z
Nested Schema : details
Type:
array
Array of components status
Show Source
-
Array of:
object ComponentStatus
The status of the Component of the Service Instance
Nested Schema : ComponentStatus
Type:
object
The status of the Component of the Service Instance
Show Source
-
component(optional):
string
Specifies the Component nameExample:
cache
-
failures(optional):
array failures
Array of Failures. This is set only when the status of the Component = "Down"
-
responseTime(optional):
integer(int32)
Specifies the response time in millisecondsExample:
1000
-
significance(optional):
string
Allowed Values:
[ "High", "Medium", "Low" ]
Specifies the significance of the Component in the overall health and availability of the ServiceExample:High
-
status(optional):
string
Allowed Values:
[ "Up", "Down" ]
Specifies the Component statusExample:Up
-
thresholdTime(optional):
integer(int32)
Specifies the maximum time in milliseconds for receiving the response from the ComponentExample:
15000
Nested Schema : failures
Type:
array
Array of Failures. This is set only when the status of the Component = "Down"
Show Source
-
Array of:
object Failures
The failure details
Nested Schema : Failures
Type:
object
The failure details
Show Source
-
errorMessage(optional):
string
The error message describing the failureExample:
Failed to connect to the database
-
rootCause(optional):
string
Allowed Values:
[ "TIMEOUT", "UNHEALTHY", "CONNECTION_FAILURE" ]
The root cause of failureExample:TIMEOUT
Nested Schema : Link
Type:
Show Source
object
-
href(optional):
string
Example:
https://iotserver/iot/api/v2/monitoring/metrics/test
-
rel(optional):
string
Example:
canonical
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.
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" } ] }