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.

Creating a new Hyper-V server is no longer available.

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

Creating a new Hyper-V server is no longer available.

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 vSphere/Hyper-V 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 and gets the result of adding a license to a VM.

Server Actions

The following API adds a license to a VM and gets the result of adding a license to a VM.

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.
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
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.

Show CFGW Connection

This API shows the connection status between your dedicated hypervisor and the common function gateway network.

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.

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"
}