API Reference

You can find the reference of the Ubicloud API below. All the request and response bodies are in JSON format. Details of each endpoint with possible responses are shared. Note that, all the responses having status code 4xx returns the JSON body in the following format.


{
   "code" = "HTTP error status code"
   "type" = "Type of the error"
   "message" = "Short message explaining the error"
   "details" = "Details of the error guiding for the solution"
}
   

Login


curl "https://api.ubicloud.com/login" \
  -X POST \
  -H "Content-Type: application/json" \
  -i \
  -d '{
        "login": "username@mail.com", 
        "password": "samplepassword"
     }'
   

Request Parameters

TypeKeyValueRequired
BodyloginMail
BodypasswordPassword
  • Required Query Parameters
  • login: Mail of the user
  • password: Password of the user
  • curl "api/login?login=username@gmail.com&password=samplepassword" -X POST -H "Content-Type: application/json" -i

Response


{
    "success": "You have been logged in"
}
   

Invalid Request

Unauthorized

  • 200: Returns authorization token as the value of the response header's authorization key
  • 401: Unauthorized

Project

Create Project


curl "https://api.ubicloud.com/project" \
  -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: $jwt_token" \
  -d '{"name": "project_name"}'
   

Request Parameters

TypeKeyValueRequired
BodynameName of the project
  • Required Query Parameters
  • login: Mail of the user
  • password: Password of the user
  • curl "api/login?login=username@gmail.com&password=samplepassword" -X POST -H "Content-Type: application/json" -i

Response


{
   id: "ID of the project",
   name: "Name of the project",
   credit: "Remaining credit of the project in $",
   discount: "Discount of the project as percentage"
}
   

InvalidRequest

NotAuthenticated

Unauthorized

InvalidToken

  • 200: Returns authorization token as the value of the response header's authorization key
  • 401: Unauthorized

Get Project


curl "https://api.ubicloud.com/project/{project_id}" \
  -X GET \
  -H "Content-Type: application/json" \
  -H "Authorization: $jwt_token"
   

Request Parameters

TypeKeyValueRequired
Pathproject_idID of the project
  • Required Query Parameters
  • login: Mail of the user
  • password: Password of the user
  • curl "api/login?login=username@gmail.com&password=samplepassword" -X POST -H "Content-Type: application/json" -i

Response


{
   "id": "ID of the project",
   "name": "Name of the project",
   "credit": "Remaining credit of the project in $",
   "discount": "Discount of the project as percentage"
}
   

NotAuthenticated

Unauthorized

InvalidToken

  • 200: Returns authorization token as the value of the response header's authorization key
  • 401: Unauthorized

List Projects


curl "https://api.ubicloud.com/project?start_after={start_after}&page_size={page_size}&order_column={order_column}" \
  -X GET \
  -H "Content-Type: application/json" \
  -H "Authorization: $jwt_token"
  

Request Parameters

TypeKeyValueRequired
Querystart_after After which value page include items
Querypage_sizeNumber of items in a page (default: 10)
Queryorder_columnOn which column items are sorted (default: id)
  • Required Query Parameters
  • login: Mail of the user
  • password: Password of the user
  • curl "api/login?login=username@gmail.com&password=samplepassword" -X POST -H "Content-Type: application/json" -i

Response


{
  "items": [
    {
        "id": "ID of the project",
        "name": "Name of the project",
        "credit": "Credit of the project in $",
        "discount": "Discount of the project as percentage"
    },
    ...
  ],
  "count": "Total number of all projects"
}
   

InvalidRequest

NotAuthenticated

Unauthorized

InvalidToken

  • 200: Returns authorization token as the value of the response header's authorization key
  • 401: Unauthorized

Delete Project


curl "https://api.ubicloud.com/project/{project_id}" \
  -X DELETE \
  -H "Content-Type: application/json" \
  -H "Authorization: $jwt_token"
   

Request Parameters

TypeKeyValueRequired
Pathproject_idID of the project
  • Required Query Parameters
  • login: Mail of the user
  • password: Password of the user
  • curl "api/login?login=username@gmail.com&password=samplepassword" -X POST -H "Content-Type: application/json" -i

Response

NoContent

NotAuthenticated

Unauthorized

InvalidToken

  • 200: Returns authorization token as the value of the response header's authorization key
  • 401: Unauthorized

Private Subnet

Create Private Subnet


curl "https://api.ubicloud.com/project/{project_id}/location/{location_name}/private-subnet/{ps_name}" \
  -X POST \
  -H "Content-Type: application/json"  \
  -H "Authorization: $jwt_token"
   

Request Parameters

TypeKeyValueRequired
Pathproject_idID of the project
Pathlocation_name Name of the location
Pathps_name Name of the private subnet
  • Required Query Parameters
  • login: Mail of the user
  • password: Password of the user
  • curl "api/login?login=username@gmail.com&password=samplepassword" -X POST -H "Content-Type: application/json" -i

Response


{
  "id": "ID of the private subnet",
  "name": "Name of the private subnet",
  "state": "State of the private subnet",
  "location": "Location of the private subnet",
  "net4": "IPv4 block of the private subnet",
  "net6": "IPv6 block of the private subnet",
  "firewalls": [
    {
      "id": "ID of the firewall",
      "name": "Name of the firewall",
      "description": "Description of the firewall",
      "firewall_rules": [
      	{
          "id": "ID of the firewall rule",
          "cidr": "CIDR of the firewall rule",
          "port_range": "Port range of the firewall rule"
        },
        ...
      ]
    },
    ...
  ],
  "nics": [
    {
        "id": "ID of the network interface"
        "name": "Name of the network interface",
        "private_ipv6": "Private IPv6 of the network interface",
        "private_ipv4": "Private IPv4 of the network interface",
        "vm_name": "Name of the virtual machine name"
    },
    ...
  ]
}
   

InvalidRequest

NotAuthenticated

Unauthorized

InvalidToken

  • 200: Returns authorization token as the value of the response header's authorization key
  • 401: Unauthorized

Get Private Subnet (By Name)


curl "https://api.ubicloud.com/project/{project_id}/location/{location_name}/private-subnet/{ps_name}" \
  -X GET \
  -H "Content-Type: application/json" \
  -H "Authorization: $jwt_token"
   

Request Parameters

