Console API
  1. Instances
Console API
  • User
    • User Info
      GET
    • Ssh keys
      GET
  • Tenant / Regions
    • Get Regions & Tenant info
      GET
    • Get Tenant Info
      GET
  • VPC
    • Get VPC List
      GET
    • Rename VPC
      PUT
    • Create VPC
      POST
  • Images
    • Get images
      GET
  • Flavors
    • Get flavors
      GET
  • Storage Policy
    • List
      GET
  • Instances
    • List
      GET
    • Detail
      GET
    • Security Group
      GET
    • Create instance
      POST
    • Power off
      POST
    • Reboot
      POST
    • Power on
      POST
    • Terminate
      POST
    • Resize
      POST
    • Lock Termination
      POST
    • Rename
      POST
    • Manage tag
      POST
  • Subnet
    • List
    • Create
    • Rename
    • Delete
    • Manage tags
  • Security group
    • Security Group List
    • Security Group Detail
    • Rule Types
    • Create Security Group
    • Create Rule
    • Apply to private ip
    • Delete Rule
    • Delete security group
    • Manage tag
  • Floating IP
    • List
    • Allocate
    • Connect to instance
    • Disconnect
    • Release
    • Manage tag
  • Activity Logs
    • List
  • Tags
    • Lists
  • Iam
    • Add user to user group
    • Get all user groups
    • Create user group
    • Update user group
    • Get roles
    • Get user vpcs
  • Billing
    • Bill
      • Get bills by date
      • Get Bills by paging
      • Bill Info
      • Bill service types
  • Project
    • Get projects
    • Create Project
    • Detail Project
  • S3
    • Get bucket policy
    • List buckets
    • Get s3 service enabled
  • IP Access
    • API Portal Access Log
  • Metal Cloud
    • Bare Metal Servers
      • List all servers
      • Get server details
      • Get server console URL
      • Create server
      • Rename a server (Portal name)
      • Power on a server
      • Power off a server
      • Delete a server
    • Subnets
      • Get available subnets
      • Create a subnet
      • List all subnets
      • Delete a subnet
      • Update a subnet
    • Network ACLs
      • Retrieve the list of Network ACLs for a VPC
      • Get details of a specific Network ACL
      • Update a Network ACL
      • Update firewall rules for a firewall policy
      • List all firewall policies of a Network ACL
    • images
      • List images
      • List custom images
      • Register a new image
      • Get presigned upload URLs
      • Complete image upload
      • Delete an image
      • Sync an image
    • server_package
      • Get list server types. This part will be represent all server type that user can deploy We using server type name as the rule of selecting server on maas System ex. In maas we have serveral server names (H100.1, H100.2, H100.3, H100.4, H100.5, H100.6, H10
  1. Instances

Create instance

POST
/api/v1/vmware/vpc/{vpc_id}/compute/instances

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Path Params

Header Params

Body Params application/json

Example
{
    "name": "vm-2401092643",
    "hostname": "vm-2401092643",
    "catalog": "ubuntu",
    "template": "UBUNTU-18.04-07092022",
    "hw_flavor": "3d85a2e7-7bd1-4dcf-8569-3a3ede3e7638",
    "storage": {
        "profile": "Premium-SSD",
        "size_gb": 40
    },
    "nic": {
        "name": "subnet-2349-y0sjwcgy"
    },
    "floatingIpId": "new",
    "networkId": "c40ced09-0943-47f7-ac7b-bb66f5b279ea",
    "securityGroupIds": [
        "70c6a292-3d6a-4d3d-85aa-570596980061"
    ],
    "tag_ids": [
        "38a2f666-c11e-46cf-af44-4f81bf155933"
    ],
    "password": "@assss222a1as",
    "ssh_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDHVFZaMA5l0v1EmiYzMNiwqKjAzNw3lh0fV1cDsOzkRyURo+E82wtoJTdoCNcTx6+nH55izRID4ZSpspXOqynRh7ANaCnHCyJGNCxO50xVdfrEtb6dJNWsNl125MYavFjOxhm8/xf3yTxvv/GXvLpQ2lhg2QqcLrvbvpg5e3Je6aHMDcxYBLa5q1HVwxQnyGwFfBJ45jzMC7TUH1b3X5lObX3xCRLx3048jHiKFW9loAGXiyEHJwQ7NhRG9gObaurWGtlhkTlErnbBrnqIDOObPEc/y/AWSEnr6ok3bof2bIauUMjwa7dfYoSgD3t+SyQKmkQ5KK4tHF0tAP1G/6Z3\n",
    "cloud_init": "#cloud-config\n\n# Update apt database on first boot (run 'apt-get update').\n# Note, if packages are given, or package_upgrade is true, then\n# update will be done independent of this setting.\npackage_update: true\nchpasswd:\n  list: |\n    root:Welcome***123\n\n# if packages are specified, this package_update will be set to true\n# packages may be supplied as a single package name or as a list\n# with the format [, ] wherein the specific\n# package version will be installed.\npackages:\n  - nginx\n  - git\n\n# runcmd contains a list of either lists or a string\n# each item will be executed in order at rc.local like level with\n# output to the console\n# - runcmd only runs during the first boot\n# - if the item is a list, the items will be properly executed as if\n#   passed to execve(3) (with the first arg as the command).\n# - if the item is a string, it will be simply written to the file and\n#   will be interpreted by 'sh'\nruncmd:\n  - systemctl enable nginx\n  - systemctl start nginx\n  - git clone https://github.com/cloudacademy/static-website-example.git\n  - cp -r ./static-website-example/* /var/www/html/\n  - rm -r ./static-website-example"
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location -g --request POST '/api/v1/vmware/vpc/{{vpc_id}}/compute/instances' \
--header 'sec-ch-ua: "Not_A Brand";v="8", "Chromium";v="120", "Google Chrome";v="120"' \
--header 'sec-ch-ua-mobile: ?0' \
--header 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36' \
--header 'Access-Control-Allow-Origin: *' \
--header 'Accept: application/json, text/plain, */*' \
--header 'Referer;' \
--header 'OrgId: 73a8c45d-5b52-4fa2-b626-38313e8d50a1' \
--header 'sec-ch-ua-platform: "Linux"' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "vm-2401092643",
    "hostname": "vm-2401092643",
    "catalog": "ubuntu",
    "template": "UBUNTU-18.04-07092022",
    "hw_flavor": "3d85a2e7-7bd1-4dcf-8569-3a3ede3e7638",
    "storage": {
        "profile": "Premium-SSD",
        "size_gb": 40
    },
    "nic": {
        "name": "subnet-2349-y0sjwcgy"
    },
    "floatingIpId": "new",
    "networkId": "c40ced09-0943-47f7-ac7b-bb66f5b279ea",
    "securityGroupIds": [
        "70c6a292-3d6a-4d3d-85aa-570596980061"
    ],
    "tag_ids": [
        "38a2f666-c11e-46cf-af44-4f81bf155933"
    ],
    "password": "@assss222a1as",
    "ssh_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDHVFZaMA5l0v1EmiYzMNiwqKjAzNw3lh0fV1cDsOzkRyURo+E82wtoJTdoCNcTx6+nH55izRID4ZSpspXOqynRh7ANaCnHCyJGNCxO50xVdfrEtb6dJNWsNl125MYavFjOxhm8/xf3yTxvv/GXvLpQ2lhg2QqcLrvbvpg5e3Je6aHMDcxYBLa5q1HVwxQnyGwFfBJ45jzMC7TUH1b3X5lObX3xCRLx3048jHiKFW9loAGXiyEHJwQ7NhRG9gObaurWGtlhkTlErnbBrnqIDOObPEc/y/AWSEnr6ok3bof2bIauUMjwa7dfYoSgD3t+SyQKmkQ5KK4tHF0tAP1G/6Z3\n",
    "cloud_init": "#cloud-config\n\n# Update apt database on first boot (run '\''apt-get update'\'').\n# Note, if packages are given, or package_upgrade is true, then\n# update will be done independent of this setting.\npackage_update: true\nchpasswd:\n  list: |\n    root:Welcome***123\n\n# if packages are specified, this package_update will be set to true\n# packages may be supplied as a single package name or as a list\n# with the format [, ] wherein the specific\n# package version will be installed.\npackages:\n  - nginx\n  - git\n\n# runcmd contains a list of either lists or a string\n# each item will be executed in order at rc.local like level with\n# output to the console\n# - runcmd only runs during the first boot\n# - if the item is a list, the items will be properly executed as if\n#   passed to execve(3) (with the first arg as the command).\n# - if the item is a string, it will be simply written to the file and\n#   will be interpreted by '\''sh'\''\nruncmd:\n  - systemctl enable nginx\n  - systemctl start nginx\n  - git clone https://github.com/cloudacademy/static-website-example.git\n  - cp -r ./static-website-example/* /var/www/html/\n  - rm -r ./static-website-example"
}'

Responses

🟢200Success
application/json
Body

Example
{}
Modified at 2024-05-24 06:55:13
Previous
Security Group
Next
Power off
Built with