Reliable Services


Query Management Node (QueryManagementNode)

API Request

URLs
GET zstack/v1/management-nodes GET zstack/v1/management-nodes/{uuid}
Headers
Authorization: OAuth the-session-uuid
Curl Example
curl -H "Content-Type: application/json;charset=UTF-8" \ -H "Authorization: OAuth f5db0d0f90104a79b02c8f1c34dfc13b" \ -X GET http://localhost:8080/zstack/v1/management-nodes?q=uuid=2c0761c3720f4d2c93435f1b8edb1297
curl -H "Content-Type: application/json;charset=UTF-8" \ -H "Authorization: OAuth 5ffa91907f3c4d0392d7daa73b1a0627" \ -X GET http://localhost:8080/zstack/v1/management-nodes/bc27558979364d7c9b34a7317965e0be

Queryable Fields

Run the CLI command-line tool, type QueryManagementNode and press the Tab key to view all queryable fields and cross-table queryable resource names.

API Response

Response Example
{   "inventories": [     {       "uuid": "188b2c6376c34d3687c5a7a19685ffa6",       "hostName": "127.0.0.1",       "joinDate": "May 11, 2017 1:22:44 PM",       "heartBeat": "May 11, 2017 1:22:44 PM"     }   ] }
Name Type Description Starting Version
error ErrorCode The error code. If not null, the operation has failed. This field is null when the operation succeeds. For details, see error 0.6
inventories List For details, see inventories 0.6
#error
Name Type Description Starting Version
code String The error code number. A globally unique identifier for the error, for example, SYS.1000, HOST.1001. 0.6
description String A brief description of the error. 0.6
details String The detailed error information. 0.6
elaboration String A reserved field. Default is null. 0.6
opaque LinkedHashMap A reserved field. Default is null. 0.6
cause ErrorCode The root error. The source error that caused the current error. If there is no root error, this field is null. 0.6
#inventories
Name Type Description Starting Version
uuid String The UUID of the resource. Uniquely identifies the resource. 0.6
hostName String The host name 0.6
joinDate Timestamp The join time 0.6
heartBeat Timestamp The heartbeat time 0.6

SDK Examples

Java SDK
ueryManagementNodeAction action = new QueryManagementNodeAction(); action.conditions = asList("uuid=7c2075262bb44872b6ceaef5ee94b089"); action.sessionId = "293267e661d8400ca3808ff5f445a6e8"; QueryManagementNodeAction.Result res = action.call();
Python SDK
QueryManagementNodeAction action = QueryManagementNodeAction() action.conditions = ["uuid=3bcbd030e10746eeba9f8ea938f2647a"] action.sessionId = "21526cb97ac541b6b27192b4c671ec08" QueryManagementNodeAction.Result res = action.call()

Get Current Version (GetVersion)

API Request

URLs
PUT zstack/v1/management-nodes/actions
Body
{   "getVersion": {},   "systemTags": [],   "userTags": [] }
Note: In the above example, the systemTags and userTags fields can be omitted. They are listed to indicate that these two fields can be included in the body.
Curl Example
curl -H "Content-Type: application/json;charset=UTF-8" \ -X PUT -d '{"getVersion":{}}' http://localhost:8080/zstack/v1/management-nodes/actions
Parameter List
Name Type Location Description Allowed Values Starting Version
systemTags (Optional) List body System tags 0.6
userTags (Optional) List body User tags 0.6

API Response

Response Example
{   "version": "1.9.x" }
Name Type Description Starting Version
version String The current version of the Management Node 0.6
success boolean The success flag 0.6
error ErrorCode The error code. If not null, the operation has failed. This field is null when the operation succeeds. For details, see error 0.6
#error
Name Type Description Starting Version
code String The error code number. A globally unique identifier for the error, for example, SYS.1000, HOST.1001. 0.6
description String A brief description of the error. 0.6
details String The detailed error information. 0.6
elaboration String A reserved field. Default is null. 0.6
opaque LinkedHashMap A reserved field. Default is null. 0.6
cause ErrorCode The root error. The source error that caused the current error. If there is no root error, this field is null. 0.6

SDK Examples

Java SDK
GetVersionAction action = new GetVersionAction(); GetVersionAction.Result res = action.call();
Python SDK
GetVersionAction action = GetVersionAction() GetVersionAction.Result res = action.call()

Get Current Time (GetCurrentTime)

API Request

URLs
PUT zstack/v1/management-nodes/actions
Body
{   "getCurrentTime": {},   "systemTags": [],   "userTags": [] }
Note: In the above example, the systemTags and userTags fields can be omitted. They are listed to indicate that these two fields can be included in the body.
Curl Example
curl -H "Content-Type: application/json;charset=UTF-8" \ -X PUT -d '{"getCurrentTime":{}}' http://localhost:8080/zstack/v1/management-nodes/actions
Parameter List
Name Type Location Description Allowed Values Starting Version
systemTags (Optional) List body System tags 0.6
userTags (Optional) List body User tags 0.6

API Response

Response Example
{   "currentTime": {     "MillionSeconds": 1.494480176967E12,     "Seconds": 1.494480176E9   } }
Name Type Description Starting Version
currentTime Map The current time of the Management Node 0.6
success boolean The success flag 0.6
error ErrorCode The error code. If not null, the operation has failed. This field is null when the operation succeeds. For details, see error 0.6
#error
Name Type Description Starting Version
code String The error code number. A globally unique identifier for the error, for example, SYS.1000, HOST.1001. 0.6
description String A brief description of the error. 0.6
details String The detailed error information. 0.6
elaboration String A reserved field. Default is null. 0.6
opaque LinkedHashMap A reserved field. Default is null. 0.6
cause ErrorCode The root error. The source error that caused the current error. If there is no root error, this field is null. 0.6

SDK Examples

Java SDK
GetCurrentTimeAction action = new GetCurrentTimeAction(); GetCurrentTimeAction.Result res = action.call();
Python SDK
GetCurrentTimeAction action = GetCurrentTimeAction() GetCurrentTimeAction.Result res = action.call()











Archives

Download Document Archives

Download

Already filled the basic info?Click here.

Enter at least 2 characters.
Cannot be empty.
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.