Document navigation

Observability Server Operations

CreateObservabilityServer

API Request

URLs
POST zstack/v1/observability-servers
Headers
Authorization: OAuth the-session-uuid
Body
{
  "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-servers
Request 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) The observability server offering UUID. 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 Whether the operation succeeded. 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 The last host UUID. 5.3.28
instanceOfferingUuid String The instance offering UUID. 5.3.28
rootVolumeUuid String The root volume UUID. 5.3.28
platform String The platform. 5.3.28
architecture String The architecture. 5.3.28
defaultL3NetworkUuid String The default L3 network UUID. 5.3.28
type String The resource type. 5.3.28
hypervisorType String The hypervisor type. 5.3.28
memorySize Long The memory size. 5.3.28
reservedMemorySize Long The reserved memory size. 5.3.28
cpuNum Integer The number of CPUs. 5.3.28
cpuSpeed Long The CPU speed. 5.3.28
allocatorStrategy String The allocator strategy. 5.3.28
createDate Timestamp The creation time. 5.3.28
lastOpDate Timestamp The last operation time. 5.3.28
state String The resource state. 5.3.28
guestOsType String The guest OS type. 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 The IP address. 5.3.28
mac String The MAC address. 5.3.28
hypervisorType String The hypervisor type. 5.3.28
netmask String The netmask. 5.3.28
gateway String The gateway IP address. 5.3.28
metaData String The metadata. 5.3.28
ipVersion Integer The IP version. 5.3.28
driverType String The driver type. 5.3.28
internalName String The internal name. 5.3.28
deviceId Integer The device ID. 5.3.28
type String The resource type. 5.3.28
state String The resource state. 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 The IP version. 5.3.28
ip String The IP address. 5.3.28
netmask String The netmask. 5.3.28
gateway String The gateway IP address. 5.3.28
usedFor String The intended use. 5.3.28
ipInLong long The IP address represented as a long integer. 5.3.28
ipInBinary byte[] The IP in binary. 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 The root image UUID. 5.3.28
installPath String The installation path. 5.3.28
type String The resource type. 5.3.28
format String The format. 5.3.28
size Long The size. 5.3.28
actualSize Long The actual size. 5.3.28
deviceId Integer The device ID. 5.3.28
state String The resource state. 5.3.28
status String The resource status. 5.3.28
createDate Timestamp The creation time. 5.3.28
lastOpDate Timestamp The last operation time. 5.3.28
isShareable Boolean Whether the resource is shareable. 5.3.28
volumeQos String The volume QoS. 5.3.28
lastDetachDate Timestamp The last detach date. 5.3.28
lastVmInstanceUuid String The last VM instance UUID. 5.3.28
lastAttachDate Timestamp The last attach date. 5.3.28
protocol String The protocol. 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 The device ID. 5.3.28
isoUuid String The ISO UUID. 5.3.28
isoInstallPath String The ISO install path. 5.3.28
name String The resource name. 5.3.28
description String The resource description. 5.3.28
protocol String The protocol. 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
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"
res = action.call()

AttachServiceToObservabilityServer

API Request

