Dedicated Hypervisor API reference (1.0.0)

Download OpenAPI specification:Download

This manual explains how to use the Smart Data Platform Dedicated Hypervisor API

Servers

The following APIs create, list, and delete servers.

List Servers

This API lists your dedicated hypervisor information.

path Parameters
tenant_id
required
string
Example: aaa8749130bc3d2886d6b9bb3fcb1715

ID of the tenant

query Parameters
changes-since
string <date-time>

A time/date stamp for when the server last changed status.

marker
string <uuid>

UUID of the server at which you want to set a marker. The list starts from the server after the given UUID.

limit
integer

Integer value for the maximum number of servers to return.

name
string

Name of the server as a string.

image
string

Name of the image in URL format. This parameter can be obtained by the GET /images API.

flavor
string

Name of the flavor in URL format. This parameter can be obtained by the GET /flavors API.

status
string

Value of the server status to filter results by.

Responses

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

405

Request URL or method is invalid

500

Internal Server Error

get/servers
https://{api_endpoint}/v1.0/{tenant_id}/servers

Response samples

Content type
application/json
Copy
Expand all Collapse all
{}

Create Server

This API creates a new server.

path Parameters
tenant_id
required
string

ID of the tenant

Request Body schema: application/json
server
object

Responses

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

405

Request URL or method is invalid

500

Internal Server Error

503

Service Unavailable

post/servers
https://{api_endpoint}/v1.0/{tenant_id}/servers

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "server":
    {
    }
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{}

List Servers Detail

This API lists your dedicated hypervisor information in detail.

path Parameters
tenant_id
required
string
Example: aaa8749130bc3d2886d6b9bb3fcb1715

ID of the tenant

query Parameters
changes-since
string <date-time>

A time/date stamp for when the server last changed status.

marker
string <uuid>

UUID of the server at which you want to set a marker. The list starts from the server after the given UUID.

limit
integer

Integer value for the maximum number of servers to return.

name
string

Name of the server as a string.

image
string

Name of the image in URL format. This parameter can be obtained by the GET /images API.

flavor
string

Name of the flavor in URL format. This parameter can be obtained by the GET /flavors API.

status
string

Value of the server status to filter results by.

Responses

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

405

Request URL or method is invalid

500

Internal Server Error

get/servers/detail
https://{api_endpoint}/v1.0/{tenant_id}/servers/detail

Response samples

Content type
application/json
Copy
Expand all Collapse all
{}

Show Server

This API shows your dedicated hypervisor information.

path Parameters
tenant_id
required
string
Example: aaa8749130bc3d2886d6b9bb3fcb1715

ID of the tenant

server_id
required
string <uuid>

ID of the server

Responses

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Request URL or method is invalid

500

Internal Server Error

get/servers/{server_id}
https://{api_endpoint}/v1.0/{tenant_id}/servers/{server_id}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{}

Delete Server

This API deletes a specified server. You can delete a server when its status is ACTIVE or ERROR.

path Parameters
tenant_id
required
string
Example: aaa8749130bc3d2886d6b9bb3fcb1715

ID of the tenant

server_id
required
string <uuid>

ID of the server

Responses

204

No Content

400

Bad Request

401

Unauthorized

404

Not Found

405

Request URL or method is invalid

409

Conflict

500

Internal Server Error

503

Service Unavailable

delete/servers/{server_id}
https://{api_endpoint}/v1.0/{tenant_id}/servers/{server_id}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "badRequest":
    {
    }
}

Update Server

This API updates the editable attributes of the specified server.

path Parameters
tenant_id
required
string <uuid>

ID for the tenant.

server_id
required
string <uuid>

ID for the server.

Request Body schema: application/json
server
object

Responses

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Request URL or method is invalid

500

Internal Server Error

503

Service Unavailable

put/servers/{server_id}
https://{api_endpoint}/v1.0/{tenant_id}/servers/{server_id}

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "server":
    {
    }
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{}

Licenses

The following APIs create, list, and delete license keys on vSphere/Hyper-V.

List Licenses

This API lists your guest image licenses.

