Observability Server Operations
CreateObservabilityServer
API Request
URLs
POST zstack/v1/observability-serversHeaders
Authorization: OAuth the-session-uuidBody
Note: In
the preceding sample, both systemTags and userTags are optional.
These two fields can be included in the body structure.
{
"params": {
"name": "obs-1",
"observabilityServerOfferingUuid": "83475c2834f83dd59ccf8741787d800e",
"description": "desc",
"zoneUuid": "0f33fd3eee6a3b61abce2de06cb1dc24",
"clusterUuid": "8a47ef8b40e33be8880d24f496cceaf6",
"hostUuid": "b009ff2ecfe334e5b9dae2501af8c612",
"primaryStorageUuidForRootVolume": "137d4d95aded3f09a133fb9fd6197349"
},
"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 POST -d '{"params":{"name":"obs-1","observabilityServerOfferingUuid":"83475c2834f83dd59ccf8741787d800e","description":"desc","zoneUuid":"0f33fd3eee6a3b61abce2de06cb1dc24","clusterUuid":"8a47ef8b40e33be8880d24f496cceaf6","hostUuid":"b009ff2ecfe334e5b9dae2501af8c612","primaryStorageUuidForRootVolume":"137d4d95aded3f09a133fb9fd6197349"}}' \
http://localhost:8080/zstack/v1/observability-serversRequest Parameters
| Name | Type | Location | Description | Valid Values | Starting Version |
|---|---|---|---|---|---|
| name | String | body (contained in the params structure) | The resource name. | 5.3.28 | |
| observabilityServerOfferingUuid | String | body (contained in the params structure) | 5.3.28 | ||
| description | String | body (contained in the params structure) | Optional. The resource description. | 5.3.28 | |
| zoneUuid | String | body (contained in the params structure) | Optional. The zone UUID. | 5.3.28 | |
| clusterUuid | String | body (contained in the params structure) | Optional. The cluster UUID. | 5.3.28 | |
| hostUuid | String | body (contained in the params structure) | Optional. The host UUID. | 5.3.28 | |
| primaryStorageUuidForRootVolume | String | body (contained in the params structure) | Optional. | 5.3.28 | |
| rootVolumeSystemTags | List | body (contained in the params structure) | Optional. | 5.3.28 | |
| resourceUuid | String | body (contained in the params structure) | Optional. The resource UUID. | 5.3.28 | |
| tagUuids | List | body (contained in the params structure) | Optional. The tag UUID list. | 5.3.28 | |
| systemTags | List | body | Optional. The system tag. | 5.3.28 | |
| userTags | List | body | Optional. The user tag. | 5.3.28 |
API Response
Sample Response{
"inventory": {}
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| success | boolean | 5.3.28 | |
| error | ErrorCode | The error code. If not null, the operation fails, or vice versa. For more information, see error | 5.3.28 |
| inventory | VmInstanceInventory | See inventory | 5.3.28 |
#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. | 5.3.28 |
| description | String | The brief description of the error. | 5.3.28 |
| details | String | The details about the error. | 5.3.28 |
| elaboration | String | The reserved field. Default value: null. | 5.3.28 |
| opaque | LinkedHashMap | The reserved field. Default value: null. | 5.3.28 |
| cause | ErrorCode | The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. | 5.3.28 |
#inventory
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | The resource UUID. | 5.3.28 |
| name | String | The resource name. | 5.3.28 |
| description | String | The resource description. | 5.3.28 |
| zoneUuid | String | The zone UUID. | 5.3.28 |
| clusterUuid | String | The cluster UUID. | 5.3.28 |
| imageUuid | String | The image UUID. | 5.3.28 |
| hostUuid | String | The host UUID. | 5.3.28 |
| lastHostUuid | String | 5.3.28 | |
| instanceOfferingUuid | String | The instance offering UUID. | 5.3.28 |
| rootVolumeUuid | String | The root volume UUID. | 5.3.28 |
| platform | String | 5.3.28 | |
| architecture | String | 5.3.28 | |
| defaultL3NetworkUuid | String | 5.3.28 | |
| type | String | 5.3.28 | |
| hypervisorType | String | 5.3.28 | |
| memorySize | Long | 5.3.28 | |
| reservedMemorySize | Long | 5.3.28 | |
| cpuNum | Integer | 5.3.28 | |
| cpuSpeed | Long | 5.3.28 | |
| allocatorStrategy | String | 5.3.28 | |
| createDate | Timestamp | The creation time. | 5.3.28 |
| lastOpDate | Timestamp | The last operation time. | 5.3.28 |
| state | String | 5.3.28 | |
| guestOsType | String | 5.3.28 | |
| vmNics | List | See vmNics | 5.3.28 |
| allVolumes | List | See allVolumes | 5.3.28 |
| vmCdRoms | List | See vmCdRoms | 5.3.28 |
#vmNics
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | The resource UUID. | 5.3.28 |
| vmInstanceUuid | String | The VM UUID. | 5.3.28 |
| l3NetworkUuid | String | The L3 network UUID. | 5.3.28 |
| ip | String | 5.3.28 | |
| mac | String | 5.3.28 | |
| hypervisorType | String | 5.3.28 | |
| netmask | String | 5.3.28 | |
| gateway | String | 5.3.28 | |
| metaData | String | 5.3.28 | |
| ipVersion | Integer | 5.3.28 | |
| driverType | String | 5.3.28 | |
| internalName | String | 5.3.28 | |
| deviceId | Integer | 5.3.28 | |
| type | String | 5.3.28 | |
| state | String | 5.3.28 | |
| createDate | Timestamp | The creation time. | 5.3.28 |
| lastOpDate | Timestamp | The last operation time. | 5.3.28 |
| usedIps | List | See usedIps | 5.3.28 |
#usedIps
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | The resource UUID. | 5.3.28 |
| ipRangeUuid | String | The IP range UUID. | 5.3.28 |
| l3NetworkUuid | String | The L3 network UUID. | 5.3.28 |
| ipVersion | Integer | 5.3.28 | |
| ip | String | 5.3.28 | |
| netmask | String | 5.3.28 | |
| gateway | String | 5.3.28 | |
| usedFor | String | 5.3.28 | |
| ipInLong | long | 5.3.28 | |
| ipInBinary | byte[] | 5.3.28 | |
| vmNicUuid | String | The VM NIC UUID. | 5.3.28 |
| createDate | Timestamp | The creation time. | 5.3.28 |
| lastOpDate | Timestamp | The last operation time. | 5.3.28 |
#allVolumes
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | The resource UUID. | 5.3.28 |
| name | String | The resource name. | 5.3.28 |
| description | String | The resource description. | 5.3.28 |
| primaryStorageUuid | String | The primary storage UUID. | 5.3.28 |
| vmInstanceUuid | String | The VM UUID. | 5.3.28 |
| diskOfferingUuid | String | The disk offering UUID. | 5.3.28 |
| rootImageUuid | String | 5.3.28 | |
| installPath | String | 5.3.28 | |
| type | String | 5.3.28 | |
| format | String | 5.3.28 | |
| size | Long | 5.3.28 | |
| actualSize | Long | 5.3.28 | |
| deviceId | Integer | 5.3.28 | |
| state | String | 5.3.28 | |
| status | String | 5.3.28 | |
| createDate | Timestamp | The creation time. | 5.3.28 |
| lastOpDate | Timestamp | The last operation time. | 5.3.28 |
| isShareable | Boolean | 5.3.28 | |
| volumeQos | String | 5.3.28 | |
| lastDetachDate | Timestamp | 5.3.28 | |
| lastVmInstanceUuid | String | 5.3.28 | |
| lastAttachDate | Timestamp | 5.3.28 | |
| protocol | String | 5.3.28 |
#vmCdRoms
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | The resource UUID. | 5.3.28 |
| vmInstanceUuid | String | The VM UUID. | 5.3.28 |
| deviceId | Integer | 5.3.28 | |
| isoUuid | String | 5.3.28 | |
| isoInstallPath | String | 5.3.28 | |
| name | String | The resource name. | 5.3.28 |
| description | String | The resource description. | 5.3.28 |
| protocol | String | 5.3.28 | |
| createDate | Timestamp | The creation time. | 5.3.28 |
| lastOpDate | Timestamp | The last operation time. | 5.3.28 |
SDK
Java
SDK
CreateObservabilityServerAction action = new CreateObservabilityServerAction();
action.name = "obs-1";
action.observabilityServerOfferingUuid = "83475c2834f83dd59ccf8741787d800e";
action.description = "desc";
action.zoneUuid = "0f33fd3eee6a3b61abce2de06cb1dc24";
action.clusterUuid = "8a47ef8b40e33be8880d24f496cceaf6";
action.hostUuid = "b009ff2ecfe334e5b9dae2501af8c612";
action.primaryStorageUuidForRootVolume = "137d4d95aded3f09a133fb9fd6197349";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
CreateObservabilityServerAction.Result res = action.call();Python
SDK
CreateObservabilityServerAction action = CreateObservabilityServerAction()
action.name = "obs-1"
action.observabilityServerOfferingUuid = "83475c2834f83dd59ccf8741787d800e"
action.description = "desc"
action.zoneUuid = "0f33fd3eee6a3b61abce2de06cb1dc24"
action.clusterUuid = "8a47ef8b40e33be8880d24f496cceaf6"
action.hostUuid = "b009ff2ecfe334e5b9dae2501af8c612"
action.primaryStorageUuidForRootVolume = "137d4d95aded3f09a133fb9fd6197349"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
CreateObservabilityServerAction.Result res = action.call()AttachServiceToObservabilityServer
API Request
URLs
POST zstack/v1/observability-server/{observabilityServerUuid}/serviceHeaders
Authorization: OAuth the-session-uuidBody
Note: In
the preceding sample, both systemTags and userTags are optional.
These two fields can be included in the body structure.
{
"params": {
"serviceType": "loadBalancer",
"serviceUuid": "50b12612d2b4318193c2e040d98e8f7b"
},
"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 POST -d '{"params":{"serviceType":"loadBalancer","serviceUuid":"50b12612d2b4318193c2e040d98e8f7b"}}' \
http://localhost:8080/zstack/v1/observability-server/3e38d4c1adb73203b35120914b12ec61/serviceRequest Parameters
| Name | Type | Location | Description | Valid Values | Starting Version |
|---|---|---|---|---|---|
| observabilityServerUuid | String | body (contained in the params structure) | 5.3.28 | ||
| serviceType | String | body (contained in the params structure) |
|
5.3.28 | |
| serviceUuid | String | body (contained in the params structure) | 5.3.28 | ||
| systemTags | List | body | Optional. The system UUID. | 5.3.28 | |
| userTags | List | body | Optional. The user UUID. | 5.3.28 |
API Response
Sample Response
{
"inventory": {}
}#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. | 5.3.28 |
| description | String | The brief description of the error. | 5.3.28 |
| details | String | The details about the error. | 5.3.28 |
| elaboration | String | The reserved field. Default value: null. | 5.3.28 |
| opaque | LinkedHashMap | The reserved field. Default value: null. | 5.3.28 |
| cause | ErrorCode | The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. | 5.3.28 |
#inventory
| Name | Type | Description | Starting Version |
|---|---|---|---|
| publicNetworkUuid | String | 5.3.28 | |
| applianceVmType | String | 5.3.28 | |
| managementNetworkUuid | String | 5.3.28 | |
| defaultRouteL3NetworkUuid | String | 5.3.28 | |
| status | String | 5.3.28 | |
| agentPort | Integer | 5.3.28 | |
| haStatus | String | 5.3.28 | |
| uuid | String | The resource UUID. | 5.3.28 |
| name | String | The resource name. | 5.3.28 |
| description | String | The resource description. | 5.3.28 |
| zoneUuid | String | The zone UUID. | 5.3.28 |
| clusterUuid | String | The cluster UUID. | 5.3.28 |
| imageUuid | String | The image UUID. | 5.3.28 |
| hostUuid | String | The host UUID. | 5.3.28 |
| lastHostUuid | String | 5.3.28 | |
| instanceOfferingUuid | String | The instance offering UUID. | 5.3.28 |
| rootVolumeUuid | String | The root volume UUID. | 5.3.28 |
| platform | String | 5.3.28 | |
| architecture | String | 5.3.28 | |
| defaultL3NetworkUuid | String | 5.3.28 | |
| type | String | 5.3.28 | |
| hypervisorType | String | 5.3.28 | |
| memorySize | Long | 5.3.28 | |
| reservedMemorySize | Long | 5.3.28 | |
| cpuNum | Integer | 5.3.28 | |
| cpuSpeed | Long | 5.3.28 | |
| allocatorStrategy | String | 5.3.28 | |
| createDate | Timestamp | The creation time. | 5.3.28 |
| lastOpDate | Timestamp | The last operation time. | 5.3.28 |
| state | String | 5.3.28 | |
| guestOsType | String | 5.3.28 | |
| vmNics | List | See vmNics | 5.3.28 |
| allVolumes | List | See allVolumes | 5.3.28 |
| vmCdRoms | List | See vmCdRoms | 5.3.28 |
#vmNics
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | The resource UUID. | 5.3.28 |
| vmInstanceUuid | String | The VM UUID. | 5.3.28 |
| l3NetworkUuid | String | The L3 network UUID. | 5.3.28 |
| ip | String | 5.3.28 | |
| mac | String | 5.3.28 | |
| hypervisorType | String | 5.3.28 | |
| netmask | String | 5.3.28 | |
| gateway | String | 5.3.28 | |
| metaData | String | 5.3.28 | |
| ipVersion | Integer | 5.3.28 | |
| driverType | String | 5.3.28 | |
| internalName | String | 5.3.28 | |
| deviceId | Integer | 5.3.28 | |
| type | String | 5.3.28 | |
| state | String | 5.3.28 | |
| createDate | Timestamp | The creation time. | 5.3.28 |
| lastOpDate | Timestamp | The last operation time. | 5.3.28 |
| usedIps | List | See usedIps | 5.3.28 |
#usedIps
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | The resource UUID. | 5.3.28 |
| ipRangeUuid | String | The IP range UUID. | 5.3.28 |
| l3NetworkUuid | String | The L3 network UUID. | 5.3.28 |
| ipVersion | Integer | 5.3.28 | |
| ip | String | 5.3.28 | |
| netmask | String | 5.3.28 | |
| gateway | String | 5.3.28 | |
| usedFor | String | 5.3.28 | |
| ipInLong | long | 5.3.28 | |
| ipInBinary | byte[] | 5.3.28 | |
| vmNicUuid | String | The VM NIC UUID. | 5.3.28 |
| createDate | Timestamp | The creation time. | 5.3.28 |
| lastOpDate | Timestamp | The last operation time. | 5.3.28 |
#allVolumes
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | The resource UUID. | 5.3.28 |
| name | String | The resource name. | 5.3.28 |
| description | String | The resource description. | 5.3.28 |
| primaryStorageUuid | String | The primary storage UUID. | 5.3.28 |
| vmInstanceUuid | String | The VM UUID. | 5.3.28 |
| diskOfferingUuid | String | The disk offering UUID. | 5.3.28 |
| rootImageUuid | String | 5.3.28 | |
| installPath | String | 5.3.28 | |
| type | String | 5.3.28 | |
| format | String | 5.3.28 | |
| size | Long | 5.3.28 | |
| actualSize | Long | 5.3.28 | |
| deviceId | Integer | 5.3.28 | |
| state | String | 5.3.28 | |
| status | String | 5.3.28 | |
| createDate | Timestamp | The creation time. | 5.3.28 |
| lastOpDate | Timestamp | The last operation time. | 5.3.28 |
| isShareable | Boolean | 5.3.28 | |
| volumeQos | String | 5.3.28 | |
| lastDetachDate | Timestamp | 5.3.28 | |
| lastVmInstanceUuid | String | 5.3.28 | |
| lastAttachDate | Timestamp | 5.3.28 | |
| protocol | String | 5.3.28 |
#vmCdRoms
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | The resource UUID. | 5.3.28 |
| vmInstanceUuid | String | The VM UUID. | 5.3.28 |
| deviceId | Integer | 5.3.28 | |
| isoUuid | String | 5.3.28 | |
| isoInstallPath | String | 5.3.28 | |
| name | String | The resource name. | 5.3.28 |
| description | String | The resource description. | 5.3.28 |
| protocol | String | 5.3.28 | |
| createDate | Timestamp | The creation time. | 5.3.28 |
| lastOpDate | Timestamp | The last operation ti,me. | 5.3.28 |
SDK
Java
SDK
AttachServiceToObservabilityServerAction action = new AttachServiceToObservabilityServerAction();
action.observabilityServerUuid = "3e38d4c1adb73203b35120914b12ec61";
action.serviceType = "loadBalancer";
action.serviceUuid = "50b12612d2b4318193c2e040d98e8f7b";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
AttachServiceToObservabilityServerAction.Result res = action.call();Python
SDK
AttachServiceToObservabilityServerAction action = AttachServiceToObservabilityServerAction()
action.observabilityServerUuid = "3e38d4c1adb73203b35120914b12ec61"
action.serviceType = "loadBalancer"
action.serviceUuid = "50b12612d2b4318193c2e040d98e8f7b"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
AttachServiceToObservabilityServerAction.Result res = action.call()DetachServiceFromObservabilityServer
API Request
URLs
DELETE zstack/v1/observability-server/{observabilityServerUuid}/serviceHeaders
Authorization: OAuth the-session-uuidCurl
Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X DELETE http://localhost:8080/zstack/v1/observability-server/eb4f0a1b78c139d9b291acc85ada69d0/serviceRequest Parameters
| Name | Type | Location | Description | Valid Values | Starting Version |
|---|---|---|---|---|---|
| observabilityServerUuid | String | body | 5.3.28 | ||
| serviceType | String | body |
|
5.3.28 | |
| serviceUuid | String | body | 5.3.28 | ||
| systemTags | List | body | Optional. The system tags. | 5.3.28 | |
| userTags | List | body | Optional. The user tags. | 5.3.28 |
API Response
Sample
Response
{
"inventory": {
"uuid": "43db67751fbe3e7ca1302f06fb7264ae",
"name": "ExampleObservabilityServer",
"description": "This is an example observability server."
}
}#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. | 5.3.28 |
| description | String | The brief description of the error. | 5.3.28 |
| details | String | The details about the error. | 5.3.28 |
| elaboration | String | The reserved field. Default value: null. | 5.3.28 |
| opaque | LinkedHashMap | The reserved field. Default value: null. | 5.3.28 |
| cause | ErrorCode | The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. | 5.3.28 |
#inventory
| Name | Type | Description | Starting Version |
|---|---|---|---|
| publicNetworkUuid | String | 5.3.28 | |
| applianceVmType | String | 5.3.28 | |
| managementNetworkUuid | String | 5.3.28 | |
| defaultRouteL3NetworkUuid | String | 5.3.28 | |
| status | String | 5.3.28 | |
| agentPort | Integer | 5.3.28 | |
| haStatus | String | 5.3.28 | |
| uuid | String | The resource UUID. | 5.3.28 |
| name | String | The resource name. | 5.3.28 |
| description | String | The resource description. | 5.3.28 |
| zoneUuid | String | The zone UUID. | 5.3.28 |
| clusterUuid | String | The cluster UUID. | 5.3.28 |
| imageUuid | String | The image UUID. | 5.3.28 |
| hostUuid | String | The host UUID. | 5.3.28 |
| lastHostUuid | String | 5.3.28 | |
| instanceOfferingUuid | String | The instance offering UUID. | 5.3.28 |
| rootVolumeUuid | String | The root volume UUID. | 5.3.28 |
| platform | String | 5.3.28 | |
| architecture | String | 5.3.28 | |
| defaultL3NetworkUuid | String | 5.3.28 | |
| type | String | 5.3.28 | |
| hypervisorType | String | 5.3.28 | |
| memorySize | Long | 5.3.28 | |
| reservedMemorySize | Long | 5.3.28 | |
| cpuNum | Integer | 5.3.28 | |
| cpuSpeed | Long | 5.3.28 | |
| allocatorStrategy | String | 5.3.28 | |
| createDate | Timestamp | The creation time. | 5.3.28 |
| lastOpDate | Timestamp | The last operation time. | 5.3.28 |
| state | String | 5.3.28 | |
| guestOsType | String | 5.3.28 | |
| vmNics | List | See vmNics | 5.3.28 |
| allVolumes | List | See allVolumes | 5.3.28 |
| vmCdRoms | List | See vmCdRoms | 5.3.28 |
#vmNics
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | The resource UUID. | 5.3.28 |
| vmInstanceUuid | String | The VM UUID. | 5.3.28 |
| l3NetworkUuid | String | The L3 network UUID. | 5.3.28 |
| ip | String | 5.3.28 | |
| mac | String | 5.3.28 | |
| hypervisorType | String | 5.3.28 | |
| netmask | String | 5.3.28 | |
| gateway | String | 5.3.28 | |
| metaData | String | 5.3.28 | |
| ipVersion | Integer | 5.3.28 | |
| driverType | String | 5.3.28 | |
| internalName | String | 5.3.28 | |
| deviceId | Integer | 5.3.28 | |
| type | String | 5.3.28 | |
| state | String | 5.3.28 | |
| createDate | Timestamp | The creation time. | 5.3.28 |
| lastOpDate | Timestamp | The last operation time. | 5.3.28 |
| usedIps | List | See usedIps | 5.3.28 |
#usedIps
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | The resource UUID. | 5.3.28 |
| ipRangeUuid | String | The IP range UUID. | 5.3.28 |
| l3NetworkUuid | String | The L3 network UUID. | 5.3.28 |
| ipVersion | Integer | 5.3.28 | |
| ip | String | 5.3.28 | |
| netmask | String | 5.3.28 | |
| gateway | String | 5.3.28 | |
| usedFor | String | 5.3.28 | |
| ipInLong | long | 5.3.28 | |
| ipInBinary | byte[] | 5.3.28 | |
| vmNicUuid | String | The VM NIC UUID. | 5.3.28 |
| createDate | Timestamp | The creation time. | 5.3.28 |
| lastOpDate | Timestamp | The last operation time. | 5.3.28 |
#allVolumes
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | The resource UUID. | 5.3.28 |
| name | String | The resource name. | 5.3.28 |
| description | String | The resource description. | 5.3.28 |
| primaryStorageUuid | String | The primary storage UUID. | 5.3.28 |
| vmInstanceUuid | String | The volume UUID. | 5.3.28 |
| diskOfferingUuid | String | The disk offering UUID. | 5.3.28 |
| rootImageUuid | String | 5.3.28 | |
| installPath | String | 5.3.28 | |
| type | String | 5.3.28 | |
| format | String | 5.3.28 | |
| size | Long | 5.3.28 | |
| actualSize | Long | 5.3.28 | |
| deviceId | Integer | 5.3.28 | |
| state | String | 5.3.28 | |
| status | String | 5.3.28 | |
| createDate | Timestamp | The creation time. | 5.3.28 |
| lastOpDate | Timestamp | The last operation time. | 5.3.28 |
| isShareable | Boolean | 5.3.28 | |
| volumeQos | String | 5.3.28 | |
| lastDetachDate | Timestamp | 5.3.28 | |
| lastVmInstanceUuid | String | 5.3.28 | |
| lastAttachDate | Timestamp | 5.3.28 | |
| protocol | String | 5.3.28 |
#vmCdRoms
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | The resource UUID. | 5.3.28 |
| vmInstanceUuid | String | The VM UUID. | 5.3.28 |
| deviceId | Integer | 5.3.28 | |
| isoUuid | String | 5.3.28 | |
| isoInstallPath | String | 5.3.28 | |
| name | String | The resource name. | 5.3.28 |
| description | String | The resource description. | 5.3.28 |
| protocol | String | 5.3.28 | |
| createDate | Timestamp | The creation time. | 5.3.28 |
| lastOpDate | Timestamp | The last operation time. | 5.3.28 |
SDK
Java
SDK
DetachServiceFromObservabilityServerAction action = new DetachServiceFromObservabilityServerAction();
action.observabilityServerUuid = "eb4f0a1b78c139d9b291acc85ada69d0";
action.serviceType = "loadBalancer";
action.serviceUuid = "6dd5dbdc01a6339086958415859fbb60";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
DetachServiceFromObservabilityServerAction.Result res = action.call();Python
SDK
DetachServiceFromObservabilityServerAction action = DetachServiceFromObservabilityServerAction()
action.observabilityServerUuid = "eb4f0a1b78c139d9b291acc85ada69d0"
action.serviceType = "loadBalancer"
action.serviceUuid = "6dd5dbdc01a6339086958415859fbb60"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
DetachServiceFromObservabilityServerAction.Result res = action.call()CreateObservabilityServerOffering
API Request
URLs
POST zstack/v1/instance-offerings/observability-serversHeaders
Authorization: OAuth the-session-uuidBody
Note: In
the preceding sample, both systemTags and userTags are optional.
These two fields can be included in the body structure.
{
"params": {
"zoneUuid": "08c1ec2300e13fc2985d4b42e955f620",
"managementNetworkUuid": "5c046b968a0e3e33aa08abfe5427b083",
"imageUuid": "4948cd5ab5e234848bdcf933a45a826f",
"publicNetworkUuid": "296c48c1b7b43cd0b4094450f63b389d",
"isDefault": true,
"name": "ObservabilityServer-Offering",
"cpuNum": 2,
"memorySize": 1024,
"reservedMemorySize": 0,
"sortKey": 0,
"type": "ObservabilityServer"
},
"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 POST -d '{"params":{"zoneUuid":"08c1ec2300e13fc2985d4b42e955f620","managementNetworkUuid":"5c046b968a0e3e33aa08abfe5427b083","imageUuid":"4948cd5ab5e234848bdcf933a45a826f","publicNetworkUuid":"296c48c1b7b43cd0b4094450f63b389d","isDefault":true,"name":"ObservabilityServer-Offering","cpuNum":2,"memorySize":1024,"reservedMemorySize":0,"sortKey":0,"type":"ObservabilityServer"}}' \
http://localhost:8080/zstack/v1/instance-offerings/observability-serversRequest Parameters
| Name | Type | Location | Description | Valid Values | Starting Version |
|---|---|---|---|---|---|
| zoneUuid | String | body (contained in the params structure) | The zone UUID. | 5.3.28 | |
| managementNetworkUuid | String | body (contained in the params structure) | 5.3.28 | ||
| imageUuid | String | body (contained in the params structure) | The image UUID. | 5.3.28 | |
| publicNetworkUuid | String | body (contained in the params structure) | Optional. | 5.3.28 | |
| isDefault | Boolean | body (contained in the params structure) | Optional. | 5.3.28 | |
| name | String | body (contained in the params structure) | The resource name. | 5.3.28 | |
| description | String | body (contained in the params structure) | Optional. The resource description. | 5.3.28 | |
| cpuNum | int | body (contained in the params structure) | 5.3.28 | ||
| memorySize | long | body (contained in the params structure) | 5.3.28 | ||
| reservedMemorySize | long | body (contained in the params structure) | Optional. | 5.3.28 | |
| allocatorStrategy | String | body (contained in the params structure) | Optional. | 5.3.28 | |
| sortKey | int | body (contained in the params structure) | Optional. | 5.3.28 | |
| type | String | body (contained in the params structure) | Optional. | 5.3.28 | |
| resourceUuid | String | body (contained in the params structure) | Optional. The resource UUID. | 5.3.28 | |
| tagUuids | List | body (contained in the params structure) | Optional. The tag UUID list. | 5.3.28 | |
| systemTags | List | body | Optional. The system tag. | 5.3.28 | |
| userTags (可选) | List | body | Optional. The user tag. | 5.3.28 |
API Response
Sample
Response
{
"inventory": {
"uuid": "3b0af4671cc93f619ef326a3c99d825c",
"name": "instanceOffering1",
"cpuNum": 2,
"cpuSpeed": 1,
"type": "UserVm",
"allocatorStrategy": "Mevoco",
"createDate": "Nov 14, 2017 10:20:57 PM",
"lastOpDate": "Nov 14, 2017 10:20:57 PM",
"state": "Enabled"
}
}#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. | 5.3.28 |
| description | String | The brief description of the error. | 5.3.28 |
| details | String | The details about the error. | 5.3.28 |
| elaboration | String | The reserved field. Default value: null. | 5.3.28 |
| opaque | LinkedHashMap | The reserved field. Default value: null. | 5.3.28 |
| cause | ErrorCode | The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. | 5.3.28 |
#inventory
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | The resource UUID. | 5.3.28 |
| name | String | The resource name. | 5.3.28 |
| description | String | The resource description. | 5.3.28 |
| cpuNum | Integer | The CPU number. | 5.3.28 |
| cpuSpeed | Integer | The CPU speed. | 5.3.28 |
| memorySize | Long | The memory size. | 5.3.28 |
| type | String | The type. | 5.3.28 |
| allocatorStrategy | String | The allocation strategy. | 5.3.28 |
| sortKey | Integer | 5.3.28 | |
| createDate | Timestamp | The creation time. | 5.3.28 |
| lastOpDate | Timestamp | The last operation time. | 5.3.28 |
| state | String | The state (Enabled; Disabled). | 5.3.28 |
SDK
Java
SDK
CreateObservabilityServerOfferingAction action = new CreateObservabilityServerOfferingAction();
action.zoneUuid = "08c1ec2300e13fc2985d4b42e955f620";
action.managementNetworkUuid = "5c046b968a0e3e33aa08abfe5427b083";
action.imageUuid = "4948cd5ab5e234848bdcf933a45a826f";
action.publicNetworkUuid = "296c48c1b7b43cd0b4094450f63b389d";
action.isDefault = true;
action.name = "ObservabilityServer-Offering";
action.cpuNum = 2;
action.memorySize = 1024;
action.reservedMemorySize = 0;
action.sortKey = 0;
action.type = "ObservabilityServer";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
CreateObservabilityServerOfferingAction.Result res = action.call();Python
SDK
CreateObservabilityServerOfferingAction action = CreateObservabilityServerOfferingAction()
action.zoneUuid = "08c1ec2300e13fc2985d4b42e955f620"
action.managementNetworkUuid = "5c046b968a0e3e33aa08abfe5427b083"
action.imageUuid = "4948cd5ab5e234848bdcf933a45a826f"
action.publicNetworkUuid = "296c48c1b7b43cd0b4094450f63b389d"
action.isDefault = true
action.name = "ObservabilityServer-Offering"
action.cpuNum = 2
action.memorySize = 1024
action.reservedMemorySize = 0
action.sortKey = 0
action.type = "ObservabilityServer"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
CreateObservabilityServerOfferingAction.Result res = action.call()GetObservabilityServerServiceData
API Request
URLs
POST zstack/v1/observability-server/{observabilityServerUuid}/service-dataHeaders
Authorization: OAuth the-session-uuidBody
Note: In
the preceding sample, both systemTags and userTags are optional.
These two fields can be included in the body structure.
{
"params": {
"serviceType": "loadBalancer",
"serviceUuid": "11836e85c4d7391a8d8c54248fd89815",
"limit": 10,
"startTime": "2024-12-01 17:00:00",
"endTime": "2024-12-01 18:00:00",
"sortDirection": "asc"
},
"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 POST -d '{"params":{"serviceType":"loadBalancer","serviceUuid":"11836e85c4d7391a8d8c54248fd89815","limit":10,"startTime":"2024-12-01 17:00:00","endTime":"2024-12-01 18:00:00","sortDirection":"asc"}}' \
http://localhost:8080/zstack/v1/observability-server/f1718b20d8cd3daba51e1b39dcf35299/service-dataRequest Parameters
| Name | Type | Location | Description | Valid Values | Starting Version |
|---|---|---|---|---|---|
| observabilityServerUuid | String | body (contained in the params structure) | 5.3.28 | ||
| serviceType | String | body (contained in the params structure) |
|
5.3.28 | |
| serviceUuid | String | body (contained in the params structure) | 5.3.28 | ||
| limit | Integer | body (contained in the params structure) | Optional. | 5.3.28 | |
| startTime | String | body (contained in the params structure) | Optional. | 5.3.28 | |
| endTime | String | body (contained in the params structure) | Optional. | 5.3.28 | |
| sortDirection | String | body (contained in the params structure) | Optional. |
|
5.3.28 |
| labelFilters | Map | body (contained in the params structure) | Optional. | 5.3.28 | |
| systemTags | List | body | Optional. The system tag. | 5.3.28 | |
| userTags | List | body | Optional. The user tag. | 5.3.28 |
API Response
Sample Response
{
"inventories": []
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| total | Integer | 5.3.28 | |
| success | boolean | 5.3.28 | |
| error | ErrorCode | The error code. If not null, the operation fails, or vice versa. For more information, see error | 5.3.28 |
| inventory | List | See inventories | 5.3.28 |
#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. | 5.3.28 |
| description | String | The brief description of the error. | 5.3.28 |
| details | String | The details about the error. | 5.3.28 |
| elaboration | String | The reserved field. Default value: null. | 5.3.28 |
| opaque | LinkedHashMap | The reserved field. Default value: null. | 5.3.28 |
| cause | ErrorCode | The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. | 5.3.28 |
#inventory
| Name | Type | Description | Starting Version |
|---|---|---|---|
| job | String | 5.3.28 | |
| fileName | String | 5.3.28 |
SDK
Java
SDK
GetObservabilityServerServiceDataAction action = new GetObservabilityServerServiceDataAction();
action.observabilityServerUuid = "f1718b20d8cd3daba51e1b39dcf35299";
action.serviceType = "loadBalancer";
action.serviceUuid = "11836e85c4d7391a8d8c54248fd89815";
action.limit = 10;
action.startTime = "2024-12-01 17:00:00";
action.endTime = "2024-12-01 18:00:00";
action.sortDirection = "asc";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetObservabilityServerServiceDataAction.Result res = action.call();Python
SDK
GetObservabilityServerServiceDataAction action = GetObservabilityServerServiceDataAction()
action.observabilityServerUuid = "f1718b20d8cd3daba51e1b39dcf35299"
action.serviceType = "loadBalancer"
action.serviceUuid = "11836e85c4d7391a8d8c54248fd89815"
action.limit = 10
action.startTime = "2024-12-01 17:00:00"
action.endTime = "2024-12-01 18:00:00"
action.sortDirection = "asc"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
GetObservabilityServerServiceDataAction.Result res = action.call()