TypeKeyValueRequired
Pathproject_idID of the project
Pathlocation_name Name of the location
Pathps_name Name of the private subnet
  • Required Query Parameters
  • login: Mail of the user
  • password: Password of the user
  • curl "api/login?login=username@gmail.com&password=samplepassword" -X POST -H "Content-Type: application/json" -i

Response


{
  "id": "ID of the private subnet",
  "name": "Name of the private subnet",
  "state": "State of the private subnet",
  "location": "Location of the private subnet",
  "net4": "IPv4 block of the private subnet",
  "net6": "IPv6 block of the private subnet",
  "firewalls": [
    {
      "id": "ID of the firewall",
      "name": "Name of the firewall",
      "description": "Description of the firewall",
      "firewall_rules": [
      	{
          "id": "ID of the firewall rule",
          "cidr": "CIDR of the firewall rule",
          "port_range": "Port range of the firewall rule"
        },
        ...
      ]
    },
    ...
  ],
  "nics": [
    {
        "id": "ID of the network interface"
        "name": "Name of the network interface",
        "private_ipv6": "Private IPv6 of the network interface",
        "private_ipv4": "Private IPv4 of the network interface",
        "vm_name": "Name of the virtual machine name"
    },
    ...
  ]
}
   

NotAuthenticated

Unauthorized

ResourceNotFound

InvalidToken

  • 200: Returns authorization token as the value of the response header's authorization key
  • 401: Unauthorized

Get Private Subnet (By ID)


curl "https://api.ubicloud.com/project/{project_id}/location/{location_name}/private-subnet/id/{ps_id}" \
  -X GET \
  -H "Content-Type: application/json" \
  -H "Authorization: $jwt_token"
   

Request Parameters

TypeKeyValueRequired
Pathproject_idID of the project
Pathlocation_name Name of the location
Pathps_idID of the private subnet
  • Required Query Parameters
  • login: Mail of the user
  • password: Password of the user
  • curl "api/login?login=username@gmail.com&password=samplepassword" -X POST -H "Content-Type: application/json" -i

Response


{
  "id": "ID of the private subnet",
  "name": "Name of the private subnet",
  "state": "State of the private subnet",
  "location": "Location of the private subnet",
  "net4": "IPv4 block of the private subnet",
  "net6": "IPv6 block of the private subnet",
  "firewalls": [
    {
      "id": "ID of the firewall",
      "name": "Name of the firewall",
      "description": "Description of the firewall",
      "firewall_rules": [
      	{
          "id": "ID of the firewall rule",
          "cidr": "CIDR of the firewall rule",
          "port_range": "Port range of the firewall rule"
        },
        ...
      ]
    },
    ...
  ],
  "nics": [
    {
        "id": "ID of the network interface"
        "name": "Name of the network interface",
        "private_ipv6": "Private IPv6 of the network interface",
        "private_ipv4": "Private IPv4 of the network interface",
        "vm_name": "Name of the virtual machine name"
    },
    ...
  ]
}
   

NotAuthenticated

Unauthorized

ResourceNotFound

InvalidToken

  • 200: Returns authorization token as the value of the response header's authorization key
  • 401: Unauthorized

List Private Subnets of a Project


curl "https://api.ubicloud.com/project/{project_id}/private-subnet?start_after={start_after}&page_size{page_size}&order_column={order_column}" \
  -X GET \
  -H "Content-Type: application/json" \
  -H "Authorization: $jwt_token"
   

Request Parameters

TypeKeyValueRequired
Pathproject_idID of the project
Querystart_after After which value page include items
Querypage_size Number of items in a page (default: 10)
Queryorder_column On which column items are sorted (default: id)
  • Required Query Parameters
  • login: Mail of the user
  • password: Password of the user
  • curl "api/login?login=username@gmail.com&password=samplepassword" -X POST -H "Content-Type: application/json" -i

Response


{
  "items": [
    {
      "id": "ID of the private subnet",
      "name": "Name of the private subnet",
      "state": "State of the private subnet",
      "location": "Location of the private subnet",
      "net4": "IPv4 block of the private subnet",
      "net6": "IPv6 block of the private subnet",
      "firewalls": [
        {
          "id": "ID of the firewall",
          "name": "Name of the firewall",
          "description": "Description of the firewall",
          "firewall_rules": [
            {
              "id": "ID of the firewall rule",
              "cidr": "CIDR of the firewall rule",
              "port_range": "Port range of the firewall rule"
            },
            ...
          ]
        },
        ...
      ],
      "nics": [
        {
            "id": "ID of the network interface"
            "name": "Name of the network interface",
            "private_ipv6": "Private IPv6 of the network interface",
            "private_ipv4": "Private IPv4 of the network interface",
            "vm_name": "Name of the virtual machine name"
        },
        ...
      ]
    },
    ...
  ],
  "count" : "Total number of all private subnets" 
}
   

NotAuthenticated

Unauthorized

ResourceNotFound

InvalidToken

  • 200: Returns authorization token as the value of the response header's authorization key
  • 401: Unauthorized

List Private Subnets In a Location


curl "https://api.ubicloud.com/project/{project_id}/location/{location_name}/private-subnet?start_after={start_after}&page_size={page_size}&order_column={order_column}" \
  -X GET \
  -H "Content-Type: application/json" \
  -H "Authorization: $jwt_token"
   

Request Parameters

TypeKeyValueRequired
Pathproject_idID of the project
Pathlocation_nameName of the location
Querystart_after After which value page include items
Querypage_size Number of items in a page (default: 10)
Queryorder_column On which column items are sorted (default: id)
  • Required Query Parameters
  • login: Mail of the user
  • password: Password of the user
  • curl "api/login?login=username@gmail.com&password=samplepassword" -X POST -H "Content-Type: application/json" -i

Response


{
  "items": [
    {
      "id": "ID of the private subnet",
      "name": "Name of the private subnet",
      "state": "State of the private subnet",
      "location": "Location of the private subnet",
      "net4": "IPv4 block of the private subnet",
      "net6": "IPv6 block of the private subnet",
      "firewalls": [
        {
          "id": "ID of the firewall",
          "name": "Name of the firewall",
          "description": "Description of the firewall",
          "firewall_rules": [
            {
              "id": "ID of the firewall rule",
              "cidr": "CIDR of the firewall rule",
              "port_range": "Port range of the firewall rule"
            },
            ...
          ]
        },
        ...
      ],
      "nics": [
        {
            "id": "ID of the network interface"
            "name": "Name of the network interface",
            "private_ipv6": "Private IPv6 of the network interface",
            "private_ipv4": "Private IPv4 of the network interface",
            "vm_name": "Name of the virtual machine name"
        },
        ...
      ]
    },
    ...
  ],
  "count" : "Total number of all private subnets" 
}
   