path Parameters
tenant_id
required
string
Example: aaa8749130bc3d2886d6b9bb3fcb1715

ID of the tenant

query Parameters
license_type
string
Example: license_type=vCenter Server 5.5 Standard

License type name as a string.

Responses

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

405

Request URL or method is invalid

500

Internal Server Error

get/licenses
https://{api_endpoint}/v1.0/{tenant_id}/licenses

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "licenses":
    [
    ]
}

Create License

This API creates a new license key.

path Parameters
tenant_id
required
string

ID of the tenant

Request Body schema: application/json
license_type
required
string

Name of your guest image license type as a string.

Responses

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

405

Request URL or method is invalid

500

Internal Server Error

503

Service Unavailable

post/licenses
https://{api_endpoint}/v1.0/{tenant_id}/licenses

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "license_type": "vCenter Server 5.5 Standard"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "license":
    {
    }
}

Delete License

This API deletes a specified license.

path Parameters
tenant_id
required
string
Example: aaa8749130bc3d2886d6b9bb3fcb1715

ID of the tenant

license_id
required
string <uuid>

ID for the license.

Responses

204

No Content

400

Bad Request

401

Unauthorized

404

Not Found

405

Request URL or method is invalid

409

Conflict

500

Internal Server Error

503

Service Unavailable

delete/licenses/{license_id}
https://{api_endpoint}/v1.0/{tenant_id}/licenses/{license_id}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "badRequest":
    {
    }
}

LicenseTypes

The following API lists the license types available for purchase.

List LicenseTypes

This API lists guest image license type information for vSphere/Hyper-V servers.

path Parameters
tenant_id
required
string
Example: aaa8749130bc3d2886d6b9bb3fcb1715

ID of the tenant

Responses

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

405

Request URL or method is invalid

500

Internal Server Error

get/license_types
https://{api_endpoint}/v1.0/{tenant_id}/license_types

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "license_types":
    [
    ]
}

Usages

The following API lists usages of guest images.

List Usages

This API lists your guestimage usage information.

path Parameters
tenant_id
required
string
Example: aaa8749130bc3d2886d6b9bb3fcb1715

ID of the tenant

query Parameters
from
string
Example: from=

Date to list usage from. If not specified, the beginning of the month is set.

to
string
Example: to=

Date to list usage to. The month of this parameter must be the same as 'from'. If not specified, the end of the month is set.

license_type
string
Example: license_type=vCenter Server 5.5 Standard

License type name as a string.

Responses

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

405

Request URL or method is invalid

500

Internal Server Error

get/usages
https://{api_endpoint}/v1.0/{tenant_id}/usages

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "tenant_id": "9da9116d-cc44-4ad8-aca5-7db398fcb477",
  • "usages":
    [
    ]
}

Show Usage Histories

This API shows your guest image usage history information.

path Parameters
tenant_id
required
string
Example: aaa8749130bc3d2886d6b9bb3fcb1715

ID of the tenant

usage_id
required
string
Example: d22fe95e-f9f5-4cd2-a669-75439eaeada7

Usage ID. This parameter can be retrieved by the List Usages API.

query Parameters
from
string
Example: from=

Date to list usage from. If not specified, the beginning of the month is set.

to
string
Example: to=

Date to list usage to. The month of this parameter must be the same as 'from'. If not specified, the end of the month is set.

Responses

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

405

Request URL or method is invalid

500

Internal Server Error

get/usages/{usage_id}/histories
https://{api_endpoint}/v1.0/{tenant_id}/usages/{usage_id}/histories

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "tenant_id": "9da9116d-cc44-4ad8-aca5-7db398fcb477",
  • "unit": "VM",
  • "resource_id": "9da9116d-cc44-4ad8-aca5-7db398fcb488",
  • "license_type": "Windows Server",
  • "histories":
    [
    ]
}

Server Actions

The following API adds a license to a VM, gets the result of adding a license to a VM, deploys a guest image, and gets the result of deploying a guest image.

Server Actions

This API adds a license to a VM, gets the result of adding a license to a VM, deploys a guest image, and gets the result of deploying a guest image.
This API is not supported for Nutanix.