URLs
POST zstack/v1/observability-server/{observabilityServerUuid}/service
Headers
Authorization: OAuth the-session-uuid
Body
{
  "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/service
Request Parameters
Name Type Location Description Valid Values Starting Version
observabilityServerUuid String body (contained in the params structure) The observability server UUID. 5.3.28
serviceType String body (contained in the params structure) The service type.
  • loadBalancer
5.3.28
serviceUuid String body (contained in the params structure) The service UUID. 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": {}
}
Name Type Description Starting Version
success boolean Whether the operation succeeded. 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 ObservabilityServerVmInventory 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
publicNetworkUuid String The public network UUID. 5.3.28
applianceVmType String The appliance VM instance type. 5.3.28
managementNetworkUuid String The management network UUID. 5.3.28
defaultRouteL3NetworkUuid String The default route L3 network UUID. 5.3.28
status String The resource status. 5.3.28
agentPort Integer The agent port. 5.3.28
haStatus String The HA status. 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 The last host UUID. 5.3.28
instanceOfferingUuid String The instance offering UUID. 5.3.28
rootVolumeUuid String The root volume UUID. 5.3.28
platform String The platform. 5.3.28
architecture String The architecture. 5.3.28
defaultL3NetworkUuid String The default L3 network UUID. 5.3.28
type String The resource type. 5.3.28
hypervisorType String The hypervisor type. 5.3.28
memorySize Long The memory size. 5.3.28
reservedMemorySize Long The reserved memory size. 5.3.28
cpuNum Integer The number of CPUs. 5.3.28
cpuSpeed Long The CPU speed. 5.3.28
allocatorStrategy String The allocator strategy. 5.3.28
createDate Timestamp The creation time. 5.3.28
lastOpDate Timestamp The last operation time. 5.3.28
state String The resource state. 5.3.28
guestOsType String The guest OS type. 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 The IP address. 5.3.28
mac String The MAC address. 5.3.28
hypervisorType String The hypervisor type. 5.3.28
netmask String The netmask. 5.3.28
gateway String The gateway IP address. 5.3.28
metaData String The metadata. 5.3.28
ipVersion Integer The IP version. 5.3.28
driverType String The driver type. 5.3.28
internalName String The internal name. 5.3.28
deviceId Integer The device ID. 5.3.28
type String The resource type. 5.3.28
state String The resource state. 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 The IP version. 5.3.28
ip String The IP address. 5.3.28
netmask String The netmask. 5.3.28
gateway String The gateway IP address. 5.3.28
usedFor String The intended use. 5.3.28
ipInLong long The IP address represented as a long integer. 5.3.28
ipInBinary byte[] The IP in binary. 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 The root image UUID. 5.3.28
installPath String The installation path. 5.3.28
type String The resource type. 5.3.28
format String The format. 5.3.28
size Long The size. 5.3.28
actualSize Long The actual size. 5.3.28
deviceId Integer The device ID. 5.3.28
state String The resource state. 5.3.28
status String The resource status. 5.3.28
createDate Timestamp The creation time. 5.3.28
lastOpDate Timestamp The last operation time. 5.3.28
isShareable Boolean Whether the resource is shareable. 5.3.28
volumeQos String The volume QoS. 5.3.28
lastDetachDate Timestamp The last detach date. 5.3.28
lastVmInstanceUuid String The last VM instance UUID. 5.3.28
lastAttachDate Timestamp The last attach date. 5.3.28
protocol String The protocol. 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 The device ID. 5.3.28
isoUuid String The ISO UUID. 5.3.28
isoInstallPath String The ISO install path. 5.3.28
name String The resource name. 5.3.28
description String The resource description. 5.3.28
protocol String The protocol. 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
action = AttachServiceToObservabilityServerAction()
action.observabilityServerUuid = "3e38d4c1adb73203b35120914b12ec61"
action.serviceType = "loadBalancer"
action.serviceUuid = "50b12612d2b4318193c2e040d98e8f7b"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()

DetachServiceFromObservabilityServer

API Request

URLs
DELETE zstack/v1/observability-server/{observabilityServerUuid}/service
Headers
Authorization: OAuth the-session-uuid
Curl Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X DELETE http://localhost:8080/zstack/v1/observability-server/eb4f0a1b78c139d9b291acc85ada69d0/service
Request Parameters
Name Type Location Description Valid Values Starting Version
observabilityServerUuid String body The observability server UUID. 5.3.28
serviceType String body The service type.
  • loadBalancer