NotAuthenticated

Unauthorized

ResourceNotFound

InvalidToken

  • 200: Returns authorization token as the value of the response header's authorization key
  • 401: Unauthorized

Delete Private Subnet (By Name)


curl "https://api.ubicloud.com/project/{project_id}/location/{location_name}/private-subnet/{ps_name}" \
  -X DELETE \
  -H "Content-Type: application/json" \
  -H "Authorization: $jwt_token"
   

Request Parameters

TypeKeyValueRequired
Pathproject_idID of the project
Pathlocation_name Name of the location
Pathps_name Name of the private subnet
  • Required Query Parameters
  • login: Mail of the user
  • password: Password of the user
  • curl "api/login?login=username@gmail.com&password=samplepassword" -X POST -H "Content-Type: application/json" -i

Response

NoContent

NotAuthenticated

Unauthorized

ResourceNotFound

Conflict

InvalidToken

  • 200: Returns authorization token as the value of the response header's authorization key
  • 401: Unauthorized

Delete Private Subnet (By Id)


curl "https://api.ubicloud.com/project/{project_id}/location/{location_name}/private-subnet/id/{ps_id}" \
  -X DELETE \
  -H "Content-Type: application/json" \
  -H "Authorization: $jwt_token"
   

Request Parameters

TypeKeyValueRequired
Pathproject_idID of the project
Pathlocation_name Name of the location
Pathps_idID of the private subnet
  • Required Query Parameters
  • login: Mail of the user
  • password: Password of the user
  • curl "api/login?login=username@gmail.com&password=samplepassword" -X POST -H "Content-Type: application/json" -i

Response

NoContent

NotAuthenticated

Unauthorized

ResourceNotFound

Conflict

InvalidToken

  • 200: Returns authorization token as the value of the response header's authorization key
  • 401: Unauthorized

Virtual Machine

Create Virtual Machine


curl "https://api.ubicloud.com/project/{project_id}/location/{location_name}/vm/{vm_name}" \
  -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: $jwt_token" \
  -d '{
        "public_key": "SSH Public Key",
        "size": "Size of the VM",
        "unix_user": "Name of the unix user",
        "boot_image": "Name of the boot image",
        "enable_ip4": "Is IPv4 enabled",
        "private_subnet_id": "ID of an existing private subnet"
    }'
   

Request Parameters

TypeKeyValueRequired
Pathproject_idID of the project
Pathlocation_name Name of the location
Pathvm_name Name of the virtual machine
Bodypublic_key SSH public key
BodysizeSize of the VM ("standard-2" (default), "standard-4","standard-8","standard-16",)
Bodyunix_user Name of the unix user (default: "ubi")
Bodyboot_image Name of the boot image ("ubuntu-jammy" (default), "almalinux-9.1")
Bodyenable_ip4Is IPv4 enabled (default: false)
Bodyprivate_subnet_idID of an existing private subnet
  • Required Query Parameters
  • login: Mail of the user
  • password: Password of the user
  • curl "api/login?login=username@gmail.com&password=samplepassword" -X POST -H "Content-Type: application/json" -i

Response


{
  "id": "ID of the virtual machine",
  "name": "Name of the virtual machine",
  "state": "State of the virtual machine",
  "location": "Location name of the virtual machine",
  "size": "Size of the virtual machine",
  "unix_user": "Unix user of the virtual machine",
  "storage_size_gib": "Storage of the virtual machine in gib",
  "ip6": "IPv6 address of the virtual machine",
  "ip4": "IPv4 address of the virtual machine",
  "firewalls": {
    "id": "Id of the firewall",
    "name": "Name of the firewall",
    "description": "Description of the firewall",
    "firewall_rules": [
      {      
        "id": "ID of the firewall rule",
        "cidr": "CIDR of the firewall rule",
        "port_range": "Port range of the firewall rule"
      },
      ...
    ]
  }
  "private_ipv4": "Private Ipv4 of the virtual machine",
  "private_ipv6": "Private Ipv6 of the virtual machine",
  "subnet": "Private subnet or the virtual machine"
}
   

InvalidRequest

NotAuthenticated

Unauthorized

InvalidToken

  • 200: Returns authorization token as the value of the response header's authorization key
  • 401: Unauthorized

Get Virtual Machine (By Name)


curl "https://api.ubicloud.com/project/{project_id}/location/{location_name}/vm/{vm_name}" \
  -X GET \
  -H "Content-Type: application/json" \
  -H "Authorization: $jwt_token" \
   

Request Parameters

TypeKeyValueRequired
Pathproject_idID of the project
Pathlocation_name Name of the location
Pathvm_name Name of the virtual machine
  • Required Query Parameters
  • login: Mail of the user
  • password: Password of the user
  • curl "api/login?login=username@gmail.com&password=samplepassword" -X POST -H "Content-Type: application/json" -i

Response


{
  "id": "ID of the virtual machine",
  "name": "Name of the virtual machine",
  "state": "State of the virtual machine",
  "location": "Location name of the virtual machine",
  "size": "Size of the virtual machine",
  "unix_user": "Unix user of the virtual machine",
  "storage_size_gib": "Storage of the virtual machine in gib",
  "ip6": "IPv6 address of the virtual machine",
  "ip4": "IPv4 address of the virtual machine",
  "firewalls": {
    "id": "Id of the firewall",
    "name": "Name of the firewall",
    "description": "Description of the firewall",
    "firewall_rules": [
      {      
        "id": "ID of the firewall rule",
        "cidr": "CIDR of the firewall rule",
        "port_range": "Port range of the firewall rule"
      },
      ...
    ]
  }
  "private_ipv4": "Private Ipv4 of the virtual machine",
  "private_ipv6": "Private Ipv6 of the virtual machine",
  "subnet": "Private subnet or the virtual machine"
}
   

InvalidRequest

NotAuthenticated

Unauthorized

ResourceNotFound

InvalidToken

  • 200: Returns authorization token as the value of the response header's authorization key
  • 401: Unauthorized

Get Virtual Machine (By ID)


curl "https://api.ubicloud.com/project/{project_id}/location/{location_name}/vm/id/{vm_id}" \
  -X GET \
  -H "Content-Type: application/json" \
  -H "Authorization: $jwt_token"
   