Action Description
Add License to VM Adds license meta-information to the VM on the specified hypervisor.
Get Result for add license to VM Shows the result of the add-license-to-vm API.
Deploy GuestImage Deploys a GuestImage to the specified hypervisor. (available only for deployment to ESXi not managed by vCenter)
Get Result for deploy GuestImage Shows the result of the deploy-guestimage API.
path Parameters
tenant_id
required
string
Example: aaa8749130bc3d2886d6b9bb3fcb1715

ID for the tenant.

server_id
required
string <uuid>

ID for the server.

Request Body schema: application/json
One of
  • Add License to VM by vm_id
  • Add License to VM by vm_name
  • Get Result for add license to VM
  • Deploy GuestImage
  • Get Result for deploy GuestImage
add-license-to-vm
required
object

Responses

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Request URL or method is invalid

500

Internal Server Error

post/servers/{server_id}/action
https://{api_endpoint}/v1.0/{tenant_id}/servers/{server_id}/action

Request samples

Content type
application/json
Example
Copy
Expand all Collapse all
{
  • "add-license-to-vm":
    {
    }
}

Response samples

Content type
application/json
Example
Copy
Expand all Collapse all
{
  • "job_id": "b4f888dc2b9d4c41bb769cbd"
}

CFGW Connection

The following APIs get and update the CFGW Connection status. These APIs are not applicable to Nutanix.

Show CFGW Connection

This API shows the connection status between your dedicated hypervisor and the common function gateway network.
For Nutanix, the API always returns "true" for the status of cfgw_connection.

path Parameters
tenant_id
required
string
Example: aaa8749130bc3d2886d6b9bb3fcb1715

ID of the tenant

server_id
required
string <uuid>

ID of the server

Responses

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

405

Request URL or method is invalid

500

Internal Server Error

get/servers/{server_id}/cfgw_connection
https://{api_endpoint}/v1.0/{tenant_id}/servers/{server_id}/cfgw_connection

Response samples

Content type
application/json
Example
Copy
Expand all Collapse all
{
  • "server":
    {
    }
}

Update CFGW Connection Status

This API updates the connection status between your dedicated hypervisor and the common function gateway network.
For Nutanix, this API has no effect.

path Parameters
tenant_id
required
string
Example: aaa8749130bc3d2886d6b9bb3fcb1715

ID of the tenant

server_id
required
string <uuid>

ID of the server

Responses

200

OK

400

Bad Request

401

Unauthorized

404

Not Found

405

Request URL or method is invalid

500

Internal Server Error

post/servers/{server_id}/cfgw_connection
https://{api_endpoint}/v1.0/{tenant_id}/servers/{server_id}/cfgw_connection

Response samples

Content type
application/json
Example
Copy
Expand all Collapse all
{
  • "server":
    {
    },
  • "info": "Successfully updated"
}

vCenter

The following APIs register, show, and delete vCenter information.

List Registered vCenters Information

This API shows your registered vCenter information.

path Parameters
tenant_id
required
string
Example: aaa8749130bc3d2886d6b9bb3fcb1715

ID of the tenant

Responses

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

405

Request URL or method is invalid

500

Internal Server Error

get/vcenters
https://{api_endpoint}/v1.0/{tenant_id}/vcenters

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "vcenters":
    [
    ]
}

Register vCenter Information

This API registers your vCenter information.

path Parameters
tenant_id
required
string

ID of the tenant

Request Body schema: application/json
vcenter
object

Responses

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

405

Request URL or method is invalid

500

Internal Server Error

503

Service Unavailable

post/vcenters
https://{api_endpoint}/v1.0/{tenant_id}/vcenters

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "vcenter":
    {
    }
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "vcenter":
    {
    }
}

Update Registered vCenter Information

This API updates the specified registered vCenter information.

path Parameters
tenant_id
required
string
Example: aaa8749130bc3d2886d6b9bb3fcb1715

ID of the tenant

vcenter_id
required
string <uuid>

ID of the vCenter

Request Body schema: application/json
vcenter
object

Responses

200

OK

400

Bad Request

401

Unauthorized

404

Not Found

405

Request URL or method is invalid

409

