Api Documentation (1.0)

Download OpenAPI specification:Download

Api Documentation

ca-rest-controller-v-2

CA Rest Controller V 2

List Certificate Authority Paging

path Parameters
projectId
required
string

project id

query Parameters
name
required
string

name

page
required
string
Default: "1"

page

size
required
string
Default: "10"

size

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vlb-gateway/v2/{projectId}/cas',
  qs: {name: 'SOME_STRING_VALUE', page: '1', size: '10'},
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Import Certificate Authority

path Parameters
projectId
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

importCARequest

certificate
string

Certificate of the CA

certificateChain
string

A certificate chain is an ordered list of certificates, containing an SSL/TLS Certificate and Certificate Authority (CA) Certificates, that enable the receiver to verify that the sender and all CA's are trustworthy.

name
required
string

Name of the CA

passphrase
string

The password of the private key.

privateKey
string

Private key of the CA

type
required
string
Enum: "CA" "TLS/SSL"

Type of the certificate ( CA or TLS/SSL )

Responses

Request samples

Content type
application/json
{
  • "certificate": "string",
  • "certificateChain": "string",
  • "name": "ca_01",
  • "passphrase": "string",
  • "privateKey": "string",
  • "type": "TLS/SSL"
}

Get Certificate Authority

path Parameters
caId
required
string

The certificate authority id

projectId
required
string

project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vlb-gateway/v2/{projectId}/cas/{caId}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Delete Certificate Authority

path Parameters
caId
required
string

The ca id

projectId
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'DELETE',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vlb-gateway/v2/{projectId}/cas/{caId}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

dhcp-option-rest-controller-v-2

Dhcp Option Rest Controller V 2

List Dhcp Option Paging

path Parameters
projectId
required
string

project id

query Parameters
name
string

name

page
integer <int32>
Default: 1

page

size
integer <int32>
Default: 10

size

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/dhcp_option',
  qs: {name: 'SOME_STRING_VALUE', page: '1', size: '10'},
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Create Dhcp Option

path Parameters
projectId
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

createDhcpOptionRequest

dnsServers
Array of strings

List of dns servers.

mtu
integer <int32>

MTU Interface.

name
required
string

Name of the Dhcp Option

Array of objects (TagRequest)

Tags of resource

Responses

Request samples

Content type
application/json
{
  • "dnsServers": [
    ],
  • "mtu": 1450,
  • "name": "Dhcp Option A",
  • "tags": [
    ]
}

Get Dhcp Option By Id

path Parameters
id
required
string

The dhcp option id

projectId
required
string

project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/dhcp_option/{id}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Delete Dhcp Option

path Parameters
id
required
string

The dhcp option id

projectId
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'DELETE',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/dhcp_option/{id}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

elastic-ip-rest-controller-v-2

Elastic Ip Rest Controller V 2

List elastic-ip

path Parameters
projectId
required
string

The project id

query Parameters
name
string

name

page
integer <int32>

page

size
integer <int32>

size

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/elastic-ips',
  qs: {
    name: 'SOME_STRING_VALUE',
    page: 'SOME_INTEGER_VALUE',
    size: 'SOME_INTEGER_VALUE'
  },
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

flavor-rest-controller

Flavor Rest Controller

List flavor custom for project

path Parameters
project_id
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v1/{project_id}/flavors/customs',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

List flavor custom support cluster for project

path Parameters
project_id
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v1/{project_id}/flavors/customs/clusters',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

List flavor custom for project

path Parameters
familyKey
required
string

The family key

platformKey
required
string

The platform key

project_id
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v1/{project_id}/flavors/families/{familyKey}/platforms/{platformKey}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

List flavor custom support cluster for project

path Parameters
familyKey
required
string

The family key

master
required
boolean

master

platformKey
required
string

The platform key

project_id
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v1/{project_id}/flavors/families/{familyKey}/platforms/{platformKey}/clusters/master/{master}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

getFlavor

path Parameters
flavor_id
required
string

flavor_id

project_id
required
string

project_id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v1/{project_id}/flavors/{flavor_id}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

listFlavor

path Parameters
flavor_zone_id
required
string

flavor_zone_id

project_id
required
string

project_id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v1/{project_id}/{flavor_zone_id}/flavors',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

flavor-zone-rest-controller

Flavor Zone Rest Controller

listCode

path Parameters
project_id
required
string

project_id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v1/{project_id}/flavor_zones/codes',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

listCustom

path Parameters
project_id
required
string

project_id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v1/{project_id}/flavor_zones/customs',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

listCustomSupportCluster

path Parameters
master
required
boolean

master

project_id
required
string

project_id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v1/{project_id}/flavor_zones/customs/clusters/master/{master}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

listFamily

path Parameters
project_id
required
string

project_id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v1/{project_id}/flavor_zones/families',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

listFamilySupportCluster

path Parameters
project_id
required
string

project_id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v1/{project_id}/flavor_zones/families/clusters',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

listFlavorZone

path Parameters
product
required
string

product

project_id
required
string

project_id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v1/{project_id}/flavor_zones/product',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

listFlavorZone

path Parameters
product
required
string

product

project_id
required
string

project_id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v1/{project_id}/flavor_zones/product/{product}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

getFlavorZone

path Parameters
flavor_zone_id
required
string

flavor_zone_id

project_id
required
string

project_id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v1/{project_id}/flavor_zones/{flavor_zone_id}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

image-rest-controller

Image Rest Controller

listGPUImage

path Parameters
project_id
required
string

project_id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v1/{project_id}/images/gpu',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

listOSImage

path Parameters
project_id
required
string

project_id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v1/{project_id}/images/os',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

listOSImageDefault

path Parameters
project_id
required
string

project_id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v1/{project_id}/images/os_default',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

interconnect-rest-controller-v-2

Interconnect Rest Controller V 2

List Interconnect

path Parameters
projectId
required
string

the project id

query Parameters
name
string

name

page
integer <int32>
Default: 1

page

size
integer <int32>
Default: 10

size

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/interconnects',
  qs: {name: 'SOME_STRING_VALUE', page: '1', size: '10'},
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Create Interconnect

path Parameters
projectId
required
string

the project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

createInterconnectRequest

description
string

Description

enableGw2
boolean

Enable Gw 2

name
required
string

Name of the Interconnect

packageId
required
string

PackageId

Array of objects (TagRequest)

Tags of resource

typeId
required
string

TypeId

Responses

Request samples

Content type
application/json
{
  • "description": "Interconnect from A to B",
  • "enableGw2": true,
  • "name": "Interconnect_01",
  • "packageId": "itp-1Gbps",
  • "tags": [
    ],
  • "typeId": "EXTERNAL"
}

List Circuit Types

path Parameters
projectId
required
string

the project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/interconnects/circuit-types',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

List Interconnect Packages

path Parameters
projectId
required
string

The project Id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/interconnects/packages',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Get Interconnect

path Parameters
interconnectId
required
string

the interconnect id

projectId
required
string

the project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/interconnects/{interconnectId}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Update enable gw2 or description

path Parameters
interconnectId
required
string

the interconnect id

projectId
required
string

the project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

updateInterconnectRequest

description
string

Description

enableGw2
boolean

Enable Gw 2

Array of objects (TagRequest)

Tags of resource

Responses

Request samples

Content type
application/json
{
  • "description": "Interconnect from A to B",
  • "enableGw2": true,
  • "tags": [
    ]
}

Delete Interconnect

path Parameters
interconnectId
required
string

the interconnect id

projectId
required
string

the project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'DELETE',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/interconnects/{interconnectId}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Change Package

path Parameters
interconnectId
required
string

the interconnect id

projectId
required
string

the project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

changePackageInterconnectRequest

packageId
required
string

PackageId

Array of objects (TagRequest)

Tags of resource

Responses

Request samples

Content type
application/json
{
  • "packageId": "itp-1Gbps",
  • "tags": [
    ]
}

List Interconnect Connection

path Parameters
interconnectId
required
string

the interconnect id

projectId
required
string

the project id

query Parameters
name
string

name

page
integer <int32>
Default: 1

page

size
integer <int32>
Default: 10

size

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/interconnects/{interconnectId}/connections',
  qs: {name: 'SOME_STRING_VALUE', page: '1', size: '10'},
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Create Interconnect Connection

path Parameters
interconnectId
required
string

the interconnect id

projectId
required
string

the project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

createInterconnectionRequest

description
string

Description

name
required
string

Name of the Interconnect Connection

networkId
required
string

net-657cf76c-cccc-xxxx-xxxx-5c8485578705

subnets
required
Array of strings

List Remote Subnets

Array of objects (TagRequest)

Tags of resource

Responses

Request samples

Content type
application/json
{
  • "description": "Connection from VPC A to B",
  • "name": "Connection from A to B",
  • "networkId": true,
  • "subnets": [
    ],
  • "tags": [
    ]
}

Get Interconnect Connection

path Parameters
interconnectId
required
string

the interconnect id

interconnectionId
required
string

the interconnection id

projectId
required
string

the project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/interconnects/{interconnectId}/connections/{interconnectionId}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Update remote subnets

path Parameters
interconnectId
required
string

the interconnect id

interconnectionId
required
string

the interconnection id

projectId
required
string

the project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

updateSubnetsInterconnectionRequest

subnets
required
Array of strings

List Remote Subnets

Array of objects (TagRequest)

Tags of resource

Responses

Request samples

Content type
application/json
{
  • "subnets": [
    ],
  • "tags": [
    ]
}

Delete Interconnect Connection

path Parameters
interconnectId
required
string

the interconnect id

interconnectionId
required
string

the interconnection id

projectId
required
string

the project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'DELETE',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/interconnects/{interconnectId}/connections/{interconnectionId}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Ping Interconnect

path Parameters
interconnectId
required
string

the interconnect id

projectId
required
string

the project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

pingInterconnectRequest

gwNumber
integer <int32>

Gateway Number (1 or 2)

Array of objects (TagRequest)

Tags of resource

Responses

Request samples

Content type
application/json
{
  • "gwNumber": 1,
  • "tags": [
    ]
}

interface-peering-rest-controller-v-2

Interface Peering Rest Controller V 2

List Peering V2

path Parameters
projectId
required
string

project id

query Parameters
name
required
string

name

page
required
string
Default: "1"

page

size
required
string
Default: "10"

size

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/peering',
  qs: {name: 'SOME_STRING_VALUE', page: '1', size: '10'},
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Delete Peering

path Parameters
peeringId
required
string

peeringId

projectId
required
string

projectId

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'DELETE',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/peering/{peeringId}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

load-balancer-event-rest-controller-v-2

Load Balancer Event Rest Controller V 2

Handle load balancer's events

