CheckNetworkReachable

API Request

URLs
GET zstack/v1/zops/check/network
Headers
Authorization: OAuth the-session-uuid
Curl Sample
curl -H "Content-Type: application/json;charset=UTF-8"  -H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c"  -X GET http://localhost:8080/zstack/v1/zops/check/network?sourceHostnames=172.0.0.1&targetHostnames=test1.com&targetHostnames=test2.com
Request Parameters
Name Type Location Description Optional Value Starting Version
sourceHostnames List query Optional. Specified set of source ip addresses or domain names. 4.7.21
targetHostnames List query Specified set of target ip addresses or domain names. 4.7.21
systemTags List query Optional. The system tags. 4.7.21
userTags List query Optional. The user tags. 4.7.21

API Response

Response Sample
{   "results": [     {       "sourceHostname": "172.0.0.1",       "targetHostname": "test2.com",       "status": "Disconnected"     },     {}   ] }
Name Type Description Starting Version
success boolean 4.7.21
error ErrorCode The error code. If not null, the operation fails, or vice versa. For more information, see error. 4.7.21
results List See results. 4.7.21
#results
Name Type Description Starting Version
sourceHostname String The source address. 4.7.21
targetHostname String The target address. 4.7.21
status HostConnectedStatus See status. 4.7.21
#status
Name Type Description Starting Version
Connected HostConnectedStatus The networke is connected. 4.7.21
Disconnected HostConnectedStatus The networke is disconnected. 4.7.21
Unknown HostConnectedStatus The network status is unknown. 4.7.21
#error
Name Type Description Starting Version
code String The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001. 4.7.21
description String The brief description of the error. 4.7.21
details String The details about the error. 4.7.21
elaboration String The reserved field. Default value: null. 4.7.21
opaque LinkedHashMap The reserved field. Default value: null. 4.7.21
cause ErrorCode The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. 4.7.21

SDK Sample

Java SDK
CheckNetworkReachableAction action = new CheckNetworkReachableAction(); action.sourceHostnames = asList("172.0.0.1"); action.targetHostnames = asList("test1.com","test2.com"); action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"; CheckNetworkReachableAction.Result res = action.call();
Python SDK
CheckNetworkReachableAction action = CheckNetworkReachableAction() action.sourceHostnames = [172.0.0.1] action.targetHostnames = [test1.com, test2.com] action.sessionId = "b86c9016b4f24953a9edefb53ca0678c" CheckNetworkReachableAction.Result res = action.call()

SyncChronyServers

API Request

URLs
PUT zstack/v1/zops/chrony/actions
Headers
Authorization: OAuth the-session-uuid
Body
{   "syncChronyServers": {},   "systemTags": [],   "userTags": [] }
Note: In the preceding sample, both systemTags and userTags are optional. These two fields can be included in the body structure.
Curl Sample
curl -H "Content-Type: application/json;charset=UTF-8"  -H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c"  -X PUT -d '{"syncChronyServers":{}}'  http://localhost:8080/zstack/v1/zops/chrony/actions
Request Parameters
Name Type Location Description Optional Value Starting Version
systemTags List body Optional. The system tags. 4.7.21
userTags List body Optional. The user tags. 4.7.21

API Response

When the API succeeded, an empty JSON structure {} is returned. When the API failed, the returned JSON structure includes an error field. For example,
{ 	"error": { 		"code": "SYS.1001", 		"description": "A message or a operation timeout", 		"details": "Create VM on KVM timeout after 300s" 	} }

SDK Sample

Java SDK
SyncChronyServersAction action = new SyncChronyServersAction(); action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"; SyncChronyServersAction.Result res = action.call();
Python SDK
SyncChronyServersAction action = SyncChronyServersAction() action.sessionId = "b86c9016b4f24953a9edefb53ca0678c" SyncChronyServersAction.Result res = action.call()

UpdateChronyServers

API Request