Conflict

500

Internal Server Error

503

Service Unavailable

put/vcenters/{vcenter_id}
https://{api_endpoint}/v1.0/{tenant_id}/vcenters/{vcenter_id}

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "vcenter":
    {
    }
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "vcenter":
    {
    }
}

Delete Registered vCenter Information

This API deletes the specified registered vCenter information.

path Parameters
tenant_id
required
string
Example: aaa8749130bc3d2886d6b9bb3fcb1715

ID of the tenant

vcenter_id
required
string <uuid>

ID of the vCenter

Responses

204

No Content

400

Bad Request

401

Unauthorized

404

Not Found

405

Request URL or method is invalid

409

Conflict

500

Internal Server Error

503

Service Unavailable

delete/vcenters/{vcenter_id}
https://{api_endpoint}/v1.0/{tenant_id}/vcenters/{vcenter_id}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "badRequest":
    {
    }
}

vSphere Contracts

The following APIs create, list, and update long-term discount contracts for vSphere ESXi.

List vSphere Contracts

This API shows your long-term discount contracts for vSphere ESXi.

In addition to the content of your contract, you can view the total number of cores of your vSphere ESXi servers and the monthly core count history of your contract.

path Parameters
tenant_id
required
string
Example: aaa8749130bc3d2886d6b9bb3fcb1715

ID of the tenant

Responses

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

405

Request URL or method is invalid

500

Internal Server Error

get/vsphere_contracts
https://{api_endpoint}/v1.0/{tenant_id}/vsphere_contracts

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "vsphere_contracts":
    [
    ],
  • "all_server_cores": 64,
  • "vsphere_contracts_histories":
    [
    ]
}

Manage vSphere Contracts

This API is used to manage (create, update, or delete) a long-term discount contract and its commitment for vSphere ESXi.

The behavior of the API varies based on the contract's status.


1. If no contract has been created or has not started yet

When there is no existing contract or the contract has not started yet, the API functions as a create/update/delete API for a new contract starting the next month.

  • Create: If no contract exists, a new contract will be created with the initial commitment with the specified cores.
  • Update: If a contract already exists, the cores of its commitment will be updated to the specified cores.
  • Delete: If a contract exists and 0 cores are specified, the contract will be deleted.

2. If a contract already exists and has started (not in the final month)

When a contract exists and has already started but is not in its final month, the API functions as a create/update/delete API for its commitment that will be added starting from the next month.

  • Create: If no commitment for the next month has been added, a new one will be created with the specified cores.
  • Update: If a commitment for the next month has already been added in the current month, its cores will be updated with the specified cores.
  • Delete: If a commitment for the next month has already been added and 0 cores are specified, the commitment will be deleted.

3. If a contract exists and it is in its final month

If the contract is in its final month, the API functions in the same way as case 1 (If the contract has not been created or has not started yet), with the following exceptions:

  • Create: Before creating a new contract, contract_renewal of current contract must be set to true using the PUT vSphere Contracts API.
  • Delete: Before deleting a new contract, contract_renewal of current contract must be set to false using the PUT vSphere Contracts API.
path Parameters
tenant_id
required
string

ID of the tenant

Request Body schema: application/json
vsphere_contract
object

Responses

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

405

Request URL or method is invalid

500

Internal Server Error

503

Service Unavailable

post/vsphere_contracts
https://{api_endpoint}/v1.0/{tenant_id}/vsphere_contracts

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "vsphere_contract":
    {
    }
}

Response samples

Content type
application/json
Example
Copy
Expand all Collapse all
{
  • "vsphere_contract":
    {
    }
}

Enable/Disable Contract Renewal

This API is used to enable/disable contract renewal of the long-term discount for vSphere ESXi.

path Parameters
tenant_id
required
string

ID of the tenant

Request Body schema: application/json
vsphere_contract
object

Responses

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

405

Request URL or method is invalid

500

Internal Server Error

503

Service Unavailable

put/vsphere_contracts
https://{api_endpoint}/v1.0/{tenant_id}/vsphere_contracts

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "vsphere_contract":
    {
    }
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "vsphere_contract":
    {
    }
}