Get Current Chrony Time Source Servers

GET/zstack/v1/zops/chrony/servers

Headers

Authorization: OAuth the-session-uuid

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/zops/chrony/servers

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
systemTags (Optional)ListquerySystem tags 4.7.21
userTags (Optional)ListqueryUser tags 4.7.21

API Response

Response Example

{
  "servers": [
    {
      "internal": {
        "hostname": "172.0.0.1",
        "status": "Connected"
      },
      "external": {
        "hostname": "ntp.test.com",
        "status": "Connected"
      }
    }
  ]
}
NameTypeDescriptionStarting Version
successboolean 4.7.21
serversListSee servers for details4.7.21
errorErrorCodeThe error code. If not null, the operation failed. This field is null when the operation succeeds. See error for details4.7.21

servers

NameTypeDescriptionStarting Version
internalChronyServerInfoSee internal for details4.7.21
externalChronyServerInfoSee external for details4.7.21

internal

NameTypeDescriptionStarting Version
hostnameStringAddress4.7.21
statusHostConnectedStatusSee status for details4.7.21

status

NameTypeDescriptionStarting Version
ConnectedHostConnectedStatusNetwork reachable4.7.21
DisconnectedHostConnectedStatusNetwork unreachable4.7.21
UnknownHostConnectedStatusNetwork connection status unknown4.7.21

external

NameTypeDescriptionStarting Version
hostnameStringAddress4.7.21
statusHostConnectedStatusSee status for details4.7.21

status

NameTypeDescriptionStarting Version
ConnectedHostConnectedStatusNetwork reachable4.7.21
DisconnectedHostConnectedStatusNetwork unreachable4.7.21
UnknownHostConnectedStatusNetwork connection status unknown4.7.21

error

NameTypeDescriptionStarting Version
codeStringThe error code number. A globally unique identifier for the error, for example, SYS.1000, HOST.10010.6
descriptionStringA brief description of the error0.6
detailsStringThe detailed error information0.6
elaborationStringReserved field. Default is null0.6
opaqueLinkedHashMapReserved field. Default is null0.6
causeErrorCodeThe root error that caused the current error. If no root error exists, this field is null0.6

SDK Examples

Java SDK

GetChronyServersAction action = new GetChronyServersAction();
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetChronyServersAction.Result res = action.call();

Python SDK

GetChronyServersAction action = GetChronyServersAction()
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
GetChronyServersAction.Result res = action.call()