URLs
PUT zstack/v1/zops/chrony/actions
Headers
Authorization: OAuth the-session-uuid
Body
{   "updateChronyServers": {     "internalHostnames": [       "172.0.0.1",       "172.0.0.2"     ],     "externalHostnames": [       "test1.ntp.com"     ]   },   "systemTags": [],   "userTags": [] }
Note: In the preceding sample, both systemTags and userTags are optional. These two fields can be included in the body structure.
Curl Sample
curl -H "Content-Type: application/json;charset=UTF-8"  -H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c"  -X PUT -d '{"updateChronyServers":{"internalHostnames":["172.0.0.1","172.0.0.2"],"externalHostnames":["test1.ntp.com"]}}'  http://localhost:8080/zstack/v1/zops/chrony/actions
Request Parameters
Name Type Location Description Optional Value Starting Version
internalHostnames List body (contained in the updateChronyServers structure) Optional. Collection of internal chrony servers. 4.7.21
externalHostnames List body (contained in the updateChronyServers structure) Optional. Collection of external chrony servers. 4.7.21
systemTags List body Optional. The system tags. 4.7.21
userTags List body Optional. The user tags. 4.7.21

API Response

When the API succeeded, an empty JSON structure {} is returned. When the API failed, the returned JSON structure includes an error field. For example,
{ 	"error": { 		"code": "SYS.1001", 		"description": "A message or a operation timeout", 		"details": "Create VM on KVM timeout after 300s" 	} }

SDK Sample

Java SDK
UpdateChronyServersAction action = new UpdateChronyServersAction(); action.internalHostnames = asList("172.0.0.1","172.0.0.2"); action.externalHostnames = asList("test1.ntp.com"); action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"; UpdateChronyServersAction.Result res = action.call();
Python SDK
UpdateChronyServersAction action = UpdateChronyServersAction() action.internalHostnames = [172.0.0.1, 172.0.0.2] action.externalHostnames = [test1.ntp.com] action.sessionId = "b86c9016b4f24953a9edefb53ca0678c" UpdateChronyServersAction.Result res = action.call()

Archives

Download Document Archives

Back to Top

Download

Already filled the basic info?Click here.

Enter at least 2 characters.
Invalid mobile number.
Enter at least 4 characters.
Invalid email address.
Wrong code. Try again. Send Code Resend Code (60s)

An email with a verification code will be sent to you. Make sure the address you provided is valid and correct.

同意 不同意

I have read and concur with the Site TermsPrivacy PolicyRules and Conventions on User Management of ZStack Cloud

Download

Not filled the basic info yet? Click here.

Invalid email address or mobile number.
同意 不同意

I have read and concur with the Site TermsPrivacy PolicyRules and Conventions on User Management of ZStack Cloud

Email Us

contact@zstack.io
ZStack Training and Certification
Enter at least 2 characters.
Invalid mobile number.
Enter at least 4 characters.
Invalid email address.
Wrong code. Try again. Send Code Resend Code (60s)

同意 不同意

I have read and concur with the Site TermsPrivacy PolicyRules and Conventions on User Management of ZStack Cloud

Email Us

contact@zstack.io
Request Trial
Enter at least 2 characters.
Invalid mobile number.
Enter at least 4 characters.
Invalid email address.
Wrong code. Try again. Send Code Resend Code (60s)

同意 不同意

I have read and concur with the Site TermsPrivacy PolicyRules and Conventions on User Management of ZStack Cloud

Email Us

contact@zstack.io

The download link is sent to your email address.

If you don't see it, check your spam folder, subscription folder, or AD folder. After receiving the email, click the URL to download the documentation.

The download link is sent to your email address.

If you don't see it, check your spam folder, subscription folder, or AD folder.
Or click on the URL below. (For Internet Explorer, right-click the URL and save it.)

Thank you for using ZStack products and services.

Submit successfully.

We'll connect soon.

Thank you for using ZStack products and services.