Request Parameters

TypeKeyValueRequired
Pathproject_idID of the project
Pathlocation_name Name of the location
Pathvm_idID of the virtual machine
  • Required Query Parameters
  • login: Mail of the user
  • password: Password of the user
  • curl "api/login?login=username@gmail.com&password=samplepassword" -X POST -H "Content-Type: application/json" -i

Response


{
  "id": "ID of the virtual machine",
  "name": "Name of the virtual machine",
  "state": "State of the virtual machine",
  "location": "Location name of the virtual machine",
  "size": "Size of the virtual machine",
  "unix_user": "Unix user of the virtual machine",
  "storage_size_gib": "Storage of the virtual machine in gib",
  "ip6": "IPv6 address of the virtual machine",
  "ip4": "IPv4 address of the virtual machine",
  "firewalls": {
    "id": "Id of the firewall",
    "name": "Name of the firewall",
    "description": "Description of the firewall",
    "firewall_rules": [
      {      
        "id": "ID of the firewall rule",
        "cidr": "CIDR of the firewall rule",
        "port_range": "Port range of the firewall rule"
      },
      ...
    ]
  }
  "private_ipv4": "Private Ipv4 of the virtual machine",
  "private_ipv6": "Private Ipv6 of the virtual machine",
  "subnet": "Private subnet or the virtual machine"
}
   

InvalidRequest

NotAuthenticated

Unauthorized

ResourceNotFound

InvalidToken

  • 200: Returns authorization token as the value of the response header's authorization key
  • 401: Unauthorized

List Virtual Machines of a Project


curl "https://api.ubicloud.com/project/{project_id}/vm?start_after={start_after}&page_size={page_size}&order_column={order_column}" \
  -X GET \
  -H "Content-Type: application/json" \
  -H "Authorization: $jwt_token"
   

Request Parameters

TypeKeyValueRequired
Pathproject_idID of the project
Querystart_after After which value page include items
Querypage_size Number of items in a page (default: 10)
Queryorder_column On which column items are sorted (default: id)
  • Required Query Parameters
  • login: Mail of the user
  • password: Password of the user
  • curl "api/login?login=username@gmail.com&password=samplepassword" -X POST -H "Content-Type: application/json" -i

Response


[
   "items": [
      {
        "id": "ID of the virtual machine",
        "name": "Name of the virtual machine",
        "state": "State of the virtual machine",
        "location": "Location name of the virtual machine",
        "size": "Size of the virtual machine",
        "unix_user": "Unix user of the virtual machine",
        "storage_size_gib": "Storage of the virtual machine in gib",
        "ip6": "IPv6 address of the virtual machine",
        "ip4": "IPv4 address of the virtual machine"
      },
      ...
   ]
   "count": "Total number of all virtual machines"
]
   

InvalidRequest

NotAuthenticated

Unauthorized

ResourceNotFound

InvalidToken

  • 200: Returns authorization token as the value of the response header's authorization key
  • 401: Unauthorized

List Virtual Machines in a Location


curl "https://api.ubicloud.com/project/{project_id}/location/{location_name}vm?start_after={start_after}&page_size={page_size}&order_column={order_column}" \
  -X GET \
  -H "Content-Type: application/json" \
  -H "Authorization: $jwt_token"
   

Request Parameters

TypeKeyValueRequired
Pathproject_idID of the project
Pathlocation_nameName of the location
Querystart_after After which value page include items
Querypage_size Number of items in a page (default: 10)
Queryorder_column On which column items are sorted (default: id)
  • Required Query Parameters
  • login: Mail of the user
  • password: Password of the user
  • curl "api/login?login=username@gmail.com&password=samplepassword" -X POST -H "Content-Type: application/json" -i

Response


[
   "items": [
      {
        "id": "ID of the virtual machine",
        "name": "Name of the virtual machine",
        "state": "State of the virtual machine",
        "location": "Location name of the virtual machine",
        "size": "Size of the virtual machine",
        "unix_user": "Unix user of the virtual machine",
        "storage_size_gib": "Storage of the virtual machine in gib",
        "ip6": "IPv6 address of the virtual machine",
        "ip4": "IPv4 address of the virtual machine"
      },
      ...
   ]
   "count": "Total number of all virtual machines"
]
   

InvalidRequest

NotAuthenticated

Unauthorized

ResourceNotFound

InvalidToken

  • 200: Returns authorization token as the value of the response header's authorization key
  • 401: Unauthorized

Delete Virtual Machine (By Name)


curl "https://api.ubicloud.com/project/{project_id/location/{location_name}/vm/{vm_name}" \
  -X DELETE \
  -H "Content-Type: application/json" \
  -H "Authorization: $jwt_token"
   

Request Parameters

TypeKeyValueRequired
Pathproject_idID of the project in which private subnet will be created
Pathlocation_name Name of the location in which private subnet will be created
Pathps_name Name of the virtual machine
  • Required Query Parameters
  • login: Mail of the user
  • password: Password of the user
  • curl "api/login?login=username@gmail.com&password=samplepassword" -X POST -H "Content-Type: application/json" -i

Response

NoContent

NotAuthenticated

Unauthorized

ResourceNotFound

InvalidToken

  • 200: Returns authorization token as the value of the response header's authorization key
  • 401: Unauthorized

Delete Virtual Machine (By ID)


curl "https://api.ubicloud.com/project/{project_id}/location/{location_name}/vm/id/vm_id"
   -X DELETE 
   -H "Content-Type: application/json" 
   -H "Authorization: {jwt_token}"
   

Request Parameters

TypeKeyValueRequired
Pathproject_idID of the project
Pathlocation_name Name of the location
Pathvm_idID of the virtual machine
  • Required Query Parameters
  • login: Mail of the user
  • password: Password of the user
  • curl "api/login?login=username@gmail.com&password=samplepassword" -X POST -H "Content-Type: application/json" -i

Response

NoContent

NotAuthenticated

Unauthorized

ResourceNotFound

InvalidToken

  • 200: Returns authorization token as the value of the response header's authorization key
  • 401: Unauthorized

PostgreSQL

Create PostgreSQL Database


curl "https://api.ubicloud.com/project/{project_id}/location/{location_name}/postgres/{pg_name}" \
  -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: $jwt_token" \
  -d '{
      "size": "Size of the database",
      "ha_type": "HA type of the database"
    }'

   

Request Parameters