path Parameters
signature
required
string

Event's signature

header Parameters
Authorization
required
string

Access Token

Responses

Request samples

const request = require('request');

const options = {
  method: 'POST',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vlb-gateway/v2/lb-events/manual-trigger/{signature}',
  headers: {
    accept: 'application/json',
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Handle load balancer's events

header Parameters
Authorization
required
string

Access Token

Request Body schema: application/json

body

alarmDescription
string
alarm_description
string
signature
string

Responses

Request samples

Content type
application/json
{
  • "alarmDescription": "string",
  • "alarm_description": "string",
  • "signature": "string"
}

load-balancer-listener-rest-controller-v-2

Load Balancer Listener Rest Controller V 2

Get list of listeners of a Load Balancer

path Parameters
loadBalancerId
required
string

The Load Balancer id

projectId
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vlb-gateway/v2/{projectId}/loadBalancers/{loadBalancerId}/listeners',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Create a listener

path Parameters
loadBalancerId
required
string

The Load Balancer id

projectId
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

createListenerRequestV2

allowedCidrs
required
string

Allowed cidr.

certificateAuthorities
Array of strings

List of certificate authority

clientCertificate
string

The TLS client authentication mode

defaultCertificateAuthority
string

Default certificate authority that the listener will use

defaultPoolId
string

Id of the pool that this listener will forward to.

headers
Array of strings
Items Enum: "X-Forwarded-For" "X-Forwarded-Port" "X-SSL-Client-Verify" "X-SSL-Client-Has-Cert" "X-SSL-Client-DN" "X-SSL-Client-CN" "X-SSL-Issuer" "X-SSL-Client-SHA1" "X-SSL-Client-Not-Before" "X-SSL-Client-Not-After" "X-Forwarded-Proto"

List Headers

listenerName
required
string

Name of the listener. Only letters (a-z, A-Z, 0-9, '_', '.') are allowed and your input data must be between 5 and 50 characters.

listenerProtocol
required
string
Enum: "HTTP" "HTTPS" "TCP" "UDP"

Protocol of the listener.

listenerProtocolPort
required
integer <int32>

Port of the listener.

timeoutClient
required
integer <int32>

Idle timeout of client. The value can be in range from 1 to 3600 seconds

timeoutConnection
required
integer <int32>

Idle timeout of connection. The value can be in range from 1 to 3600 seconds

timeoutMember
required
integer <int32>

Idle timeout of member. The value can be in range from 1 to 3600 seconds

Responses

Request samples

Content type
application/json
{
  • "allowedCidrs": "0.0.0.0/0",
  • "certificateAuthorities": [
    ],
  • "clientCertificate": "secret-4ea86b49-9427-4b14-b080-8ac88a1f5efe",
  • "defaultCertificateAuthority": "secret-4ea86b49-9427-4b14-b080-8ac88a1f5efe",
  • "defaultPoolId": "pool-1a007f28-bafa-450f-963b-3d177730c3b8",
  • "headers": [
    ],
  • "listenerName": "listener_02",
  • "listenerProtocol": "HTTP",
  • "listenerProtocolPort": 80,
  • "timeoutClient": 50,
  • "timeoutConnection": 5,
  • "timeoutMember": 50
}

Get a specific listener

path Parameters
listenerId
required
string

The listener id

loadBalancerId
required
string

The Load Balancer id

projectId
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vlb-gateway/v2/{projectId}/loadBalancers/{loadBalancerId}/listeners/{listenerId}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Update a listener

path Parameters
listenerId
required
string

The listener id

loadBalancerId
required
string

The Load Balancer id

projectId
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

updateListenerRequestV2

allowedCidrs
required
string

Allowed cidr.

certificateAuthorities
Array of strings

List of certificate authority

clientCertificate
string

The TLS client authentication mode

defaultCertificateAuthority
string

Default certificate authority.

defaultPoolId
string

Id of the pool that this listener will forward to.

headers
Array of strings
Items Enum: "X-Forwarded-For" "X-Forwarded-Port" "X-SSL-Client-Verify" "X-SSL-Client-Has-Cert" "X-SSL-Client-DN" "X-SSL-Client-CN" "X-SSL-Issuer" "X-SSL-Client-SHA1" "X-SSL-Client-Not-Before" "X-SSL-Client-Not-After" "X-Forwarded-Proto"

List Headers

timeoutClient
required
integer <int32>

Idle timeout of client. The value can be in range from 1 to 3600 seconds

timeoutConnection
required
integer <int32>

Idle timeout of connection. The value can be in range from 1 to 3600 seconds

timeoutMember
required
integer <int32>

Idle timeout of member. The value can be in range from 1 to 3600 seconds

Responses

Request samples

Content type
application/json
{
  • "allowedCidrs": "0.0.0.0/0",
  • "certificateAuthorities": [
    ],
  • "clientCertificate": "secret-4ea86b49-9427-4b14-b080-8ac88a1f5efe",
  • "defaultCertificateAuthority": "secret-4ea86b49-9427-4b14-b080-8ac88a1f5efe",
  • "defaultPoolId": "pool-1a007f28-bafa-450f-963b-3d177730c3b8",
  • "headers": [
    ],
  • "timeoutClient": 50,
  • "timeoutConnection": 5,
  • "timeoutMember": 50
}

Delete a listener

path Parameters
listenerId
required
string

The listener id

loadBalancerId
required
string

The load balancer id

projectId
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'DELETE',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vlb-gateway/v2/{projectId}/loadBalancers/{loadBalancerId}/listeners/{listenerId}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Get list policies of a listener

path Parameters
listenerId
required
string

The listener id

loadBalancerId
required
string

The Load Balancer id

projectId
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vlb-gateway/v2/{projectId}/loadBalancers/{loadBalancerId}/listeners/{listenerId}/l7policies',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Create a l7 policy

path Parameters
listenerId
required
string

The listener id

loadBalancerId
required
string

The Load Balancer id

projectId
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

createL7PolicyRequestV2

action
required
string
Enum: "REDIRECT_TO_POOL" "REDIRECT_TO_URL"

Action. This indicates how the listener will route traffic. The value can be REDIRECT_TO_POOL or REDIRECT_TO_URL.

keepQueryString
boolean

Keep the query string or not.

name
required
string

Policy name. Only letters (a-z, A-Z, 0-9, '_', '.') are allowed and your input data must be between 5 and 50 characters.

redirectHttpCode
integer <int32>
Enum: 301 302

Redirect HTTP code for redirecting to other URL.

redirectPoolId
string

Pool for forwarding.

redirectUrl
string

URL for forwarding.

Array of objects (L7RuleRequest)

List of rules of the policy.

Responses

Request samples

Content type
application/json
{
  • "action": "REDIRECT_TO_URL",
  • "keepQueryString": true,
  • "name": "l7policy_1",
  • "redirectHttpCode": 301,
  • "redirectPoolId": "pool-1a007f28-bafa-450f-963b-3d177730c3b8",
  • "redirectUrl": "https://www.example.com",
  • "rules": [
    ]
}

Get a specific policy of a listener by l7PolicyId

path Parameters
l7PolicyId
required
string

The l7Policy id

listenerId
required
string

The listener id

loadBalancerId
required
string

The Load Balancer id

projectId
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vlb-gateway/v2/{projectId}/loadBalancers/{loadBalancerId}/listeners/{listenerId}/l7policies/{l7PolicyId}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Update a policy

path Parameters
listenerId
required
string

The listener id

loadBalancerId
required
string

The Load Balancer id

policyId
required
string

The policy id

projectId
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

updateL7PolicyRequestV2

action
required
string
Enum: "REDIRECT_TO_POOL" "REDIRECT_TO_URL"

Action. This indicates how the listener will route traffic. The value can be REDIRECT_TO_POOL or REDIRECT_TO_URL.

keepQueryString
boolean

Keep the query string or not.

redirectHttpCode
integer <int32>
Enum: 301 302

Redirect HTTP code for redirecting to other URL.

redirectPoolId
string

Pool for forwarding.

redirectUrl
string

URL for forwarding.

Array of objects (L7RuleRequest)

List of rules of the policy.

Responses

Request samples

Content type
application/json
{
  • "action": "REDIRECT_TO_URL",
  • "keepQueryString": false,
  • "redirectHttpCode": 302,
  • "redirectPoolId": "pool-1a007f28-bafa-450f-963b-3d177730c3b8",
  • "redirectUrl": "https://www.example.com",
  • "rules": [
    ]
}

Delete a policy

path Parameters
listenerId
required
string

listener id

loadBalancerId
required
string

The Load Balancer id

policyId
required
string

policy id

projectId
required
string

project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'DELETE',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vlb-gateway/v2/{projectId}/loadBalancers/{loadBalancerId}/listeners/{listenerId}/l7policies/{policyId}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Reorder the L7 policies

path Parameters
listenerId
required
string

The listener id

loadBalancerId
required
string

The Load Balancer id

projectId
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

reorderPoliciesRequestV2

required
Array of objects (ReorderPolicyRequest)

List of policies to reorder, start from 1 to ....

Responses

Request samples

Content type
application/json
{
  • "policies": [
    ]
}

load-balancer-pool-rest-controller-v-2

Load Balancer Pool Rest Controller V 2

Get list of pools of a load balancer

path Parameters
loadBalancerId
required
string

The Load Balancer id

projectId
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vlb-gateway/v2/{projectId}/loadBalancers/{loadBalancerId}/pools',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Create a new pool

path Parameters
loadBalancerId
required
string

The load balancer id

projectId
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

createPoolRequestV2

algorithm
required
string
Enum: "ROUND_ROBIN" "LEAST_CONNECTIONS" "SOURCE_IP"

Algorithm of the pool. The algorithm can be "ROUND_ROBIN" or "LEAST_CONNECTIONS" or "SOURCE_IP"

object (CreateHealthMonitorRequest)
Array of objects (MemberRequest)

List of members of the pool.

poolName
required
string

Name of the pool. Only letters (a-z, A-Z, 0-9, '_', '.') are allowed and your input data must be between 5 and 50 characters.

poolProtocol
required
string
Enum: "HTTP" "TCP" "UDP" "PROXY"

Protocol of the pool.

stickiness
boolean

Enable sticky sessions.

tlsEncryption
boolean

Enable TLS Encryption.

Responses

Request samples

Content type
application/json
{
  • "algorithm": "ROUND_ROBIN",
  • "healthMonitor": {
    },
  • "members": [
    ],
  • "poolName": "pool_01",
  • "poolProtocol": "HTTP",
  • "stickiness": true,
  • "tlsEncryption": true
}

Get a specific pool

path Parameters
loadBalancerId
required
string

The Load Balancer id

poolId
required
string

The listener id

projectId
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vlb-gateway/v2/{projectId}/loadBalancers/{loadBalancerId}/pools/{poolId}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Update a pool

path Parameters
loadBalancerId
required
string

The load balancer id

poolId
required
string

The pool id

projectId
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

updatePoolRequestV2

algorithm
required
string
Enum: "ROUND_ROBIN" "LEAST_CONNECTIONS" "SOURCE_IP"

Algorithm of the pool. The algorithm can be "ROUND_ROBIN" or "LEAST_CONNECTIONS" or "SOURCE_IP"

object (UpdateHealthMonitorRequest)
stickiness
boolean

Enable sticky sessions.

tlsEncryption
boolean

Enable TLS Encryption.

Responses

Request samples

Content type
application/json
{
  • "algorithm": "ROUND_ROBIN",
  • "healthMonitor": {
    },
  • "stickiness": true,
  • "tlsEncryption": true
}

Delete a pool

path Parameters
loadBalancerId
required
string

The load balancer id

poolId
required
string

The pool id

projectId
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'DELETE',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vlb-gateway/v2/{projectId}/loadBalancers/{loadBalancerId}/pools/{poolId}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Get the health monitor associated with a specific pool

path Parameters
loadBalancerId
required
string

The Load Balancer id

poolId
required
string

pool id

projectId
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vlb-gateway/v2/{projectId}/loadBalancers/{loadBalancerId}/pools/{poolId}/healthMonitor',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Get members from a pool

path Parameters
loadBalancerId
required
string

The Load Balancer id

poolId
required
string

pool id

projectId
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vlb-gateway/v2/{projectId}/loadBalancers/{loadBalancerId}/pools/{poolId}/members',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Change list members

path Parameters
loadBalancerId
required
string

The load balancer id

poolId
required
string

The pool id

projectId
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

changeMembersRequestV2

Array of objects (MemberRequest)

List of members of the pool.

Responses

Request samples

Content type
application/json
{
  • "members": [
    ]
}

load-balancer-rest-controller-v-2

Load Balancer Rest Controller V 2

List LoadBalancers Paging

path Parameters
projectId
required
string

project id

query Parameters
dhcpOptionIds
Array of strings
encryptionTypes
Array of strings
ids
Array of strings
isCache
boolean
name
required
string
names
Array of strings
newTag.key
string
newTag.value
string
page
required
string
privateIps
Array of strings
projectId
string
publicIps
Array of strings
resourceIds
Array of strings
serverIds
Array of strings
size
required
string
status
Array of strings
subnetIds
Array of strings
tagIds
Array of strings
tags[0].key
string
tags[0].value
string
volumeTypes
Array of strings
vpcIds
Array of strings
header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vlb-gateway/v2/{projectId}/loadBalancers',
  qs: {
    dhcpOptionIds: 'SOME_ARRAY_VALUE',
    encryptionTypes: 'SOME_ARRAY_VALUE',
    ids: 'SOME_ARRAY_VALUE',
    isCache: 'SOME_BOOLEAN_VALUE',
    name: 'SOME_STRING_VALUE',
    names: 'SOME_ARRAY_VALUE',
    'newTag.key': 'SOME_STRING_VALUE',
    'newTag.value': 'SOME_STRING_VALUE',
    page: 'SOME_STRING_VALUE',
    privateIps: 'SOME_ARRAY_VALUE',
    projectId: 'SOME_STRING_VALUE',
    publicIps: 'SOME_ARRAY_VALUE',
    resourceIds: 'SOME_ARRAY_VALUE',
    serverIds: 'SOME_ARRAY_VALUE',
    size: 'SOME_STRING_VALUE',
    status: 'SOME_ARRAY_VALUE',
    subnetIds: 'SOME_ARRAY_VALUE',
    tagIds: 'SOME_ARRAY_VALUE',
    'tags[0].key': 'SOME_STRING_VALUE',
    'tags[0].value': 'SOME_STRING_VALUE',
    volumeTypes: 'SOME_ARRAY_VALUE',
    vpcIds: 'SOME_ARRAY_VALUE'
  },
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Create a new load balancer

path Parameters
projectId
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

createLBRequestV2

autoScalable
boolean

Use mode autoscale or not, default is false.

object (LbListener)
name
required
string

Load balancer's name. Only letters (a-z, A-Z, 0-9, '_','-', '.') are allowed and your input data must be between 5 and 50 characters.

packageId
required
string

Package ID of the load balancer.

object (LbPool)
scheme
required
string
Enum: "Internet" "Internal"

Schema of the load balancer, it may be Internet or Internal.

subnetId
required
string

Subnet ID for the load balancer.

Array of objects (TagRequest)

Tags of resource

type
required
string
Enum: "Layer 4" "Layer 7"

Type of the load balancer. It may be Layer 4 or Layer 7

Responses

Request samples

Content type
application/json
{
  • "autoScalable": true,
  • "listener": {
    },
  • "name": "loadbalancer_01",
  • "packageId": "f8e62cf2-d84c-11e9-8a34-2a2ae2dbcce4",
  • "pool": {
    },
  • "scheme": "Internet",
  • "subnetId": "sub-375e0685-f828-40bc-b8e9-53271fd7860d",
  • "tags": [
    ],
  • "type": "Layer 7"
}

Get All list packages

path Parameters
projectId
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vlb-gateway/v2/{projectId}/loadBalancers/all_packages',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Get list headers

path Parameters
projectId
required
string

project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vlb-gateway/v2/{projectId}/loadBalancers/headers',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Get list packages Active

path Parameters
projectId
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vlb-gateway/v2/{projectId}/loadBalancers/packages',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Get LoadBalancer By Subnet Id

path Parameters
projectId
required
string

the project id

subnetId
required
string

subnetId

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vlb-gateway/v2/{projectId}/loadBalancers/subnet/{subnetId}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Load Balancer By Load Balancer Id

path Parameters
loadBalancerId
required
string

The load balancer id

projectId
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vlb-gateway/v2/{projectId}/loadBalancers/{loadBalancerId}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Delete a load balancer

path Parameters
loadBalancerId
required
string

The load balancer id

projectId
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'DELETE',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vlb-gateway/v2/{projectId}/loadBalancers/{loadBalancerId}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Clone a load balancer from existed load balancer

path Parameters
loadBalancerId
required
string

The load balancer id

projectId
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

request

Array of objects (Certificates)

List of certificate changing

name
required
string

Load balancer's name. Only letters (a-z, A-Z, 0-9, '_','-', '.') are allowed and your input data must be between 5 and 50 characters.

packageId
required
string

Package ID of the load balancer.

Responses

Request samples

Content type
application/json
{
  • "certificates": [
    ],
  • "name": "loadbalancer_01",
  • "packageId": "f8e62cf2-d84c-11e9-8a34-2a2ae2dbcce4"
}

Get Load Balancer Metadata for Clone

path Parameters
loadBalancerId
required
string

The load balancer id

projectId
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vlb-gateway/v2/{projectId}/loadBalancers/{loadBalancerId}/cloneMetadata',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Migrate a load balancer

path Parameters
loadBalancerId
required
string

The Load Balancer id

projectId
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'PUT',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vlb-gateway/v2/{projectId}/loadBalancers/{loadBalancerId}/migrate',
  headers: {
    accept: 'application/json',
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Resize a load balancer

path Parameters
loadBalancerId
required
string

The Load Balancer id

projectId
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

request

isPoc
boolean
packageId
required
string

Package ID

Responses

Request samples

Content type
application/json
{
  • "isPoc": true,
  • "packageId": "package-1a007f28-bafa-450f-963b-3d177730c3b8"
}

load-balancer-scale-history-rest-controller-v-2

Load Balancer Scale History Rest Controller V 2

List scale history of a Load Balancer

path Parameters
loadBalancerId
required
string

The Load Balancer id

projectId
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vlb-gateway/v2/{projectId}/loadBalancers/{loadBalancerId}/scale-history',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

market-place-rest-controller

Market Place Rest Controller

List app category

header Parameters
Authorization
required
string

Access Token

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v1/app-category',
  headers: {'content-type': '*/*', Authorization: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Get app instance

path Parameters
appInstanceUuid
required
string

app instance uuid

header Parameters
Authorization
required
string

Access Token

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v1/app-instance/{appInstanceUuid}',
  headers: {'content-type': '*/*', Authorization: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Get app package detail

path Parameters
appCategoryId
required
string

app category id

appPackageId
required
string

app package id

appVersionUuid
required
string

app version uuid

header Parameters
Authorization
required
string

Access Token

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v1/app-package/{appCategoryId}/{appPackageId}/{appVersionUuid}',
  headers: {'content-type': '*/*', Authorization: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Get app template

path Parameters
appTemplateId
required
integer <int32>

app template id

header Parameters
Authorization
required
string

Access Token

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v1/app-template/{appTemplateId}',
  headers: {'content-type': '*/*', Authorization: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

migrate-market-place-rest-controller

Migrate Market Place Rest Controller

Migrate market place

query Parameters
all
required
boolean

all

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'POST',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v1/mp-migrate',
  qs: {all: 'SOME_BOOLEAN_VALUE'},
  headers: {
    accept: 'application/json',
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

network-acl-rest-controller-v-2

Network Acl Rest Controller V 2

Create Network-acl

path Parameters
projectId
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

createNetworkAclRequest

name
required
string

Name of The Network Acl table

Array of objects (TagRequest)

Tags of resource

vpc
required
string

Uuid of The VPC

Responses

Request samples

Content type
application/json
{
  • "name": "Default",
  • "tags": [
    ],
  • "vpc": "net-7e9d494c-7127-48c8-8cd9-a954d37dfd65"
}

List network-acl by project id and network acl uuid

path Parameters
projectId
required
string

The project id

query Parameters
name
required
string

name

page
required
string
Default: "1"

page

size
required
string
Default: "10"

size

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/network-acl/list',
  qs: {name: 'SOME_STRING_VALUE', page: '1', size: '10'},
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Update Inbound/Outbound Rules of Network-acl

path Parameters
aclId
required
string

The network-acl uuid

projectId
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

updateAclRulesRequest

aclId
string
Array of objects (UpdatedAclPolicyRule)
Array of objects (TagRequest)

Tags of resource

Responses

Request samples

Content type
application/json
{
  • "aclId": "string",
  • "detailAclRuleList": [
    ],
  • "tags": [
    ]
}

Delete Network-acl

path Parameters
networkAclUuid
required
string

The network-acl Uuid

projectId
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'DELETE',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/network-acl/{networkAclUuid}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Get Detail Network-Acl by uuid

path Parameters
projectId
required
string

The project id

uuid
required
string

The network-acl uuid

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/network-acl/{uuid}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Get Network-Acl Policy rules (inbound/outbound) by uuid

path Parameters
projectId
required
string

The project id

uuid
required
string

The network-acl uuid

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/network-acl/{uuid}/rules',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Update associated Subnets ACL of Network-Acl

path Parameters
projectId
required
string

The project id

uuid
required
string

The network-acl uuid

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

updateSubnetsRequest

aclId
string

aclId

subnetUuids
Array of strings

The updated subnets uuid list of network-acl

Array of objects (TagRequest)

Tags of resource

Responses

Request samples

Content type
application/json
{
  • "aclId": "string",
  • "subnetUuids": [
    ],
  • "tags": [
    ]
}

network-interface-elastic-rest-controller-v-2

Network Interface Elastic Rest Controller V 2

List Network Interface Elastic

path Parameters
projectId
required
string

The project id

query Parameters
name
string

name

page
integer <int32>

page

size
integer <int32>

size

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/network-interfaces-elastic',
  qs: {
    name: 'SOME_STRING_VALUE',
    page: 'SOME_INTEGER_VALUE',
    size: 'SOME_INTEGER_VALUE'
  },
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Create Network Interface Elastic

path Parameters
projectId
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

createNetworkInterfaceRequest

name
required
string

Name of network interface

securityGroupIds
Array of strings
Array of objects (TagRequest)

Tags of resource

Responses

Request samples

Content type
application/json
{
  • "name": "network-interface",
  • "securityGroupIds": [
    ],
  • "tags": [
    ]
}

Get Network Interface Elastic

path Parameters
networkInterfaceId
required
string

The network interface id

projectId
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/network-interfaces-elastic/{networkInterfaceId}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Delete Network Interface Elastic

path Parameters
networkInterfaceId
required
string

The network interface id

projectId
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'DELETE',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/network-interfaces-elastic/{networkInterfaceId}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Rename Network Interface Elastic

path Parameters
networkInterfaceId
required
string

The network interface id

projectId
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

renameNetworkInterfaceRequest

name
required
string

Name of network interface

Array of objects (TagRequest)

Tags of resource

Responses

Request samples

Content type
application/json
{
  • "name": "network-interface",
  • "tags": [
    ]
}

network-rest-controller-v-2

Network Rest Controller V 2

List network

path Parameters
projectId
required
string

project id

query Parameters
dhcpOptionIds
Array of strings
encryptionTypes
Array of strings
ids
Array of strings
isCache
boolean
name
string
names
Array of strings
newTag.key
string
newTag.value
string
page
integer <int32>
privateIps
Array of strings
projectId
string
publicIps
Array of strings
resourceIds
Array of strings
serverIds
Array of strings
size
integer <int32>
status
Array of strings
subnetIds
Array of strings
tagIds
Array of strings
tags[0].key
string
tags[0].value
string
volumeTypes
Array of strings
vpcIds
Array of strings
header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/networks',
  qs: {
    dhcpOptionIds: 'SOME_ARRAY_VALUE',
    encryptionTypes: 'SOME_ARRAY_VALUE',
    ids: 'SOME_ARRAY_VALUE',
    isCache: 'SOME_BOOLEAN_VALUE',
    name: 'SOME_STRING_VALUE',
    names: 'SOME_ARRAY_VALUE',
    'newTag.key': 'SOME_STRING_VALUE',
    'newTag.value': 'SOME_STRING_VALUE',
    page: 'SOME_INTEGER_VALUE',
    privateIps: 'SOME_ARRAY_VALUE',
    projectId: 'SOME_STRING_VALUE',
    publicIps: 'SOME_ARRAY_VALUE',
    resourceIds: 'SOME_ARRAY_VALUE',
    serverIds: 'SOME_ARRAY_VALUE',
    size: 'SOME_INTEGER_VALUE',
    status: 'SOME_ARRAY_VALUE',
    subnetIds: 'SOME_ARRAY_VALUE',
    tagIds: 'SOME_ARRAY_VALUE',
    'tags[0].key': 'SOME_STRING_VALUE',
    'tags[0].value': 'SOME_STRING_VALUE',
    volumeTypes: 'SOME_ARRAY_VALUE',
    vpcIds: 'SOME_ARRAY_VALUE'
  },
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Create network

path Parameters
projectId
required
string

projectId

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

createNetworkRequest

cidr
required
string

Subnet of Network (/16).

name
required
string

Name of the Network

Array of objects (TagRequest)

Tags of resource

Responses

Request samples

Content type
application/json
{
  • "cidr": "10.2.0.0/16",
  • "name": "Network_01",
  • "tags": [
    ]
}

List network active

path Parameters
projectId
required
string

project id

query Parameters
page
integer <int32>

page

size
integer <int32>

size

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/networks/active',
  qs: {page: 'SOME_INTEGER_VALUE', size: 'SOME_INTEGER_VALUE'},
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Get network

path Parameters
networkId
required
string

networkId

projectId
required
string

projectId

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/networks/{networkId}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Delete network

path Parameters
networkId
required
string

networkId

projectId
required
string

projectId

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'DELETE',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/networks/{networkId}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Edit network

path Parameters
networkId
required
string

networkId

projectId
required
string

projectId

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

updateNetworkRequest

name
required
string

Name of the Network

Array of objects (TagRequest)

Tags of resource

Responses

Request samples

Content type
application/json
{
  • "name": "Network_01",
  • "tags": [
    ]
}

Edit network dhcp option

path Parameters
networkId
required
string

networkId

projectId
required
string

projectId

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

updateNetworkRequest

dhcpOptionId
required
string

Dhcp Option Id

Array of objects (TagRequest)

Tags of resource

Responses

Request samples

Content type
application/json
{
  • "dhcpOptionId": "dop-xxxxx-xxxx-xxxx",
  • "tags": [
    ]
}

persistent-volume-rest-controller-v-2

Persistent Volume Rest Controller V 2

List Persistent Volume

path Parameters
projectId
required
string

The project id

query Parameters
name
string

name

page
integer <int32>

page

size
integer <int32>

size

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/persistent-volumes',
  qs: {
    name: 'SOME_STRING_VALUE',
    page: 'SOME_INTEGER_VALUE',
    size: 'SOME_INTEGER_VALUE'
  },
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Delete Persistent Volume

path Parameters
projectId
required
string

The project id

pvId
required
string

The persistent volume id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

deletePersistentVolumeBackendRequest

forceDelete
boolean
persistentVolumeId
string
Array of objects (TagRequest)

Tags of resource

Responses

Request samples

Content type
application/json
{
  • "forceDelete": true,
  • "persistentVolumeId": "string",
  • "tags": [
    ]
}

project-rest-controller

Project Rest Controller

listProject

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v1/projects',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

getProject

path Parameters
project_id
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v1/projects/{project_id}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

protocol-rest-controller-v-2

Protocol Rest Controller V 2

List Protocol Supported

header Parameters
Authorization
required
string

Access Token

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/protocols',
  headers: {'content-type': '*/*', Authorization: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

quota-rest-controller-v-2

Quota Rest Controller V 2

List Quota-used

path Parameters
projectId
required
string

project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/quotas/quotaUsed',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

region-controller-v-2

Region Controller V 2

Get All Region

path Parameters
projectId
required
string

projectId

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/region',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Check userId belong to Region

path Parameters
projectId
required
string

projectId

regionId
required
string

regionId

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/region/{regionId}/users/validation',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

route-table-rest-controller-v-2

Route Table Rest Controller V 2

List Route Table V2

path Parameters
projectId
required
string

project id

query Parameters
name
required
string

name

page
required
string
Default: "1"

page

size
required
string
Default: "10"

size

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/route-table',
  qs: {name: 'SOME_STRING_VALUE', page: '1', size: '10'},
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Create Route-table

path Parameters
projectId
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

createReq

name
required
string

Name of The route table

networkId
required
string

UUID of The VPC

Array of objects (RouteRequest)

List of routes for the Route Table

Array of objects (TagRequest)

Tags of resource

Responses

Request samples

Content type
application/json
{
  • "name": "Default",
  • "networkId": "net-7e9d494c-7127-48c8-8cd9-a954d37dfd65",
  • "routes": [
    ],
  • "tags": [
    ]
}

List Route from Route-Table

path Parameters
projectId
required
string

projectId

routeTableId
required
string

routeTableId

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/route-table/route/{routeTableId}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Delete Route Table

path Parameters
projectId
required
string

projectId

routeId
required
string

routeId

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'DELETE',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/route-table/{routeId}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Get Route table by uuid

path Parameters
projectId
required
string

project id

uuid
required
string

The route-table uuid

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/route-table/{uuid}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Add or remove Route to Route-Table

path Parameters
projectId
required
string

The project id

uuid
required
string

The route-table uuid

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

changeRoutesReq

Array of objects (RouteRequest)

The updated routes list of route-table

Array of objects (TagRequest)

Tags of resource

Responses

Request samples

Content type
application/json
{
  • "routes": [
    ],
  • "tags": [
    ]
}

secgroup-rest-controller-v-2

Secgroup Rest Controller V 2

List SecurityGroup Paging

path Parameters
projectId
required
string

project id

query Parameters
dhcpOptionIds
Array of strings
encryptionTypes
Array of strings
ids
Array of strings
isCache
boolean
name
required
string
names
Array of strings
newTag.key
string
newTag.value
string
page
required
string
privateIps
Array of strings
projectId
string
publicIps
Array of strings
resourceIds
Array of strings
serverIds
Array of strings
size
required
string
status
Array of strings
subnetIds
Array of strings
tagIds
Array of strings
tags[0].key
string
tags[0].value
string
volumeTypes
Array of strings
vpcIds
Array of strings
header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/secgroups',
  qs: {
    dhcpOptionIds: 'SOME_ARRAY_VALUE',
    encryptionTypes: 'SOME_ARRAY_VALUE',
    ids: 'SOME_ARRAY_VALUE',
    isCache: 'SOME_BOOLEAN_VALUE',
    name: 'SOME_STRING_VALUE',
    names: 'SOME_ARRAY_VALUE',
    'newTag.key': 'SOME_STRING_VALUE',
    'newTag.value': 'SOME_STRING_VALUE',
    page: 'SOME_STRING_VALUE',
    privateIps: 'SOME_ARRAY_VALUE',
    projectId: 'SOME_STRING_VALUE',
    publicIps: 'SOME_ARRAY_VALUE',
    resourceIds: 'SOME_ARRAY_VALUE',
    serverIds: 'SOME_ARRAY_VALUE',
    size: 'SOME_STRING_VALUE',
    status: 'SOME_ARRAY_VALUE',
    subnetIds: 'SOME_ARRAY_VALUE',
    tagIds: 'SOME_ARRAY_VALUE',
    'tags[0].key': 'SOME_STRING_VALUE',
    'tags[0].value': 'SOME_STRING_VALUE',
    volumeTypes: 'SOME_ARRAY_VALUE',
    vpcIds: 'SOME_ARRAY_VALUE'
  },
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Create security group

path Parameters
projectId
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

createReq

description
string

description for secgroup.

name
required
string

Name of the Secgroup

Array of objects (TagRequest)

Tags of resource

Responses

Request samples

Content type
application/json
{
  • "description": "string",
  • "name": "Secgroup_01",
  • "tags": [
    ]
}

Security Group By Security Group Id

path Parameters
projectId
required
string

The project id

secgroupId
required
string

The secgroup id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/secgroups/{secgroupId}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Update security group

path Parameters
projectId
required
string

The project id

secgroupId
required
string

The secgroup id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

editReq

description
string

description for secgroup.

name
required
string

Name of the Secgroup

Array of objects (TagRequest)

Tags of resource

Responses

Request samples

Content type
application/json
{
  • "description": "string",
  • "name": "Secgroup_01",
  • "tags": [
    ]
}

Delete security group

path Parameters
projectId
required
string

The project id

secgroupId
required
string

The secgroup id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'DELETE',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/secgroups/{secgroupId}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Security Group Rule By Security Group Id

path Parameters
projectId
required
string

The project id

secgroupId
required
string

The secgroup id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/secgroups/{secgroupId}/secGroupRules',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Infomation's Server of Security Group

path Parameters
projectId
required
string

The project id

secgroupId
required
string

The secgroup id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/secgroups/{secgroupId}/servers',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

secgroup-rule-rest-controller-v-2

Secgroup Rule Rest Controller V 2

Create security group rule

path Parameters
projectId
required
string

The project id

secgroupId
required
string

Security Group Id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

req

description
string

Description for security group rule.

direction
required
string

"ingress" or "egress"

etherType
required
string

"IPv4" or "IPv6"

portRangeMax
required
integer <int32>

Upper bound of range port.

portRangeMin
required
integer <int32>

Lower bound of range port.

protocol
required
string

"TCP", "UDP", "ICMP", ...

remoteIpPrefix
required
string

Ip Prefix of source/target.

Array of objects (TagRequest)

Tags of resource

Responses

Request samples

Content type
application/json
{
  • "description": "string",
  • "direction": "egress",
  • "etherType": "IPv4",
  • "portRangeMax": 65335,
  • "portRangeMin": 0,
  • "protocol": "TCP",
  • "remoteIpPrefix": "169.60.20.0/24",
  • "tags": [
    ]
}

List SecurityGroup Rule Sample

path Parameters
projectId
required
string

project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/secgroups/{secgroupId}/secgroupRules/samples',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Security Group By Security Group Id

path Parameters
projectId
required
string

The project id

secgroupRuleId
required
string

secgroupRuleId

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/secgroups/{secgroupId}/secgroupRules/{secgroupRuleId}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Update security group rule

path Parameters
projectId
required
string

The project id

secgroupRuleId
required
string

The secgroup rule id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

updateSecurityGroupRuleRequest

description
string

Description for security group rule.

Array of objects (TagRequest)

Tags of resource

Responses

Request samples

Content type
application/json
{
  • "description": "string",
  • "tags": [
    ]
}

Delete security group rule

path Parameters
projectId
required
string

The project id

secgroupRuleId
required
string

The secgroup rule id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'DELETE',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/secgroups/{secgroupId}/secgroupRules/{secgroupRuleId}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

server-group-rest-controller-v-2

Server Group Rest Controller V 2

List All server group

path Parameters
projectId
required
string

project id

query Parameters
name
string

name

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/serverGroups',
  qs: {name: 'SOME_STRING_VALUE'},
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Create server group

path Parameters
projectId
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

createServerGroupRequest

description
string

Description of server group

name
required
string

Name of the server group

policyId
required
string

Policy id of server group

Array of objects (TagRequest)

Tags of resource

Responses

Request samples

Content type
application/json
{
  • "description": "This is my server group",
  • "name": "Group-01",
  • "policyId": "7916f5ac-cff2-11eb-b8bc-0242ac130003",
  • "tags": [
    ]
}

List server group policy

path Parameters
projectId
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/serverGroups/policies',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Get server group

path Parameters
projectId
required
string

The project id

serverGroupId
required
string

The server group id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/serverGroups/{serverGroupId}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Update server group

path Parameters
projectId
required
string

The project id

serverGroupId
required
string

The server group id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

updateServerGroupRequest

description
string

description for Server Group.

name
required
string

Name of the Server Group

serverGroupId
required
string

Id of the server group

Array of objects (TagRequest)

Tags of resource

Responses

Request samples

Content type
application/json
{
  • "description": "string",
  • "name": "Server Group_01",
  • "serverGroupId": "Group-01",
  • "tags": [
    ]
}

Delete server group

path Parameters
projectId
required
string

The project id

serverGroupId
required
string

The server group id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'DELETE',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/serverGroups/{serverGroupId}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

server-rest-controller-v-2

Server Rest Controller V 2

List server

path Parameters
projectId
required
string

The project id

query Parameters
dhcpOptionIds
Array of strings
encryptionTypes
Array of strings
ids
Array of strings
isCache
boolean
name
string
names
Array of strings
newTag.key
string
newTag.value
string
page
integer <int32>
privateIps
Array of strings
projectId
string
publicIps
Array of strings
resourceIds
Array of strings
serverIds
Array of strings
size
integer <int32>
status
Array of strings
subnetIds
Array of strings
tagIds
Array of strings
tags[0].key
string
tags[0].value
string
volumeTypes
Array of strings
vpcIds
Array of strings
header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/servers',
  qs: {
    dhcpOptionIds: 'SOME_ARRAY_VALUE',
    encryptionTypes: 'SOME_ARRAY_VALUE',
    ids: 'SOME_ARRAY_VALUE',
    isCache: 'SOME_BOOLEAN_VALUE',
    name: 'SOME_STRING_VALUE',
    names: 'SOME_ARRAY_VALUE',
    'newTag.key': 'SOME_STRING_VALUE',
    'newTag.value': 'SOME_STRING_VALUE',
    page: 'SOME_INTEGER_VALUE',
    privateIps: 'SOME_ARRAY_VALUE',
    projectId: 'SOME_STRING_VALUE',
    publicIps: 'SOME_ARRAY_VALUE',
    resourceIds: 'SOME_ARRAY_VALUE',
    serverIds: 'SOME_ARRAY_VALUE',
    size: 'SOME_INTEGER_VALUE',
    status: 'SOME_ARRAY_VALUE',
    subnetIds: 'SOME_ARRAY_VALUE',
    tagIds: 'SOME_ARRAY_VALUE',
    'tags[0].key': 'SOME_STRING_VALUE',
    'tags[0].value': 'SOME_STRING_VALUE',
    volumeTypes: 'SOME_ARRAY_VALUE',
    vpcIds: 'SOME_ARRAY_VALUE'
  },
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Create server

path Parameters
projectId
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

createServerRequest

attachFloating
boolean

Attach floating IP

backupInstancePointId
string

Backup instance point ID

Array of objects (ConfigVolumeRestore)

List Backup volume point Config

createdFrom
string

Created from: NEW, BACKUP, SNAPSHOT

dataDiskEncryptionType
string

Type encryption of data volume

dataDiskName
string

Name of data volume

dataDiskSize
integer <int32>
dataDiskTypeId
string

ID of data volume type

enableBackup
boolean

Enable backup: false, else: true

encryptionVolume
required
boolean

Encryption volume

expirePassword
boolean

Skip change password: false, else: true

externalNetworkInterfaceId
string

ID of the external network interface

flavorId
required
string

ID of the flavor

hostGroupId
string

Host group. You can choose if having multiple host group

imageId
required
string

ID of the image

name
required
string

Name of the server

networkId
required
string

ID of the network

Array of objects (NetworkRequest)

List Network

osLicence
boolean

Licence of OS

product
string

Product of server

rootDiskEncryptionType
string

Type encryption of boot volume

rootDiskSize
required
integer <int32>

Size of boot volume

rootDiskTypeId
required
string

ID of boot volume type

securityGroup
Array of strings

ID of the SecGroups

serverGroupId
string

Server group ID

snapshotInstancePointId
string

Snapshot instance point ID

sshKeyId
string

ID of SSH key

subnetId
required
string

ID of the subnet

Array of objects (TagRequest)

Tags of resource

type
string

Type of product

userData
string

User data

userDataBase64Encoded
boolean

User data has already been base64 encoded

userName
string

name of user

userPassword
string

password of user

Responses

Request samples

Content type
application/json
{
  • "attachFloating": false,
  • "backupInstancePointId": "string",
  • "configVolumeRestores": [
    ],
  • "createdFrom": "NEW",
  • "dataDiskEncryptionType": "aes-xts-plain64_256",
  • "dataDiskName": "volume data",
  • "dataDiskSize": 0,
  • "dataDiskTypeId": "vtype-6d30737c-08aa-41f8-8bb1-d486c94ccf69",
  • "enableBackup": true,
  • "encryptionVolume": false,
  • "expirePassword": true,
  • "externalNetworkInterfaceId": "net-in-d1314dfd-31ac-4b5f-ad9a-a5a489ecfa5d",
  • "flavorId": "flav-c41b827e-730a-475f-b181-c0d1c7acc6d4",
  • "hostGroupId": "EB2690D8-D303-42B4-A083-DF170CEF7CA0",
  • "imageId": "img-5c6639ad-8b02-4402-8be4-5bc0c6a57d32",
  • "name": "Server_01",
  • "networkId": "net-d1314dfd-31ac-4b5f-ad9a-a5a489ecfa5d",
  • "networks": [
    ],
  • "osLicence": false,
  • "product": "vServer",
  • "rootDiskEncryptionType": "aes-xts-plain64_256",
  • "rootDiskSize": 20,
  • "rootDiskTypeId": "vtype-6d30737c-08aa-41f8-8bb1-d486c94ccf69",
  • "securityGroup": [
    ],
  • "serverGroupId": "server-group-d4d6a036-1955-4c5f-a40d-e789d26cf49d",
  • "snapshotInstancePointId": "string",
  • "sshKeyId": "SSH_Key",
  • "subnetId": "sub-b7716e75-10fa-4d18-9987-d68273f49386",
  • "tags": [
    ],
  • "type": "vServer",
  • "userData": "string",
  • "userDataBase64Encoded": true,
  • "userName": "stackops",
  • "userPassword": "password"
}

Get Attached External network Interface

path Parameters
interfaceNetworkInterfaceId
required
string

The interface network interface id

projectId
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/servers/external-network-interfaces/{interfaceNetworkInterfaceId}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

List server by subnet

path Parameters
projectId
required
string

The project id

subnetId
required
string

The subnet id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/servers/subnets/{subnetId}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Get server by id

path Parameters
projectId
required
string

The project id

serverId
required
string

The server id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/servers/{serverId}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Delete Server

path Parameters
projectId
required
string

The project id

serverId
required
string

The server id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

deleteServerRequest

deleteAllVolume
boolean

Delete all volume are attached

Array of objects (TagRequest)

Tags of resource

Responses

Request samples

Content type
application/json
{
  • "deleteAllVolume": true,
  • "tags": [
    ]
}

List Action Of Server

path Parameters
projectId
required
string

The project id

serverId
required
string

The server id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/servers/{serverId}/actions',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Get console log

path Parameters
projectId
required
string

The project id

serverId
required
string

The server id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/servers/{serverId}/console-log',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Get console url

path Parameters
projectId
required
string

The project id

serverId
required
string

The server id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/servers/{serverId}/console-url',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Attach External Network Interface

path Parameters
projectId
required
string

The project id

serverId
required
string

The server id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

attachExternalNetworkInterfaceRequest

externalNetworkInterfaceId
string

External network interface id

Array of objects (TagRequest)

Tags of resource

Responses

Request samples

Content type
application/json
{
  • "externalNetworkInterfaceId": "net-a332cc50-8e24-4a45-ad9f-4136c7358503",
  • "tags": [
    ]
}

Detach External Network Interface

path Parameters
projectId
required
string

The project id

serverId
required
string

The server id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

detachExternalNetworkInterfaceRequest

networkInterfaceId
string

Network interface id

Array of objects (TagRequest)

Tags of resource

Responses

Request samples

Content type
application/json
{
  • "networkInterfaceId": "net-a332cc50-8e24-4a45-ad9f-4136c7358503",
  • "tags": [
    ]
}

Attach Internal Network Interface

path Parameters
projectId
required
string

The project id

serverId
required
string

The server id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

attachNetworkInterfaceRequest

Array of objects (AttachSubnetRequest)

List subnet request

Array of objects (TagRequest)

Tags of resource

Responses

Request samples

Content type
application/json
{
  • "subnetRequests": [
    ],
  • "tags": [
    ]
}

Detach Internal Network Interface

path Parameters
projectId
required
string

The project id

serverId
required
string

The server id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

detachNetworkInterfaceRequest

networkInterfaceIds
Array of strings

List Id of network interface

Array of objects (TagRequest)

Tags of resource

Responses

Request samples

Content type
application/json
{
  • "networkInterfaceIds": [
    ],
  • "tags": [
    ]
}

Attach Internal Network Interface With Floating Ip

path Parameters
projectId
required
string

The project id

serverId
required
string

The server id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

attachNetworkInterfaceWithWanIpRequest

ip
string

IP of subnet

serverId
string

Id of server

subnetId
string

Id of subnet

Array of objects (TagRequest)

Tags of resource

wanIpId
string

Id of wan IP

Responses

Request samples

Content type
application/json
{
  • "ip": "10.1.1.5",
  • "serverId": "ins-a332cc50-8e24-4a45-ad9f-4136c7358503",
  • "subnetId": "sub-a332cc50-8e24-4a45-ad9f-4136c7358503",
  • "tags": [
    ],
  • "wanIpId": "wan-a332cc50-8e24-4a45-ad9f-4136c7358503"
}

Detach Internal Network Interface With Floating Ip

path Parameters
projectId
required
string

The project id

serverId
required
string

The server id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

detachNetworkInterfaceWithWanIpRequest

networkInterfaceId
string

List Id of network interface

serverId
string

Id of server

Array of objects (TagRequest)

Tags of resource

Responses

Request samples

Content type
application/json
{
  • "networkInterfaceId": "net-a332cc50-8e24-4a45-ad9f-4136c7358503",
  • "serverId": "ins-a332cc50-8e24-4a45-ad9f-4136c7358503",
  • "tags": [
    ]
}

Migrate Server

path Parameters
projectId
required
string

The project id

serverId
required
string

The server id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

migrateServerRequest

action
string

Action migrate. The action can be "SNAPSHOT" or "MIGRATE" or "CONFIRM-MIGRATE"

confirmMigrate
boolean

Confirm migrate or rollback

Array of objects (TagRequest)

Tags of resource

Responses

Request samples

Content type
application/json
{
  • "action": "SNAPSHOT",
  • "confirmMigrate": true,
  • "tags": [
    ]
}

List Network Interface Of Server

path Parameters
projectId
required
string

The project id

serverId
required
string

The server id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/servers/{serverId}/network-interfaces',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Reboot server

path Parameters
projectId
required
string

The project id

serverId
required
string

The server id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'PUT',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/servers/{serverId}/reboot',
  headers: {
    accept: 'application/json',
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Rename Server

path Parameters
projectId
required
string

The project id

serverId
required
string

The server id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

renameServerRequest

newName
required
string

New name of server

Array of objects (TagRequest)

Tags of resource

Responses

Request samples

Content type
application/json
{
  • "newName": "server01",
  • "tags": [
    ]
}

Change flavor of server

path Parameters
projectId
required
string

The project id

serverId
required
string

The server id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

resizeServerRequest

flavorId
required
string

Id of flavor

hostGroupId
string

Host group. You can choose if having multiple host group

serverId
required
string

Id of server

Array of objects (TagRequest)

Tags of resource

Responses

Request samples

Content type
application/json
{
  • "flavorId": "flav-c41b827e-730a-475f-b181-c0d1c7acc6d4",
  • "hostGroupId": "EB2690D8-D303-42B4-A083-DF170CEF7CA0",
  • "serverId": "ins-a332cc50-8e24-4a45-ad9f-4136c7358503",
  • "tags": [
    ]
}

List Sec Group Of Server

path Parameters
projectId
required
string

The project id

serverId
required
string

The server id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/servers/{serverId}/sec-groups',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Create server snapshot

path Parameters
projectId
required
string

The project id

serverId
required
string

The server id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

createSnapshotServerRequest

description
required
string

Description of the snapshot

enableSnapshot
boolean
name
string

Name of the snapshot

snapshotPolicyId
string
Array of objects (TagRequest)

Tags of resource

volumeIds
Array of strings

Responses

Request samples

Content type
application/json
{
  • "description": "Description",
  • "enableSnapshot": true,
  • "name": "snapshot_server",
  • "snapshotPolicyId": "string",
  • "tags": [
    ],
  • "volumeIds": [
    ]
}

Delete snapshot server

path Parameters
projectId
required
string

The project id

serverId
required
string

The server id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'DELETE',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/servers/{serverId}/server-snapshots',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Disable auto snapshot server

path Parameters
projectId
required
string

The project id

serverId
required
string

The server id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'PUT',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/servers/{serverId}/server-snapshots/disable-auto',
  headers: {
    accept: 'application/json',
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Enable auto snapshot server

path Parameters
projectId
required
string

The project id

serverId
required
string

The server id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'PUT',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/servers/{serverId}/server-snapshots/enable-auto',
  headers: {
    accept: 'application/json',
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Update policy snapshot server

path Parameters
projectId
required
string

The project id

serverId
required
string

The server id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

updatePolicySnapshotServerRequest

snapshotPolicyId
string
Array of objects (TagRequest)

Tags of resource

Responses

Request samples

Content type
application/json
{
  • "snapshotPolicyId": "string",
  • "tags": [
    ]
}

List shared snapshot server

path Parameters
projectId
required
string

The project id

serverId
required
string

The server id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/servers/{serverId}/server-snapshots/shared',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Revoke shared snapshot server

path Parameters
projectId
required
string

The project id

serverId
required
string

The server id

sharedSnapshotId
required
string

The shared snapshot id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'DELETE',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/servers/{serverId}/server-snapshots/shared/{sharedSnapshotId}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

List snapshot of server

path Parameters
projectId
required
string

The project id

serverId
required
string

The server id

query Parameters
page
integer <int32>

page

size
integer <int32>

size

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/servers/{serverId}/snapshots',
  qs: {page: 'SOME_INTEGER_VALUE', size: 'SOME_INTEGER_VALUE'},
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Create server snapshot now

path Parameters
projectId
required
string

The project id

serverId
required
string

The server id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

createSnapshotServerNowRequest

description
required
string

Description of the snapshot

isPermanently
boolean

Permanently or not

name
required
string

Name of the snapshot

retainedDays
integer <int32>

Retained days of snapshot

Array of objects (TagRequest)

Tags of resource

Responses

Request samples

Content type
application/json
{
  • "description": "Description",
  • "isPermanently": false,
  • "name": "snapshot_server",
  • "retainedDays": 7,
  • "tags": [
    ]
}

Get snapshot of server detail

path Parameters
projectId
required
string

The project id

serverId
required
string

The server id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/servers/{serverId}/snapshots/detail',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Rollback server by snapshot point ID

path Parameters
projectId
required
string

The project id

serverId
required
string

The server id

snapshotServerPointId
required
string

The snapshot server point id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

rollbackServerRequest

restartServerWhenRevertCompleted
boolean
serverId
string
snapshotServerPointId
string
Array of objects (TagRequest)

Tags of resource

Responses

Request samples

Content type
application/json
{
  • "restartServerWhenRevertCompleted": true,
  • "serverId": "string",
  • "snapshotServerPointId": "string",
  • "tags": [
    ]
}

Delete snapshot by snapshot point ID

path Parameters
projectId
required
string

The project id

serverId
required
string

The server id

snapshotServerPointId
required
string

The snapshot server point id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'DELETE',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/servers/{serverId}/snapshots/{snapshotServerPointId}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Start server

path Parameters
projectId
required
string

The project id

serverId
required
string

The server id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'PUT',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/servers/{serverId}/start',
  headers: {
    accept: 'application/json',
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Stop server

path Parameters
projectId
required
string

The project id

serverId
required
string

The server id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'PUT',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/servers/{serverId}/stop',
  headers: {
    accept: 'application/json',
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Update SecGroups of server

path Parameters
projectId
required
string

The project id

serverId
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

changeSecGroupRequest

securityGroup
Array of strings

Id of the SecGroups

serverId
required
string

Id of server

Array of objects (TagRequest)

Tags of resource

Responses

Request samples

Content type
application/json
{
  • "securityGroup": [
    ],
  • "serverId": "ins-a332cc50-8e24-4a45-ad9f-4136c7358503",
  • "tags": [
    ]
}

Attach Wan IP

path Parameters
projectId
required
string

The project id

serverId
required
string

The server id

wanIpId
required
string

The wan ip id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

attachDetachWanIPRequest

networkInterfaceId
string

Id of network interface

Array of objects (TagRequest)

Tags of resource

Responses

Request samples

Content type
application/json
{
  • "networkInterfaceId": "net-a332cc50-8e24-4a45-ad9f-4136c7358503",
  • "tags": [
    ]
}

Detach Wan IP

path Parameters
projectId
required
string

The project id

serverId
required
string

The server id

wanIpId
required
string

The wan ip id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

attachDetachWanIPRequest

networkInterfaceId
string

Id of network interface

Array of objects (TagRequest)

Tags of resource

Responses

Request samples

Content type
application/json
{
  • "networkInterfaceId": "net-a332cc50-8e24-4a45-ad9f-4136c7358503",
  • "tags": [
    ]
}

ssh-key-rest-controller-v-2

SSH Key Rest Controller V 2

List All SSH key

path Parameters
projectId
required
string

The project id

query Parameters
name
string

name

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/sshKeys',
  qs: {name: 'SOME_STRING_VALUE'},
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Create SSH key

path Parameters
projectId
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

req

name
required
string

Name of the SSH key

Array of objects (TagRequest)

Tags of resource

Responses

Request samples

Content type
application/json
{
  • "name": "SSH_Key",
  • "tags": [
    ]
}

Import SSH key

path Parameters
projectId
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

importSSHKeyRequest

name
required
string

Name of the SSH key

pubKey
string
Array of objects (TagRequest)

Tags of resource

Responses

Request samples

Content type
application/json
{
  • "name": "SSH_Key",
  • "pubKey": "string",
  • "tags": [
    ]
}

Get SSH key

path Parameters
projectId
required
string

The project id

sshKeyId
required
string

The ssh key id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/sshKeys/{sshKeyId}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Delete SSH key

path Parameters
projectId
required
string

The project id

sshKeyId
required
string

The ssh-key id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'DELETE',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/sshKeys/{sshKeyId}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

subnet-rest-controller-v-2

Subnet Rest Controller V 2

List subnet of network

path Parameters
networkId
required
string

networkId

projectId
required
string

projectId

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/networks/{networkId}/subnets',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

createSubnet

path Parameters
networkId
required
string

networkId

projectId
required
string

projectId

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

req

cidr
required
string

CIDR of Subnet, must be contained in its network.

name
required
string

Name of the Subnet

Array of objects (CreateSecondarySubnetRequest)
Array of objects (TagRequest)

Tags of resource

Responses

Request samples

Content type
application/json
{
  • "cidr": "10.2.12.0/24",
  • "name": "Subnet_01",
  • "secondarySubnetRequests": [
    ],
  • "tags": [
    ]
}

Get subnet by ID

path Parameters
networkId
required
string

networkId

projectId
required
string

projectId

subnetId
required
string

subnetId

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/networks/{networkId}/subnets/{subnetId}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Delete subnet

path Parameters
networkId
required
string

networkId

projectId
required
string

projectId

subnetId
required
string

subnetId

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'DELETE',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/networks/{networkId}/subnets/{subnetId}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Edit subnet

path Parameters
networkId
required
string

networkId

projectId
required
string

projectId

subnetId
required
string

subnetId

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

updateSubnetRequest

name
required
string

Name of the subnet

Array of objects (CreateSecondarySubnetRequest)
Array of objects (TagRequest)

Tags of resource

Responses

Request samples

Content type
application/json
{
  • "name": "Subnet_01",
  • "secondarySubnetRequests": [
    ],
  • "tags": [
    ]
}

Create Secondary Subnet

path Parameters
networkId
required
string

networkId

projectId
required
string

projectId

subnetId
required
string

subnetId

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

createSecondarySubnetRequest

cidr
string
name
string
uuid
string

Responses

Request samples

Content type
application/json
{
  • "cidr": "string",
  • "name": "string",
  • "uuid": "string"
}

Delete Secondary Subnet

path Parameters
networkId
required
string

networkId

projectId
required
string

projectId

secondarySubnetId
required
string

secondarySubnetId

subnetId
required
string

subnetId

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'DELETE',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/networks/{networkId}/subnets/{subnetId}/secondary-subnets/{secondarySubnetId}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

tagging-rest-controller-v-2

Tagging Rest Controller V 2

List Tag

path Parameters
projectId
required
string

The project id

query Parameters
name
string

name

page
integer <int32>

page

size
integer <int32>

size

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/tag',
  qs: {
    name: 'SOME_STRING_VALUE',
    page: 'SOME_INTEGER_VALUE',
    size: 'SOME_INTEGER_VALUE'
  },
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Get Tag Quota

path Parameters
projectId
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/tag/quota',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

List tag by Resource Id

path Parameters
projectId
required
string

The project id

resourceId
required
string

The resource id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/tag/resource/{resourceId}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Update tag

path Parameters
projectId
required
string

The project id

resourceId
required
string

The resource id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

updateTagRequest

resourceId
required
string

Resource Id

resourceType
required
string

Resource Type

Array of objects (TagRequest)

List of Tag want to update

Array of objects (TagRequest)

Tags of resource

Responses

Request samples

Content type
application/json
{
  • "resourceId": "ins-2ca9132c-bf4c-467e-b57c-92a971225947",
  • "resourceType": "Server",
  • "tagRequestList": [
    ],
  • "tags": [
    ]
}

List Tag Key

path Parameters
projectId
required
string

the project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/tag/tag-key',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Get Tag Value

path Parameters
projectId
required
string

The project id

tagKey
required
string

The tag key

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/tag/tag-key/{tagKey}/tag-value',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Get Tag Detail

path Parameters
projectId
required
string

The project id

tagId
required
string

The tag id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/tag/{tagId}/resource-types/{resource-types}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

user-image-rest-controller-v-2

User Image Rest Controller V 2

List User Image

path Parameters
projectId
required
string

The project id

query Parameters
name
string

name

page
integer <int32>

page

size
integer <int32>

size

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/user-images',
  qs: {
    name: 'SOME_STRING_VALUE',
    page: 'SOME_INTEGER_VALUE',
    size: 'SOME_INTEGER_VALUE'
  },
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Create User Image

path Parameters
projectId
required
string

The project id

serverId
required
string

The server id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

createUserImageRequest

name
required
string

Name of image

Array of objects (TagRequest)

Tags of resource

Responses

Request samples

Content type
application/json
{
  • "name": "image1",
  • "tags": [
    ]
}

List User Image By ID

path Parameters
imageId
required
string

The image id

projectId
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/user-images/{imageId}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Delete User Image

path Parameters
imageId
required
string

The image id

projectId
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'DELETE',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/user-images/{imageId}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

virtual-ip-address-rest-controller-v-2

Virtual Ip Address Rest Controller V 2

List Virtual Ip Address Paging

path Parameters
projectId
required
string

project id

query Parameters
name
required
string

name

page
required
string
Default: "1"

page

size
required
string
Default: "10"

size

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/virtualIpAddress',
  qs: {name: 'SOME_STRING_VALUE', page: '1', size: '10'},
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Create Virtual Ip Address

path Parameters
projectId
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

createReq

description
string

description for Virtual IP Address.

ipAddress
string

Ip address of the Virtual IP Address

name
required
string

Name of the Virtual IP Address

subnetId
required
string

Id of the subnet

Responses

Request samples

Content type
application/json
{
  • "description": "string",
  • "ipAddress": "192.168.1.2",
  • "name": "VIP Address 01",
  • "subnetId": "sub-cfcd4f3f-4077-4923-9bf9-d19cb17f4f0b"
}

List of internal network interface for adding address pair

path Parameters
projectId
required
string

project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/virtualIpAddress/internalNetworkInterfaces',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Virtual Ip Address By virtual ip address Id

path Parameters
projectId
required
string

The project id

vipId
required
string

The virtual ip address id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/virtualIpAddress/{vipId}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Update virtual ip address

path Parameters
projectId
required
string

The project id

virtualIpAddressId
required
string

The virtual Ip AddressId id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

updateReq

description
string

description for Virtual IP Address.

name
string

Responses

Request samples

Content type
application/json
{
  • "description": "string",
  • "name": "string"
}

Delete virtual ip address

path Parameters
projectId
required
string

The project id

virtualIpAddressId
required
string

The ssh-key id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'DELETE',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/virtualIpAddress/{virtualIpAddressId}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

List address pair interfaces

path Parameters
projectId
required
string

The project id

virtualIpAddressId
required
string

The Virtual Ip Address id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/virtualIpAddress/{virtualIpAddressId}/addressPairs',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Create Address Pair

path Parameters
projectId
required
string

The project id

virtualIpAddressId
required
string

The Virtual Ip Address id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

createReq

cidr
string
internalNetworkInterfaceId
required
string

Id of the network interface

Responses

Request samples

Content type
application/json
{
  • "cidr": "string",
  • "internalNetworkInterfaceId": "net-in-617fbb01-df70-4bd1-b7c7-8c848259cd5f"
}

List specific address pair interfaces

path Parameters
addressPairId
required
string

The Address Pair id

projectId
required
string

The project id

virtualIpAddressId
required
string

The Virtual Ip Address id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/virtualIpAddress/{virtualIpAddressId}/addressPairs/{addressPairId}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Delete Address Pair

path Parameters
addressPairId
required
string

The Address Pair id

projectId
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'DELETE',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/virtualIpAddress/{virtualIpAddressId}/addressPairs/{addressPairId}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

virtual-subnet-rest-controller

Virtual Subnet Rest Controller

Delete Address Pair

path Parameters
addressPairId
required
string

The Address Pair id

projectId
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'DELETE',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/virtual-subnets/addressPairs/{addressPairId}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

List address pair interfaces

path Parameters
projectId
required
string

The project id

secondarySubnetId
required
string

The Secondary Subnet ID

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/virtual-subnets/{secondarySubnetId}/addressPairs',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Create Address Pair

path Parameters
projectId
required
string

The project id

secondarySubnetId
required
string

The Secondary Subnet ID

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

createReq

cidr
string
internalNetworkInterfaceId
required
string

Id of the network interface

Responses

Request samples

Content type
application/json
{
  • "cidr": "string",
  • "internalNetworkInterfaceId": "net-in-617fbb01-df70-4bd1-b7c7-8c848259cd5f"
}

volume-rest-controller-v-2

Volume Rest Controller V 2

List volume

path Parameters
projectId
required
string

The project id

query Parameters
dhcpOptionIds
Array of strings
encryptionTypes
Array of strings
ids
Array of strings
isCache
boolean
name
string
names
Array of strings
newTag.key
string
newTag.value
string
page
integer <int32>
privateIps
Array of strings
projectId
string
publicIps
Array of strings
resourceIds
Array of strings
serverIds
Array of strings
size
integer <int32>
status
Array of strings
subnetIds
Array of strings
tagIds
Array of strings
tags[0].key
string
tags[0].value
string
volumeTypes
Array of strings
vpcIds
Array of strings
header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/volumes',
  qs: {
    dhcpOptionIds: 'SOME_ARRAY_VALUE',
    encryptionTypes: 'SOME_ARRAY_VALUE',
    ids: 'SOME_ARRAY_VALUE',
    isCache: 'SOME_BOOLEAN_VALUE',
    name: 'SOME_STRING_VALUE',
    names: 'SOME_ARRAY_VALUE',
    'newTag.key': 'SOME_STRING_VALUE',
    'newTag.value': 'SOME_STRING_VALUE',
    page: 'SOME_INTEGER_VALUE',
    privateIps: 'SOME_ARRAY_VALUE',
    projectId: 'SOME_STRING_VALUE',
    publicIps: 'SOME_ARRAY_VALUE',
    resourceIds: 'SOME_ARRAY_VALUE',
    serverIds: 'SOME_ARRAY_VALUE',
    size: 'SOME_INTEGER_VALUE',
    status: 'SOME_ARRAY_VALUE',
    subnetIds: 'SOME_ARRAY_VALUE',
    tagIds: 'SOME_ARRAY_VALUE',
    'tags[0].key': 'SOME_STRING_VALUE',
    'tags[0].value': 'SOME_STRING_VALUE',
    volumeTypes: 'SOME_ARRAY_VALUE',
    vpcIds: 'SOME_ARRAY_VALUE'
  },
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Create volume

path Parameters
projectId
required
string

The project id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

createVolumeRequest

object (ConfigVolumeRestore)
createdFrom
string

Created from: NEW, BACKUP, SNAPSHOT

encryptionType
string

Type encryption of volume

imageId
string

Id of image

multiAttach
boolean

Multi attach volume or not

name
required
string

Name of the volume

persistentVolume
boolean

Persistent volume or not

size
required
integer <int32>

Size of volume

Array of objects (TagRequest)

Tags of resource

volumeTypeId
required
string

Id of volume type

Responses

Request samples

Content type
application/json
{
  • "configVolumeRestore": {
    },
  • "createdFrom": "NEW",
  • "encryptionType": "aes-xts-plain64_256",
  • "imageId": "img-6d30737c-08aa-41f8-8bb1-d486c94ccf69",
  • "multiAttach": true,
  • "name": "Volume",
  • "persistentVolume": true,
  • "size": 20,
  • "tags": [
    ],
  • "volumeTypeId": "vtype-6d30737c-08aa-41f8-8bb1-d486c94ccf69"
}

Get volume by server id

path Parameters
projectId
required
string

The project id

serverId
required
string

The server id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/volumes/servers/{serverId}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Get boot volume by server id

path Parameters
projectId
required
string

The project id

serverId
required
string

The volume id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/volumes/servers/{serverId}/boot',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Get volume by id

path Parameters
projectId
required
string

The project id

volumeId
required
string

The volume id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/volumes/{volumeId}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Delete volume

path Parameters
projectId
required
string

The project id

volumeId
required
string

The volume id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'DELETE',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/volumes/{volumeId}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Change Type Volume

path Parameters
projectId
required
string

The project id

volumeId
required
string

The volume id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

changeTypeVolumeRequest

action
string

Action change type. The action can be "SNAPSHOT" or "MIGRATE" or "CONFIRM-MIGRATE"

confirmMigrate
boolean

Confirm migrate or rollback

Array of objects (TagRequest)

Tags of resource

volumeTypeId
string

Id of volume type

Responses

Request samples

Content type
application/json
{
  • "action": "SNAPSHOT",
  • "confirmMigrate": true,
  • "tags": [
    ],
  • "volumeTypeId": "vol-type-a332cc50-8e24-4a45-ad9f-4136c7358503"
}

List volume

path Parameters
projectId
required
string

The project id

volumeId
required
string

The volume id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/volumes/{volumeId}/history',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

getVolumeMapping

path Parameters
projectId
required
string

The project id

volumeId
required
string

volumeId

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/volumes/{volumeId}/mapping',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Rename Volume

path Parameters
projectId
required
string

The project id

volumeId
required
string

The volume id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

renameVolumeRequest

newName
required
string

New name of volume

Array of objects (TagRequest)

Tags of resource

Responses

Request samples

Content type
application/json
{
  • "newName": "volume",
  • "tags": [
    ]
}

Resize volume

path Parameters
projectId
required
string

The project id

volumeId
required
string

The volume id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

resizeVolumeRequest

newSize
required
integer <int32>

New size of volume

newVolumeTypeId
required
string

Id of new volume type

Array of objects (TagRequest)

Tags of resource

Responses

Request samples

Content type
application/json
{
  • "newSize": 20,
  • "newVolumeTypeId": "vtype-6d30737c-08aa-41f8-8bb1-d486c94ccf69",
  • "tags": [
    ]
}

Attach volume into the server

path Parameters
projectId
required
string

The project id

serverId
required
string

The server id

volumeId
required
string

The volume id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

attachVolumeRequest

persistentVolume
boolean

Persistent volume or not

Array of objects (TagRequest)

Tags of resource

Responses

Request samples

Content type
application/json
{
  • "persistentVolume": true,
  • "tags": [
    ]
}

Detach volume into the server

path Parameters
projectId
required
string

The project id

serverId
required
string

The server id

volumeId
required
string

The volume id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

detachVolumeRequest

persistentVolume
boolean

Persistent volume or not

Array of objects (TagRequest)

Tags of resource

Responses

Request samples

Content type
application/json
{
  • "persistentVolume": true,
  • "tags": [
    ]
}

List snapshot of volume

path Parameters
projectId
required
string

The project id

volumeId
required
string

The volume id

query Parameters
page
integer <int32>

page

size
integer <int32>

size

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/volumes/{volumeId}/snapshots',
  qs: {page: 'SOME_INTEGER_VALUE', size: 'SOME_INTEGER_VALUE'},
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Create volume snapshot now

path Parameters
projectId
required
string

The project id

volumeId
required
string

The volume id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

createSnapshotVolumeNowRequest

description
required
string

Description of the snapshot

isPermanently
boolean

Permanently or not

name
required
string

Name of the snapshot

retainedDays
integer <int32>

Retained days of snapshot

Array of objects (TagRequest)

Tags of resource

Responses

Request samples

Content type
application/json
{
  • "description": "Description",
  • "isPermanently": false,
  • "name": "snapshot_volume",
  • "retainedDays": 7,
  • "tags": [
    ]
}

Rollback volume by snapshot point ID

path Parameters
projectId
required
string

The project id

snapshotVolumePointId
required
string

The snapshot volume point id

volumeId
required
string

The volume id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

rollbackVolumeRequest

restartServerWhenRevertCompleted
boolean
snapshotVolumePointId
string
Array of objects (TagRequest)

Tags of resource

volumeId
string

Responses

Request samples

Content type
application/json
{
  • "restartServerWhenRevertCompleted": true,
  • "snapshotVolumePointId": "string",
  • "tags": [
    ],
  • "volumeId": "string"
}

Delete snapshot by snapshot point ID

path Parameters
projectId
required
string

The project id

snapshotVolumePointId
required
string

The snapshot volume point id

volumeId
required
string

The volume id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'DELETE',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/volumes/{volumeId}/snapshots/{snapshotVolumePointId}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Delete snapshot volume

path Parameters
projectId
required
string

The project id

volumeId
required
string

The volume id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'DELETE',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/volumes/{volumeId}/volume-snapshots',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Get snapshot volume detail

path Parameters
projectId
required
string

The project id

volumeId
required
string

The volume id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/volumes/{volumeId}/volume-snapshots/detail',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Update policy snapshot volume

path Parameters
projectId
required
string

The project id

volumeId
required
string

The volume id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Request Body schema: application/json

updatePolicySnapshotVolumeRequest

snapshotPolicyId
string
Array of objects (TagRequest)

Tags of resource

Responses

Request samples

Content type
application/json
{
  • "snapshotPolicyId": "string",
  • "tags": [
    ]
}

Disable auto snapshot volume

path Parameters
projectId
required
string

The project id

serverId
required
string

The server id

volumeId
required
string

The volume id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'PUT',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/volumes/{volumeId}/volume-snapshots/servers/{serverId}/disable-auto',
  headers: {
    accept: 'application/json',
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Enable auto snapshot volume

path Parameters
projectId
required
string

The project id

serverId
required
string

The server id

volumeId
required
string

The volume id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'PUT',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/volumes/{volumeId}/volume-snapshots/servers/{serverId}/enable-auto',
  headers: {
    accept: 'application/json',
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

volume-type-rest-controller

Volume Type Rest Controller

getVolumeTypeDefaultId

path Parameters
project_id
required
string

project_id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v1/{project_id}/volume_default_id',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

listAllVolumeType

path Parameters
project_id
required
string

project_id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v1/{project_id}/volume_types',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

getVolumeType

path Parameters
project_id
required
string

project_id

volume_type_id
required
string

volume_type_id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v1/{project_id}/volume_types/{volume_type_id}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

listVolumeType

path Parameters
project_id
required
string

project_id

volume_type_zone_id
required
string

volume_type_zone_id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v1/{project_id}/{volume_type_zone_id}/volume_types',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

volume-type-zone-rest-controller

Volume Type Zone Rest Controller

listVolumeTypeZone

path Parameters
project_id
required
string

project_id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v1/{project_id}/volume_type_zones',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

getVolumeTypeZone

path Parameters
project_id
required
string

project_id

volume_type_zone_id
required
string

volume_type_zone_id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v1/{project_id}/volume_type_zones/{volume_type_zone_id}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

wan-ip-rest-controller-v-2

Wan Ip Rest Controller V 2

List WAN IP

path Parameters
projectId
required
string

project id

query Parameters
name
string

name

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/wanIps',
  qs: {name: 'SOME_STRING_VALUE'},
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Delete a WAN IP

path Parameters
projectId
required
string

The project id

wanIpId
required
string

The WAN IP id

header Parameters
Authorization
required
string

Access Token

portal-user-id
required
integer <int32>

portal-user-id

Responses

Request samples

const request = require('request');

const options = {
  method: 'DELETE',
  url: 'https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway/v2/{projectId}/wanIps/{wanIpId}',
  headers: {
    'content-type': '*/*',
    Authorization: 'SOME_STRING_VALUE',
    'portal-user-id': 'SOME_INTEGER_VALUE'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});