Get system status information
get
https://{managementIp}/rest/{version}/system/status
Retrieves the system uptime, system health, and HA/redundancy information (if configured as an HA system).
Request
Path Parameters
-
version(required): string
REST API version string.
Available values: v1.2Allowed Values:[ "v1.2" ]
Header Parameters
-
Authorization(required):
The value in the Authorization header must be the string "
Bearer {access token}
", where{access token}
is a valid, unexpired token received in response to a prior/rest/{version}/auth/token
request.
There's no request body for this operation.
Back to TopResponse
Supported Media Types
- application/xml
200 Response
OK - Requested data is returned in response body
Nested Schema : data
Type:
Show Source
object
-
haHealthScorePercent: integer
Minimum Value:
0
Maximum Value:100
Example:100
-
haPeerName: string
Example:
thewater-ed
-
haPeerRole: string
Allowed Values:
[ "active", "standby", "out of service" ]
Example:standby
-
haSockets: integer
Example:
2
-
haSwitchOvers: integer
Example:
2
-
haSyncState: array
haSyncState
-
healthScorePercent: integer
Minimum Value:
0
Maximum Value:100
Example:100
-
hostName: string
Example:
thewater-sd
-
role: string
Allowed Values:
[ "active", "standby", "out of service" ]
Example:active
-
switchOverLogs: array
switchOverLogs
-
systemState: string
Allowed Values:
[ "online", "offline" ]
Example:online
-
upTime: integer
Example:
861830
Nested Schema : links
Type:
object
Nested Schema : messages
Type:
object
Nested Schema : component
Type:
Show Source
object
-
name: string
Example:
tCCD
-
state: string
Allowed Values:
[ "disabled", "enabled", true, false ]
Example:disabled
Nested Schema : switchOver
Type:
Show Source
object
-
info: string
Example:
Active to RelinquishingActive, forced by command
-
newState: string
Allowed Values:
[ "Active", "RelinquishingActive" ]
Example:RelinquishingActive
-
oldState: string
Allowed Values:
[ "Active", "RelinquishingActive" ]
Example:Active
-
time: string
Example:
2018-09-05T08:41:55.0-0400
400 Response
The request is malformed in some way or is missing required information and therefore cannot be processed.
Nested Schema : data
Type:
object
Nested Schema : items
Type:
Show Source
object
-
link: string
If available, a message with possible valid API URL(s) for the client to invokeExample:
Available URL(s) message string
401 Response
Unauthorized - Request lacks valid authentication credentials.
Nested Schema : data
Type:
object
Nested Schema : items
Type:
Show Source
object
-
link: string
If available, a message with possible valid API URL(s) for the client to invokeExample:
Available URL(s) message string
404 Response
Resource not found
Nested Schema : data
Type:
object
Nested Schema : items
Type:
Show Source
object
-
link: string
If available, a message with possible valid API URL(s) for the client to invokeExample:
Available URL(s) message string
Examples
Examples of Accessing the API
See Authenticate for how to acquire a token.
The following example shows how to get system status information using curl.
curl -X GET \
--header "Accept: application/xml" \
--header "Authorization: Bearer $TOKEN" \
"https://${SBCIP}/rest/v1.2/system/status"
The following example shows how to get system status information using Python.
import requests
headers = { "Accept":"application/xml", "Authorization":"Bearer " + token }
url = "https://" + sbcip + "/rest/v1.2/system/status"
resp = requests.get(url, headers=headers)
Example of the Response Body
The following example shows the contents of the response body in XML.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response>
<data>
<uptimeSeconds>146091</uptimeSeconds>
<hostName>PRIMARY</hostName>
<systemState>online</systemState>
<role>standalone</role>
<healthScorePercent>100</healthScorePercent>
</data>
<messages/>
<links/>
</response>