TypeKeyValueRequired
Pathproject_idID of the project
Pathlocation_name Name of the location
Pathpg_name Name of the PostgreSQL database
BodysizeSize of the database ("standard-2" (default), "standard-4", "standard-8", "standard-16" )
Bodyha_typeHA Type of the database ("none" (default), "sync", "async")
  • Required Query Parameters
  • login: Mail of the user
  • password: Password of the user
  • curl "api/login?login=username@gmail.com&password=samplepassword" -X POST -H "Content-Type: application/json" -i

Response


{
   "id": "ID of the PostgreSQL database",
   "name": "Name of the PostgreSQL database"e,
   "state": "State of the PostgreSQL database",
   "location": "Location of the PostgreSQL database",
   "vm_size": "VM size of the PostgreSQL database",
   "storage_size_gib": "Storage size of the PostgreSQL database in gib",
   "ha_type": "HA type of the PostgreSQL database",
   "connection_string": "Connection string of the PostgreSQL database",
   "primary": "Is PostgreSQL database primary",
   "firewall_rules": [
      {
        "id": "ID of the firewall rule",
        "cidr": "CIDR of the firewall rule",
      },
      ...
   ]
   "earliest_restore_time": "Earliest restore time (if primary)"
   "latest_restore_time": "Latest restore time (if primary)"
}
   

InvalidRequest

NotAuthenticated

Unauthorized

InvalidToken

  • 200: Returns authorization token as the value of the response header's authorization key
  • 401: Unauthorized

Get PostgreSQL Database (By Name)


curl "https://api.ubicloud.com/project/{project_id}/location/{location_name}/postgres/{pg_name}"
  -X GET \
  -H "Content-Type: application/json" \
  -H "Authorization: $jwt_token"
   

Request Parameters

TypeKeyValueRequired
Pathproject_idID of the project
Pathlocation_name Name of the location
Pathpg_name Name of the PostgreSQL database
  • Required Query Parameters
  • login: Mail of the user
  • password: Password of the user
  • curl "api/login?login=username@gmail.com&password=samplepassword" -X POST -H "Content-Type: application/json" -i

Response


{
   "id": "ID of the PostgreSQL database",
   "name": "Name of the PostgreSQL database"e,
   "state": "State of the PostgreSQL database",
   "location": "Location of the PostgreSQL database",
   "vm_size": "VM size of the PostgreSQL database",
   "storage_size_gib": "Storage size of the PostgreSQL database in gib",
   "ha_type": "HA type of the PostgreSQL database",
   "connection_string": "Connection string of the PostgreSQL database",
   "primary": "Is PostgreSQL database primary",
   "firewall_rules": [
      {
        "id": "ID of the firewall rule",
        "cidr": "CIDR of the firewall rule",
      },
      ...
   ]
   "earliest_restore_time": "Earliest restore time (if primary)"
   "latest_restore_time": "Latest restore time (if primary)"
}
   

InvalidRequest

NotAuthenticated

Unauthorized

ResourceNotFound

InvalidToken

  • 200: Returns authorization token as the value of the response header's authorization key
  • 401: Unauthorized

Get PostgreSQL Database (By ID)


curl "https://api.ubicloud.com/project/{project_id}/location/{location_name}/postgres/id/{pg_id}"
  -X GET \
  -H "Content-Type: application/json" \
  -H "Authorization: $jwt_token"
   

Request Parameters

TypeKeyValueRequired
Pathproject_idID of the project
Pathlocation_name Name of the location
Pathpg_idID of the PostgreSQL database
  • Required Query Parameters
  • login: Mail of the user
  • password: Password of the user
  • curl "api/login?login=username@gmail.com&password=samplepassword" -X POST -H "Content-Type: application/json" -i

Response


{
   "id": "ID of the PostgreSQL database",
   "name": "Name of the PostgreSQL database"e,
   "state": "State of the PostgreSQL database",
   "location": "Location of the PostgreSQL database",
   "vm_size": "VM size of the PostgreSQL database",
   "storage_size_gib": "Storage size of the PostgreSQL database in gib",
   "ha_type": "HA type of the PostgreSQL database",
   "connection_string": "Connection string of the PostgreSQL database",
   "primary": "Is PostgreSQL database primary",
   "firewall_rules": [
      {
        "id": "ID of the firewall rule",
        "cidr": "CIDR of the firewall rule",
      },
      ...
   ]
   "earliest_restore_time": "Earliest restore time (if primary)"
   "latest_restore_time": "Latest restore time (if primary)"
}
   

InvalidRequest

NotAuthenticated

Unauthorized

ResourceNotFound

InvalidToken

  • 200: Returns authorization token as the value of the response header's authorization key
  • 401: Unauthorized

List PostgreSQL Databases


curl "https://api.ubicloud.com/project/{project_id}/postgres" \ 
  -X GET \
  -H "Content-Type: application/json" \
  -H "Authorization: $jwt_token"
   

Request Parameters

TypeKeyValueRequired
Pathproject_idID of the project
Querystart_after After which value page include items
Querypage_size Number of items in a page (default: 10)
Queryorder_column On which column items are sorted (default: id)
  • Required Query Parameters
  • login: Mail of the user
  • password: Password of the user
  • curl "api/login?login=username@gmail.com&password=samplepassword" -X POST -H "Content-Type: application/json" -i

Response


{
   items: [
      {
        "id": "ID of the PostgreSQL database",
        "name": "Name of the PostgreSQL database"e,
        "state": "State of the PostgreSQL database",
        "location": "Location of the PostgreSQL database",
        "vm_size": "VM size of the PostgreSQL database",
        "storage_size_gib": "Storage size of the PostgreSQL database in gib",
        "ha_type": "HA type of the PostgreSQL database"
      },
      ...
   ]
   count: "Total number of all PostgreSQL databases"
}
   

InvalidRequest

NotAuthenticated

Unauthorized

ResourceNotFound

InvalidToken

  • 200: Returns authorization token as the value of the response header's authorization key
  • 401: Unauthorized

List PostgreSQL Database in a Location


curl "https://api.ubicloud.com/project/{project_id}/location/{location_name}/postgres?start_after={start_after}&page_size{size}&order_column={order_column}" \
  -X GET \
  -H "Content-Type: application/json" \
  -H "Authorization: $jwt_token"
   

Request Parameters