5.3.28
serviceUuid String body The service UUID. 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."
  }
}
Name Type Description Starting Version
success boolean Whether the operation succeeded. 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 ObservabilityServerVmInventory 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
publicNetworkUuid String The public network UUID. 5.3.28
applianceVmType String The appliance VM instance type. 5.3.28
managementNetworkUuid String The management network UUID. 5.3.28
defaultRouteL3NetworkUuid String The default route L3 network UUID. 5.3.28
status String The resource status. 5.3.28
agentPort Integer The agent port. 5.3.28
haStatus String The HA status. 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 The last host UUID. 5.3.28
instanceOfferingUuid String The instance offering UUID. 5.3.28
rootVolumeUuid String The root volume UUID. 5.3.28
platform String The platform. 5.3.28
architecture String The architecture. 5.3.28
defaultL3NetworkUuid String The default L3 network UUID. 5.3.28
type String The resource type. 5.3.28
hypervisorType String The hypervisor type. 5.3.28
memorySize Long The memory size. 5.3.28
reservedMemorySize Long The reserved memory size. 5.3.28
cpuNum Integer The number of CPUs. 5.3.28
cpuSpeed Long The CPU speed. 5.3.28
allocatorStrategy String The allocator strategy. 5.3.28
createDate Timestamp The creation time. 5.3.28
lastOpDate Timestamp The last operation time. 5.3.28
state String The resource state. 5.3.28
guestOsType String The guest OS type. 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 The IP address. 5.3.28
mac String The MAC address. 5.3.28
hypervisorType String The hypervisor type. 5.3.28
netmask String The netmask. 5.3.28
gateway String The gateway IP address. 5.3.28
metaData String The metadata. 5.3.28
ipVersion Integer The IP version. 5.3.28
driverType String The driver type. 5.3.28
internalName String The internal name. 5.3.28
deviceId Integer The device ID. 5.3.28
type String The resource type. 5.3.28
state String The resource state. 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 The IP version. 5.3.28
ip String The IP address. 5.3.28
netmask String The netmask. 5.3.28
gateway String The gateway IP address. 5.3.28
usedFor String The intended use. 5.3.28
ipInLong long The IP address represented as a long integer. 5.3.28
ipInBinary byte[] The IP in binary. 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 The root image UUID. 5.3.28
installPath String The installation path. 5.3.28
type String The resource type. 5.3.28
format String The format. 5.3.28
size Long The size. 5.3.28
actualSize Long The actual size. 5.3.28
deviceId Integer The device ID. 5.3.28
state String The resource state. 5.3.28
status String The resource status. 5.3.28
createDate Timestamp The creation time. 5.3.28
lastOpDate Timestamp The last operation time. 5.3.28
isShareable Boolean Whether the resource is shareable. 5.3.28
volumeQos String The volume QoS. 5.3.28
lastDetachDate Timestamp The last detach date. 5.3.28
lastVmInstanceUuid String The last VM instance UUID. 5.3.28
lastAttachDate Timestamp The last attach date. 5.3.28
protocol String The protocol. 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 The device ID. 5.3.28
isoUuid String The ISO UUID. 5.3.28
isoInstallPath String The ISO install path. 5.3.28
name String The resource name. 5.3.28
description String The resource description. 5.3.28
protocol String The protocol. 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
action = DetachServiceFromObservabilityServerAction()
action.observabilityServerUuid = "eb4f0a1b78c139d9b291acc85ada69d0"
action.serviceType = "loadBalancer"
action.serviceUuid = "6dd5dbdc01a6339086958415859fbb60"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()

CreateObservabilityServerOffering

API Request

URLs
POST zstack/v1/instance-offerings/observability-servers
Headers
Authorization: OAuth the-session-uuid
Body
{
  "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-servers
Request 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) The management network UUID. 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) The number of CPUs. 5.3.28
memorySize long body (contained in the params structure) The memory size. 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"
  }
}
Name Type Description Starting Version
success boolean Whether the operation succeeded. 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 InstanceOfferingInventory 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
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 The sort key. 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
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"
res = action.call()

GetObservabilityServerServiceData

API Request

URLs
POST zstack/v1/observability-server/{observabilityServerUuid}/service-data
Headers
Authorization: OAuth the-session-uuid
Body
{
  "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-data
Request Parameters
Name Type Location Description Valid Values Starting Version
observabilityServerUuid String body (contained in the params structure) The observability server UUID. 5.3.28
serviceType String body (contained in the params structure) The service type.
  • loadBalancer
5.3.28
serviceUuid String body (contained in the params structure) The service UUID. 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.
  • asc
  • desc
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 The total. 5.3.28
success boolean Whether the operation succeeded. 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 The job. 5.3.28
fileName String The file name. 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
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"
res = action.call()
API Reference | 5.5.38 | ZStack Cloud · ZCF | ZStack Resource Center