TypeKeyValueRequired
Pathproject_idID of the project
Pathlocation_nameName of the location
Querystart_after After which value page include items
Querypage_size Number of items in a page (default: 10)
Queryorder_column On which column items are sorted (default: id)
  • Required Query Parameters
  • login: Mail of the user
  • password: Password of the user
  • curl "api/login?login=username@gmail.com&password=samplepassword" -X POST -H "Content-Type: application/json" -i

Response


{
   items: [
      {
        "id": "ID of the PostgreSQL database",
        "name": "Name of the PostgreSQL database"e,
        "state": "State of the PostgreSQL database",
        "location": "Location of the PostgreSQL database",
        "vm_size": "VM size of the PostgreSQL database",
        "storage_size_gib": "Storage size of the PostgreSQL database in gib",
        "ha_type": "HA type of the PostgreSQL database"
      },
      ...
   ]
   count: "Total number of all PostgreSQL databases"
}
   

InvalidRequest

NotAuthenticated

Unauthorized

ResourceNotFound

InvalidToken

  • 200: Returns authorization token as the value of the response header's authorization key
  • 401: Unauthorized

Delete PostgreSQL Database (By Name)


curl "https://api.ubicloud.com/project/{project_id}/location/{location_name}/postgres/{pg_name}" \
  -X DELETE \
  -H "Content-Type: application/json" \
  -H "Authorization: $jwt_token"
   

Request Parameters

TypeKeyValueRequired
Pathproject_idID of the project
Pathlocation_name Name of the location
Pathpg_name Name of the PostgreSQL database
  • Required Query Parameters
  • login: Mail of the user
  • password: Password of the user
  • curl "api/login?login=username@gmail.com&password=samplepassword" -X POST -H "Content-Type: application/json" -i

Response

NoContent

NotAuthenticated

Unauthorized

ResourceNotFound

InvalidToken

  • 200: Returns authorization token as the value of the response header's authorization key
  • 401: Unauthorized

Delete PostgreSQL Database (By ID)


curl "https://api.ubicloud.com/project/{project_id}/location/{location_name}/postgres/id/{pg_id}" \
  -X DELETE \
  -H "Content-Type: application/json" \
  -H "Authorization: $jwt_token"
   

Request Parameters

TypeKeyValueRequired
Pathproject_idID of the project
Pathlocation_name Name of the location
Pathpg_idID of the PostgreSQL database
  • Required Query Parameters
  • login: Mail of the user
  • password: Password of the user
  • curl "api/login?login=username@gmail.com&password=samplepassword" -X POST -H "Content-Type: application/json" -i

Response

NoContent

NotAuthenticated

Unauthorized

ResourceNotFound

InvalidToken

  • 200: Returns authorization token as the value of the response header's authorization key
  • 401: Unauthorized

Restore PostgreSQL Database (By Name)


curl "https://api.ubicloud.com/project/{project_id}/location/{location_name}/postgres/{pg_name}/restore" \
  -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: $jwt_token" \
  -d '{
      "name": "After restore db name",
      "restore_target": "2024-04-04 04:44:44"
   }'
   

Request Parameters

TypeKeyValueRequired
Pathproject_idID of the project
Pathlocation_nameName of the location
Pathpg_nameName of the existing PostgreSQL database
Bodyname Name of the PostgreSQL database to be created
Bodyrestore_targetTarget restore time
  • Required Query Parameters
  • login: Mail of the user
  • password: Password of the user
  • curl "api/login?login=username@gmail.com&password=samplepassword" -X POST -H "Content-Type: application/json" -i

Response


{
   "id": "ID of the PostgreSQL database",
   "name": "Name of the PostgreSQL database"e,
   "state": "State of the PostgreSQL database",
   "location": "Location of the PostgreSQL database",
   "vm_size": "VM size of the PostgreSQL database",
   "storage_size_gib": "Storage size of the PostgreSQL database in gib",
   "ha_type": "HA type of the PostgreSQL database",
   "connection_string": "Connection string of the PostgreSQL database",
   "primary": "Is PostgreSQL database primary",
   "firewall_rules": [
      {
        "id": "ID of the firewall rule",
        "cidr": "CIDR of the firewall rule",
      },
      ...
   ]
}
   

InvalidRequest

NotAuthenticated

Unauthorized

ResourceNotFound

InvalidToken

  • 200: Returns authorization token as the value of the response header's authorization key
  • 401: Unauthorized

Restore PostgreSQL Database (By ID)


curl "https://api.ubicloud.com/project/{project_id}/location/{location_name}/postgres/id/{pg_id}/restore" \
  -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: $jwt_token" \
  -d '{
      "name": "After restore db name",
      "restore_target": "2024-04-04 04:44:44"
   }'
   

Request Parameters

TypeKeyValueRequired
Pathproject_idID of the project
Pathlocation_nameName of the location
Pathpg_nameName of the existing PostgreSQL database
Bodyname Name of the PostgreSQL database to be created
Bodyrestore_targetTarget restore time
  • Required Query Parameters
  • login: Mail of the user
  • password: Password of the user
  • curl "api/login?login=username@gmail.com&password=samplepassword" -X POST -H "Content-Type: application/json" -i

Response


{
   "id": "ID of the PostgreSQL database",
   "name": "Name of the PostgreSQL database"e,
   "state": "State of the PostgreSQL database",
   "location": "Location of the PostgreSQL database",
   "vm_size": "VM size of the PostgreSQL database",
   "storage_size_gib": "Storage size of the PostgreSQL database in gib",
   "ha_type": "HA type of the PostgreSQL database",
   "connection_string": "Connection string of the PostgreSQL database",
   "primary": "Is PostgreSQL database primary",
   "firewall_rules": [
      {
        "id": "ID of the firewall rule",
        "cidr": "CIDR of the firewall rule",
      },
      ...
   ]
}
   

InvalidRequest

NotAuthenticated

Unauthorized

ResourceNotFound

InvalidToken

  • 200: Returns authorization token as the value of the response header's authorization key
  • 401: Unauthorized

Reset Password of PostgreSQL Database (By Name)


curl "https://api.ubicloud.com/project/{location_id}/location/{location_name}/postgres/{pg_name}/reset-superuser-password" \
  -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: $jwt_token" \
  -d '{"password": "new password"}'
   

Request Parameters

TypeKeyValueRequired
Pathproject_idID of the project
Pathlocation_nameName of the location
Pathpg_nameName of the PostgreSQL database
BodypasswordNew superuser password for the PostgreSQL database
  • Required Query Parameters
  • login: Mail of the user
  • password: Password of the user
  • curl "api/login?login=username@gmail.com&password=samplepassword" -X POST -H "Content-Type: application/json" -i

Response


{
   "id": "ID of the PostgreSQL database",
   "name": "Name of the PostgreSQL database"e,
   "state": "State of the PostgreSQL database",
   "location": "Location of the PostgreSQL database",
   "vm_size": "VM size of the PostgreSQL database",
   "storage_size_gib": "Storage size of the PostgreSQL database in gib",
   "ha_type": "HA type of the PostgreSQL database",
   "connection_string": "Connection string of the PostgreSQL database",
   "primary": "Is PostgreSQL database primary",
   "firewall_rules": [
      {
        "id": "ID of the firewall rule",
        "cidr": "CIDR of the firewall rule",
      },
      ...
   ]
   "earliest_restore_time": "Earliest restore time (if primary)"
   "latest_restore_time": "Latest restore time (if primary)"
}
   

InvalidRequest

NotAuthenticated

Unauthorized

ResourceNotFound

InvalidToken

  • 200: Returns authorization token as the value of the response header's authorization key
  • 401: Unauthorized

Reset Password of PostgreSQL Database (By ID)


curl "https://api.ubicloud.com/project/{location_id}/location/{location_name}/postgres/id/{pg_id}/reset-superuser-password" \
  -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: $jwt_token" \
  -d '{"password": "new password"}'
   

Request Parameters

TypeKeyValueRequired
Pathproject_idID of the project
Pathlocation_nameName of the location
Pathpg_idID of the PostgreSQL database
BodypasswordNew superuser password for the PostgreSQL database
  • Required Query Parameters
  • login: Mail of the user
  • password: Password of the user
  • curl "api/login?login=username@gmail.com&password=samplepassword" -X POST -H "Content-Type: application/json" -i

Response


{
   "id": "ID of the PostgreSQL database",
   "name": "Name of the PostgreSQL database"e,
   "state": "State of the PostgreSQL database",
   "location": "Location of the PostgreSQL database",
   "vm_size": "VM size of the PostgreSQL database",
   "storage_size_gib": "Storage size of the PostgreSQL database in gib",
   "ha_type": "HA type of the PostgreSQL database",
   "connection_string": "Connection string of the PostgreSQL database",
   "primary": "Is PostgreSQL database primary",
   "firewall_rules": [
      {
        "id": "ID of the firewall rule",
        "cidr": "CIDR of the firewall rule",
      },
      ...
   ]
   "earliest_restore_time": "Earliest restore time (if primary)"
   "latest_restore_time": "Latest restore time (if primary)"
}
   

InvalidRequest

NotAuthenticated

Unauthorized

ResourceNotFound

InvalidToken

  • 200: Returns authorization token as the value of the response header's authorization key
  • 401: Unauthorized

Firewall

Create Firewall


curl "https://api.ubicloud.com/project/{project_id}/firewall" \
  -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: $jwt_token" \
  -d '{
        "name": "api-firewall-rule",
        "description": "Description of the firewall"
      }'
   

Request Parameters

TypeKeyValueRequired
Pathproject_idID of the project
Bodylocation_name Name of the firewall
Bodydescription Description of the firewall
  • Required Query Parameters
  • login: Mail of the user
  • password: Password of the user
  • curl "api/login?login=username@gmail.com&password=samplepassword" -X POST -H "Content-Type: application/json" -i

Response


{
  "id": "ID of the firewall",
  "name": "Name of the firewall",
  "description": "Description of the firewall",
  "firewall_rules": [
    {
      "id": "ID of the firewall rule",
      "cidr": "CIDR of the firewall rule",
      "port_range": "Port range of the firewall rule"
    },
    ...
  ]
}
   

InvalidRequest

NotAuthenticated

Unauthorized

InvalidToken

  • 200: Returns authorization token as the value of the response header's authorization key
  • 401: Unauthorized

Get Firewall


curl "https://api.ubicloud.com/project/{project_id}/firewall/{firewall_id}" \
  -X GET \
  -H "Content-Type: application/json" \
  -H "Authorization: $jwt_token"
   

Request Parameters

TypeKeyValueRequired
Pathproject_idID of the project
Bodyfirewall_id ID of the firewall
  • Required Query Parameters
  • login: Mail of the user
  • password: Password of the user
  • curl "api/login?login=username@gmail.com&password=samplepassword" -X POST -H "Content-Type: application/json" -i

Response


{
  "id": "ID of the firewall",
  "name": "Name of the firewall",
  "description": "Description of the firewall",
  "firewall_rules": [
    {
      "id": "ID of the firewall rule",
      "cidr": "CIDR of the firewall rule",
      "port_range": "Port range of the firewall rule"
    },
    ...
  ],
  private_subnets: [
    {
      "id": "ID of the private subnet",
      "name": "Name of the private subnet",
      "state": "State of the private subnet",
      "location": "Location of the private subnet",
      "net4": "IPv4 block of the private subnet",
      "net6": "IPv6 block of the private subnet",
      "nics": [
        {
          "id": "ID of the network interface"
          "name": "Name of the network interface",
          "private_ipv4": "Private IPv4 of the network interface",
          "private_ipv6": "Private IPv6 of the network interface",
          "vm_name": "Name of the virtual machine"
        },
        ...
      ]
    },
    ...
  ]
}
   

InvalidRequest

NotAuthenticated

Unauthorized

ResourceNotFound

InvalidToken

  • 200: Returns authorization token as the value of the response header's authorization key
  • 401: Unauthorized

List Firewalls of Project


curl "https://api.ubicloud.com/project/{project_id/firewall" \
  -X GET \
  -H "Content-Type: application/json" \
  -H "Authorization: $jwt_token"
   

Request Parameters

TypeKeyValueRequired
Pathproject_idID of the project
  • Required Query Parameters
  • login: Mail of the user
  • password: Password of the user
  • curl "api/login?login=username@gmail.com&password=samplepassword" -X POST -H "Content-Type: application/json" -i

Response


{
  "items" : [
      {
        "id": "ID of the firewall",
        "name": "Name of the firewall",
        "description": "Description of the firewall",
        "firewall_rules": [
          {
            "id": "ID of the firewall rule",
            "cidr": "CIDR of the firewall rule",
            "port_range": "Port range of the firewall rule"
          },
          ...
        ]
      },
      ...
  ],
  "count": "Total number of all firewalls"
}
   

InvalidRequest

NotAuthenticated

Unauthorized

ResourceNotFound

InvalidToken

  • 200: Returns authorization token as the value of the response header's authorization key
  • 401: Unauthorized

Delete Firewall


curl "https://api.ubicloud.com/project/{project_id}/firewall/{firewall_id}" \
  -X DELETE \
  -H "Content-Type: application/json" \
  -H "Authorization: $jwt_token"
   

Request Parameters

TypeKeyValueRequired
Pathproject_idID of the project
Bodyfirewall_id ID of the firewall
  • Required Query Parameters
  • login: Mail of the user
  • password: Password of the user
  • curl "api/login?login=username@gmail.com&password=samplepassword" -X POST -H "Content-Type: application/json" -i

Response

NoContent

NotAuthenticated

Unauthorized

ResourceNotFound

InvalidToken

  • 200: Returns authorization token as the value of the response header's authorization key
  • 401: Unauthorized

Attach Firewall to Subnet


curl "https://api.ubicloud.com/project/{project_id}/firewall/{firewall_id}/attach-subnet" \
  -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: $jwt_token" \
   -d '{
        "private_subnet_id": "ID of an existing private subnet"
      }'
   

Request Parameters

TypeKeyValueRequired
Pathproject_idID of the project in which virtual machines are created
Pathfirewall_idID of the firewall
Bodyprivate_subnet_id ID of the private subnet
  • Required Query Parameters
  • login: Mail of the user
  • password: Password of the user
  • curl "api/login?login=username@gmail.com&password=samplepassword" -X POST -H "Content-Type: application/json" -i

Response


{
  "id": "ID of the firewall",
  "name": "Name of the firewall",
  "description": "Description of the firewall",
  "firewall_rules": [
    {
      "id": "ID of the firewall rule",
      "cidr": "CIDR of the firewall rule",
      "port_range": "Port range of the firewall rule"
    },
    ...
  ],
  private_subnets: [
    {
      "id": "ID of the private subnet",
      "name": "Name of the private subnet",
      "state": "State of the private subnet",
      "location": "Location of the private subnet",
      "net4": "IPv4 block of the private subnet",
      "net6": "IPv6 block of the private subnet",
      "nics": [
        {
          "id": "ID of the network interface"
          "name": "Name of the network interface",
          "private_ipv4": "Private IPv4 of the network interface",
          "private_ipv6": "Private IPv6 of the network interface",
          "vm_name": "Name of the virtual machine"
        },
        ...
      ]
    },
    ...
  ]
}
   

InvalidRequest

NotAuthenticated

Unauthorized

ResourceNotFound

InvalidToken

  • 200: Returns authorization token as the value of the response header's authorization key
  • 401: Unauthorized

Detach Firewall from Subnet


curl "https://api.ubicloud.com/project/{project_id}/firewall/{firewall_id}/detach-subnet" \
  -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: $jwt_token" \
   -d '{
        "private_subnet_id": "ID of the private subnet"
      }'
   

Request Parameters

TypeKeyValueRequired
Pathproject_idID of the project in which virtual machines are created
Pathfirewall_idID of the firewall
Bodyprivate_subnet_id ID of the private subnet
  • Required Query Parameters
  • login: Mail of the user
  • password: Password of the user
  • curl "api/login?login=username@gmail.com&password=samplepassword" -X POST -H "Content-Type: application/json" -i

Response


{
  "id": "ID of the firewall",
  "name": "Name of the firewall",
  "description": "Description of the firewall",
  "firewall_rules": [
    {
      "id": "ID of the firewall rule",
      "cidr": "CIDR of the firewall rule",
      "port_range": "Port range of the firewall rule"
    },
    ...
  ],
  private_subnets: [
    {
      "id": "ID of the private subnet",
      "name": "Name of the private subnet",
      "state": "State of the private subnet",
      "location": "Location of the private subnet",
      "net4": "IPv4 block of the private subnet",
      "net6": "IPv6 block of the private subnet",
      "nics": [
        {
          "id": "ID of the network interface"
          "name": "Name of the network interface",
          "private_ipv4": "Private IPv4 of the network interface",
          "private_ipv6": "Private IPv6 of the network interface",
          "vm_name": "Name of the virtual machine"
        },
        ...
      ]
    },
    ...
  ]
}
   

InvalidRequest

NotAuthenticated

Unauthorized

ResourceNotFound

InvalidToken

  • 200: Returns authorization token as the value of the response header's authorization key
  • 401: Unauthorized

Create Firewall Rule


curl "https://api.ubicloud.com/project/{project_id}/firewall/{firewall_id}/firewall-rule" \
  -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: $jwt_token" \
   -d '{
        "cidr": "CIDR of the firewall rule",
        "port_range": "Port range of the firewall rule"
      }'
   

Request Parameters

TypeKeyValueRequired
Pathproject_idID of the project in which virtual machines are created
Pathfirewall_idID of the firewall
Bodycidr CIDR of the firewall rule
Bodyport_range Port range of the firewall rule
  • Required Query Parameters
  • login: Mail of the user
  • password: Password of the user
  • curl "api/login?login=username@gmail.com&password=samplepassword" -X POST -H "Content-Type: application/json" -i

Response


{
  "id": "ID of the firewall rule",
  "cidr": "CIDR of the firewall rule",
  "port_range": "Port range of the firewall rule"
}
   

InvalidRequest

NotAuthenticated

Unauthorized

ResourceNotFound

InvalidToken

  • 200: Returns authorization token as the value of the response header's authorization key
  • 401: Unauthorized

Delete Firewall Rule


curl "https://api.ubicloud.com/project/{project_id}/firewall/{firewall_id}/firewall-rule/{firewall_rule_id}" \
  -X DELETE \
  -H "Content-Type: application/json" \
  -H "Authorization: $jwt_token"
   

Request Parameters

TypeKeyValueRequired
Pathproject_idID of the project
Pathfirewall_idID of the firewall
Pathfirewall_rule_id ID of the firewall rule
  • Required Query Parameters
  • login: Mail of the user
  • password: Password of the user
  • curl "api/login?login=username@gmail.com&password=samplepassword" -X POST -H "Content-Type: application/json" -i

Response

NoContent

NotAuthenticated

Unauthorized

ResourceNotFound

InvalidToken

  • 200: Returns authorization token as the value of the response header's authorization key
  • 401: Unauthorized