NAV Navbar
shell

Introduction

BizFlyCloud Load Balancer API - Power by BizFlyCloud

Service Endpoint

https://manage.vccloud.vn/loadbalancers/api

Authentication

The VCCloud Load balancer use openstack keystone middleware for authorization, so you need to retrieve a token from keystone before calling VCCloud Load Balancer API:

X-Auth-Token: Token {YOUR_KEYSTONE_TOKEN}

Contact

Please contact the developers:

Terms of service
VCCloud Support - Website

General API Overview

Status Code

VCCloud Load balancer has two status codes present in response body. The provisioning_status describes the lifecycle status of the entity while the operating_status provides the observed status of the entity.

For example, a member may be in a provisioning_status of PENDING_UPDATE and have an operating_status of ONLINE. This would indicate that an update operation is occurring on this member and it is in an immutable state but it is healthy and able to service requests. This situation could occur if the user made a request to update the weight of the member.

Operating Status Codes

Code Description
ONLINE - Entity is operating normally
- All pool members are healthy
DRAINING - The member is not accepting new connections
OFFLINE - Entity is administratively disabled
DEGRADED - One or more of the entity’s components are in ERROR
ERROR - The entity has failed
- The member is failing it’s health monitoring checks
- All of the pool members are in ERROR
NO_MONITOR - No health monitor is configured for this entity and it’s status is unknown

Provisioning Status Code

Code Description
ACTIVE - The entity was provisioned successfully
DELETED - The entity has been successfully deleted
ERROR - Provisioning failed
PENDING_CREATE - The entity is being created
PENDING_UPDATE - The entity is being updated
PENDING_DELETE - The entity is being deleted

Token

- POST /token

curl --location --request POST "https://manage.bizflycloud.vn/iaas-cloud/api/token" \
  --header "Content-Type: application/json" \
  --data ""

Body Parameters

Tên Loại giá trị Mô tả
username string Email đăng nhập trang manage.bizflycloud.vn
password string Password đăng nhập trang manage.bizflycloud.vn

Load Balancers

- GET /loadbalancers

$ curl -X GET -H "X-Auth-Token: {token}" https://manage.vccloud.vn/loadbalancers/api/loadbalancers

Retrieves all load balancers in your account

Parameters
No parameters

Responses

Code Description
200 An array of load balancer

Response Example

{
    "loadbalancers": [
        {
            "network_type": "external",
            "vip_network_id": "9f36fce7-e2c5-44aa-824b-b83c2dca47f6",
            "flavor_id": "",
            "updated_at": "2018-09-18T03:45:30",
            "name": "sapd-test",
            "type": "small",
            "provider": "amphora",
            "id": "ae8e2072-31fb-464a-8285-bc2f2a6bab4d",
            "vip_qos_policy_id": "94c75cb1-ffe9-4dba-8f37-a375fc10462d",
            "tenant_id": "1e7f10a9850b45b488a3f0417ccb60e0",
            "provisioning_status": "ACTIVE",
            "vip_port_id": "59b5004b-baa7-463d-bab8-409883ce2458",
            "created_at": "2018-09-18T03:43:29",
            "listeners": [
                {
                    "id": "5482c4a4-f822-46d0-9af3-026f7579d653"
                }
            ],
            "vip_address": "103.56.156.127",
            "pools": [
                {
                    "id": "1fb271b2-a77e-4afc-8ec6-c6bc110f4c75"
                }
            ],
            "project_id": "1e7f10a9850b45b488a3f0417ccb60e0",
            "admin_state_up": true,
            "description": "",
            "vip_subnet_id": "bbad9d0a-09ee-4053-a4f8-9cd8e7ea5e86",
            "operating_status": "ONLINE"
        }
    ],
    "loadbalancers_links": []
}

- POST /loadbalancers

$ curl -X POST -H "X-Auth-Token: {token}" -d "{}" 

Create a new load balancers

Creates a load balancer.

This operation provisions a new load balancer by using the configuration that you define in the request object. After the API validates the request and starts the provisioning process, the API returns a response object that contains a unique ID and the status of provisioning the load balancer.

In the response, the load balancer provisioning status is ACTIVE, PENDING_CREATE, or ERROR.

If the status is PENDING_CREATE, issue GET /loadbalancers/{load_balancer_id} to view the progress of the provisioning operation. When the load balancer status changes to ACTIVE, the load balancer is successfully provisioned and is ready for further configuration.

If the API cannot fulfill the request due to insufficient data or data that is not valid, the service returns the HTTP Bad Request (400) response code with information about the failure in the response body. Validation errors require that you correct the error and submit the request again.

Prameters

{
  "loadbalancer": {
    "name": "test",
    "description": "",
    "network_type": "external",
    "type": "medium"
  }
}
Name In Type Description
description (Optional) body string A human-readable description for the resource.
type body string The name of type load balancer.
listeners (Optional) body array The associated listener IDs, if any.
loadbalancer body object A load balancer object.
name (Optional) body string Human-readable name of the resource.
network_type body string Type of network. One of external or internal

Responses

{
    "loadbalancer": {
        "updated_at": null,
        "vip_address": "45.124.94.216",
        "provisioning_status": "PENDING_CREATE",
        "vip_network_id": "180784e0-045d-40bb-adec-fdc3e9d3a32e",
        "vip_port_id": "7ef6fac8-1a0a-4255-b21c-03d36b1def73",
        "id": "e389f5eb-07b5-486b-be4d-4d4d1299f0ab",
        "admin_state_up": true,
        "listeners": [],
        "pools": [],
        "vip_qos_policy_id": "3b70c2d2-5a1f-44e9-9d2f-12aaa2369228",
        "operating_status": "OFFLINE",
        "flavor_id": "",
        "vip_subnet_id": "75da4441-db7c-4bdb-8ef5-b690c2fa9432",
        "project_id": "3063ff46d451438dbd19b5b4e48b6aa5",
        "name": "tsd",
        "tenant_id": "3063ff46d451438dbd19b5b4e48b6aa5",
        "description": "",
        "nova_flavor_id": "f4d23537-8a87-4c32-bb0b-60328e6f4374",
        "created_at": "2019-11-25T04:20:28",
        "provider": "amphora"
    }
}
Code Description
201 Operation has been successful

- GET /loadbalancer/{load_balancer_id}

$ curl -X PUT -H "X-Auth-Token: {token}" -d "{}"

Get a load balancer

Parameters
No parameters

Response Example

{
    "created_at": "2018-09-18T03:43:29",
    "tenant_id": "1e7f10a9850b45b488a3f0417ccb60e0",
    "type": "small",
    "pools": [
        {
            "id": "1fb271b2-a77e-4afc-8ec6-c6bc110f4c75"
        }
    ],
    "provisioning_status": "ACTIVE",
    "operating_status": "ONLINE",
    "name": "sapd-test",
    "admin_state_up": true,
    "vip_port_id": "59b5004b-baa7-463d-bab8-409883ce2458",
    "vip_address": "103.56.156.127",
    "network_type": "external",
    "vip_network_id": "9f36fce7-e2c5-44aa-824b-b83c2dca47f6",
    "vip_qos_policy_id": "94c75cb1-ffe9-4dba-8f37-a375fc10462d",
    "project_id": "1e7f10a9850b45b488a3f0417ccb60e0",
    "vip_subnet_id": "bbad9d0a-09ee-4053-a4f8-9cd8e7ea5e86",
    "listeners": [
        {
            "id": "5482c4a4-f822-46d0-9af3-026f7579d653"
        }
    ],
    "updated_at": "2018-09-18T03:45:30",
    "provider": "amphora",
    "description": "",
    "flavor_id": "",
    "id": "ae8e2072-31fb-464a-8285-bc2f2a6bab4d"
}

- PUT /loadbalancer/{load_balancer_id}

$ curl -X PUT -H "X-Auth-Token: {token}" -d "{}"

Update a load balancer

Parameters

{
    "loadbalancer": {
        "description": "Temporarily disabled load balancer",
        "admin_state_up": true,
        "name": "disabled_load_balancer"
    }
}

Response

Name Descripiton
202 Request is accepted, but processing may take some time.

Error

Name Description
400 - Bad Request Some content in the request was invalid.
401 - Unauthorized Access is denied due to invalid credentials.
403 - Forbidden Policy does not allow current user to do this operation.
404 - Not Found The requested resource could not be found.
409 - Conflict This resource has an action in progress that would conflict with this request.
500 - Internal Server Error Something went wrong with the service which prevents it from fulfilling the request.

Response Example

{
    "loadbalancer": {
        "description": "Temporarily disabled load balancer",
        "project_id": "e3cd678b11784734bc366148aa37580e",
        "provisioning_status": "PENDING_UPDATE",
        "flavor_id": "",
        "vip_subnet_id": "d4af86e1-0051-488c-b7a0-527f97490c9a",
        "vip_address": "203.0.113.50",
        "vip_network_id": "d0d217df-3958-4fbf-a3c2-8dad2908c709",
        "vip_port_id": "b4ca07d1-a31e-43e2-891a-7d14f419f342",
        "provider": "octavia",
        "created_at": "2017-02-28T00:41:44",
        "updated_at": "2017-02-28T00:43:30",
        "id": "8b6fc468-07d5-4d8b-a0b9-695060e72c31",
        "operating_status": "ONLINE",
        "name": "disabled_load_balancer"
    }
}

- DELETE /loadbalancer/{load_balancer_id}

$ curl -X DELETE -H "X-Auth-Token: {token}" -d "{}"

Delete a load balancer

Success

Name Descripiton
204 Request fulfilled but service does not return anything.

Error

Code Reason
400 - Bad Request Some content in the request was invalid.
401 - Unauthorized Access is denied due to invalid credentials.
403 - Forbidden Policy does not allow current user to do this operation.
404 - Not Found The requested resource could not be found.
409 - Conflict This resource has an action in progress that would conflict with this request.
500 - Internal Server Error Something went wrong with the service which prevents it from fulfilling the request.

Request

Name In Type Description
cascade (Optional) query boolean If true will delete all child objects of the load balancer.
loadbalancer_id path uuid The ID of the load balancer to query.

Listener

- GET /loadbalancer/{load_balancer_id}/listeners

$ curl -X GET -H "X-Auth-Token: {token}" -d "{}"

Get all listeners in a load balancer

Parameters
No parameters

Response Example

{
    "listeners_links": [],
    "listeners": [
        {
            "timeout_tcp_inspect": 0,
            "insert_headers": {
                "X-Forwarded-Port": "true",
                "X-Forwarded-For": "true"
            },
            "protocol": "HTTP",
            "default_pool_id": "1fb271b2-a77e-4afc-8ec6-c6bc110f4c75",
            "provisioning_status": "ACTIVE",
            "loadbalancers": [
                {
                    "id": "ae8e2072-31fb-464a-8285-bc2f2a6bab4d"
                }
            ],
            "protocol_port": 80,
            "operating_status": "ONLINE",
            "created_at": "2018-09-18T03:43:31",
            "admin_state_up": true,
            "default_tls_container_ref": null,
            "tenant_id": "1e7f10a9850b45b488a3f0417ccb60e0",
            "l7policies": [],
            "timeout_member_connect": 5000,
            "timeout_member_data": 50000,
            "project_id": "1e7f10a9850b45b488a3f0417ccb60e0",
            "updated_at": "2018-09-18T03:45:33",
            "connection_limit": -1,
            "name": "Default Listener",
            "sni_container_refs": [],
            "description": "",
            "timeout_client_data": 50000,
            "id": "5482c4a4-f822-46d0-9af3-026f7579d653"
        }
    ]
}

- POST /loadbalancer/{load_balancer_id}/listeners

$ curl -X POST -H "X-Auth-Token: {token}" -d "{}"

Create a new listener in a load balancer

Creates a listener for a load balancer.

The listener configures a port and protocol for the load balancer to listen on for incoming requests. A load balancer may have zero or more listeners configured.

This operation provisions a new listener by using the configuration that you define in the request object. After the API validates the request and starts the provisioning process, the API returns a response object that contains a unique ID and the status of provisioning the listener.

In the response, the listener provisioning status is ACTIVE, PENDING_CREATE, or ERROR.

To create a listener, the parent load balancer must have an ACTIVE provisioning status.

Parameters

Name In Type Description
default_pool_id (Optional) body uuid The ID of the pool used by the listener if no L7 policies match.
default_tls_container_ref (Optional) body string The URI of the key manager service secret containing a PKCS12 format certificate/key bundle for TERMINATED_TLS listeners.
description (Optional) body string A human-readable description for the resource.
insert_headers (Optional) body object A dictionary of optional headers to insert into the request before it is sent to the backend member.
l7policies (Optional) body array A list of L7 policy objects.
listeners body object A listener object.
load_balancer_id path uuid The ID of the load balancer.
name (Optional) body string Human-readable name of the resource.
protocol body string The protocol for the resource. One of HTTP, HTTPS, TCP or TERMINATED_HTTPS
protocol_port body integer The protocol port number for the resource.
sni_container_refs (Optional) body array A list of URIs to the key manager service secrets containing PKCS12 format certificate/key bundles for TERMINATED_TLS listeners.
timeout_client_data (Optional) body integer Frontend client inactivity timeout in milliseconds. Default: 50000.
timeout_member_connect (Optional) body integer Backend member connection timeout in milliseconds. Default: 5000.
timeout_member_data (Optional) body integer Backend member inactivity timeout in milliseconds. Default: 50000.
timeout_tcp_inspect (Optional) body integer Time, in milliseconds, to wait for additional TCP packets for content inspection. Default: 0.

Supported HTTP Header Insertions

Key Value Description
X-Forwarded-For string When “true” a X-Forwarded-For header is inserted into the request to the backend member that specifies the client IP address.
X-Forwarded-Port string When “true” a X-Forwarded-Port header is inserted into the request to the backend member that specifies the listener port.
X-Forwarded-Proto string When “true” a X-Forwarded-Proto header is inserted into the request to the backend member. HTTP for the HTTP listener protocol type, HTTPS for the TERMINATED_HTTPS listener protocol type.

Responses

Code Description
201 Operation has been successful

- GET /listener/{listener_id}

$ curl -X GET -H "X-Auth-Token: {token}" -d "{}"

Get detail a listeneer

Parameters
No parameters

Response Example

{
    "timeout_tcp_inspect": 0,
    "insert_headers": {
        "X-Forwarded-Port": "true",
        "X-Forwarded-For": "true"
    },
    "protocol": "HTTP",
    "default_pool_id": "1fb271b2-a77e-4afc-8ec6-c6bc110f4c75",
    "provisioning_status": "ACTIVE",
    "loadbalancers": [
        {
            "id": "ae8e2072-31fb-464a-8285-bc2f2a6bab4d"
        }
    ],
    "protocol_port": 80,
    "operating_status": "ONLINE",
    "created_at": "2018-09-18T03:43:31",
    "admin_state_up": true,
    "default_tls_container_ref": null,
    "tenant_id": "1e7f10a9850b45b488a3f0417ccb60e0",
    "l7policies": [],
    "timeout_member_connect": 5000,
    "timeout_member_data": 50000,
    "project_id": "1e7f10a9850b45b488a3f0417ccb60e0",
    "updated_at": "2018-09-18T03:45:33",
    "connection_limit": -1,
    "name": "Default Listener",
    "sni_container_refs": [],
    "description": "",
    "timeout_client_data": 50000,
    "id": "5482c4a4-f822-46d0-9af3-026f7579d653"
}

- PUT /listener/{listener_id}

$ curl -X PUT -H "X-Auth-Token: {token}" -d "{}"

Update a listeneer

Success

Code Description
202 Request is accepted, but processing may take some time

Error

Code Description
400 - Bad Request Some content in the request was invalid.
401 - Unauthorized Access is denied due to invalid credentials.
403 - Forbidden Policy does not allow current user to do this operation.
404 - Not Found The requested resource could not be found.
409 - Conflict This resource has an action in progress that would conflict with this request.
500 - Internal Server Error Something went wrong with the service which prevents it from fulfilling the request.

Request

Name In Type Description
admin_state_up (Optional) body boolean The administrative state of the resource, which is up (true) or down (false). Default is true.
default_pool_id (Optional) body uuid The ID of the pool used by the listener if no L7 policies match.
default_tls_container_ref (Optional) body string The URI of the key manager service secret containing a PKCS12 format certificate/key bundle for TERMINATED_TLS listeners. DEPRECATED: A secret container of type “certificate” containing the certificate and key for TERMINATED_TLS listeners.
description (Optional) body string A human-readable description for the resource.
insert_headers (Optional) body object A dictionary of optional headers to insert into the request before it is sent to the backend member. See Supported HTTP Header Insertions. Both keys and values are always specified as strings.
listener_id path uuid The ID of the listener to query.
name (Optional) body string Human-readable name of the resource.
sni_container_refs (Optional) body array A list of URIs to the key manager service secrets containing PKCS12 format certificate/key bundles for TERMINATED_TLS listeners. (DEPRECATED) Secret containers of type “certificate” containing the certificates and keys for TERMINATED_TLS listeners.
timeout_client_data (Optional) body integer Frontend client inactivity timeout in milliseconds. Default: 50000.
timeout_member_connect (Optional) body integer Backend member connection timeout in milliseconds. Default: 5000.
timeout_member_data (Optional) body integer Backend member inactivity timeout in milliseconds. Default: 50000.
timeout_tcp_inspect (Optional) body integer Time, in milliseconds, to wait for additional TCP packets for content inspection. Default: 0.

Response Example

{
    "listener": {
        "description": "An updated great TLS listener",
        "admin_state_up": true,
        "project_id": "e3cd678b11784734bc366148aa37580e",
        "protocol": "TERMINATED_HTTPS",
        "protocol_port": 443,
        "provisioning_status": "PENDING_UPDATE",
        "default_tls_container_ref": "http://198.51.100.10:9311/v1/containers/a570068c-d295-4780-91d4-3046a325db51",
        "loadbalancers": [
            {
                "id": "607226db-27ef-4d41-ae89-f2a800e9c2db"
            }
        ],
        "insert_headers": {
            "X-Forwarded-Port": "true",
            "X-Forwarded-For": "false"
        },
        "created_at": "2017-02-28T00:42:44",
        "updated_at": "2017-02-28T00:44:30",
        "id": "023f2e34-7806-443b-bfae-16c324569a3d",
        "operating_status": "OFFLINE",
        "default_pool_id": "ddb2b28f-89e9-45d3-a329-a359c3e39e4a",
        "sni_container_refs": [
            "http://198.51.100.10:9311/v1/containers/a570068c-d295-4780-91d4-3046a325db51",
            "http://198.51.100.10:9311/v1/containers/aaebb31e-7761-4826-8cb4-2b829caca3ee"
        ],
        "l7policies": [
            {
                "id": "5e618272-339d-4a80-8d14-dbc093091bb1"
            }
        ],
        "name": "great_updated_tls_listener",
        "timeout_client_data": 100000,
        "timeout_member_connect": 1000,
        "timeout_member_data": 100000,
        "timeout_tcp_inspect": 5
    }
}

- DELETE /listener/{listener_id}

$ curl -X DELETE -H "X-Auth-Token: {token}" -d "{}"

Update a listeneer

Success

Code Descripiton
204 Request fulfilled but service does not return anything.

Error

Code Reason
400 - Bad Request Some content in the request was invalid.
401 - Unauthorized Access is denied due to invalid credentials.
403 - Forbidden Policy does not allow current user to do this operation.
404 - Not Found The requested resource could not be found.
409 - Conflict This resource has an action in progress that would conflict with this request.
500 - Internal Server Error Something went wrong with the service which prevents it from fulfilling the request.

Request

Name In Type Description
listener_id path uuid The ID of the listener to query.

Pool

- GET /loadbalancer/{load_balancer_id}/pools

$ curl -X GET -H "X-Auth-Token: {token}" -d "{}"

Get all pool in a load balancer

Parameters
No parameters

Response Example

{
    "pools": [
        {
            "healthmonitor_id": "a1546f51-aa64-442a-a338-886561834a4c",
            "created_at": "2018-09-18T03:43:31",
            "protocol": "HTTP",
            "admin_state_up": true,
            "members": [],
            "loadbalancers": [
                {
                    "id": "ae8e2072-31fb-464a-8285-bc2f2a6bab4d"
                }
            ],
            "project_id": "1e7f10a9850b45b488a3f0417ccb60e0",
            "provisioning_status": "ACTIVE",
            "session_persistence": null,
            "listeners": [
                {
                    "id": "5482c4a4-f822-46d0-9af3-026f7579d653"
                }
            ],
            "operating_status": "ONLINE",
            "updated_at": "2018-09-18T03:45:33",
            "name": "Default",
            "lb_algorithm": "ROUND_ROBIN",
            "description": "",
            "tenant_id": "1e7f10a9850b45b488a3f0417ccb60e0",
            "id": "1fb271b2-a77e-4afc-8ec6-c6bc110f4c75"
        }
    ],
    "pools_links": []
}

- POST /loadbalancer/{load_balancer_id}/pools

$ curl -X POST -H "X-Auth-Token: {token}" https://manage.vccloud.vn/loadbalancers/api/loadbalancer/ae8e2072-31fb-464a-8285-bc2f2a6bab4d/pools

Create a new pool in a load balancer

Creates a pool for a load balancer.

The pool defines how requests should be balanced across the backend member servers.

This operation provisions a pool by using the configuration that you define in the request object. After the API validates the request and starts the provisioning process, the API returns a response object, which contains a unique ID.

In the response, the pool provisioning status is ACTIVE, PENDING_CREATE, or ERROR.

To create a pool, the parent load balancer must have an ACTIVE provisioning status.

Parameters

Name In Type Description
description (Optional) body string A human-readable description for the resource.
lb_algorithm body string The load balancing algorithm for the pool. One of LEAST_CONNECTIONS, ROUND_ROBIN, or SOURCE_IP.
listener_id (Optional) body uuid The ID of the listener for the pool. Either listener_id or loadbalancer_id must be specified.
name (Optional) body string Human-readable name of the resource.
load_balancer_id path uuid The ID of the load balancer.
protocol body string The protocol for the resource. One of HTTP, HTTPS, PROXY or TCP
session_persistence (Optional) body object A JSON object specifying the session persistence for the pool or null for no session persistence. See Pool Session Persistence. Default is null.

Session persistent

Pool session persistence tells the load balancer to attempt to send future requests from a client to the same backend member as the initial request.

When the pool has no session persistence, the session persistence object is null.

VCCloud Load Balancer currently support three session persistence methods:

Method Description
APP_COOKIE Use the specified cookie_name send future requests to the same member.
HTTP_COOKIE The load balancer will generate a cookie that is inserted into the response. This cookie will be used to send future requests to the same member.
SOURCE_IP The source IP address on the request will be hashed to send future requests to the same member.

Pool Session Persistence Object

Name In Type Description
type body string Session persistence type for the pool. One of APP_COOKIE, HTTP_COOKIE, or SOURCE_IP.
cookie_name (Optional) body string The name of the cookie to use for session persistence. Only applicable to the APP_COOKIE session persistence type where it is required.
persistence_timeout (Optional) body integer The timeout, in seconds, after which a UDP flow may be rescheduled to a different member. Currently only applies to UDP pools with session persistence of SOURCE_IP. Default is 360.
persistence_granularity (Optional) body string The netmask used to determine UDP session persistence. Currently only valid for UDP pools with session persistence of SOURCE_IP. Default netmask is 255.255.255.255, meaning per client full IP.

Responses

Code Description
201 Operation has been successful

- GET /pool/{pool_id}

$ curl -X GET -H "X-Auth-Token: {token}" https://manage.vccloud.vn/loadbalancers/api/pool/1fb271b2-a77e-4afc-8ec6-c6bc110f4c75

Get detail a pool in a load balancer

Parameters
No parameters

Response Example

{
    "healthmonitor_id": "a1546f51-aa64-442a-a338-886561834a4c",
    "created_at": "2018-09-18T03:43:31",
    "protocol": "HTTP",
    "admin_state_up": true,
    "members": [],
    "loadbalancers": [
        {
            "id": "ae8e2072-31fb-464a-8285-bc2f2a6bab4d"
        }
    ],
    "project_id": "1e7f10a9850b45b488a3f0417ccb60e0",
    "provisioning_status": "ACTIVE",
    "session_persistence": null,
    "listeners": [
        {
            "id": "5482c4a4-f822-46d0-9af3-026f7579d653"
        }
    ],
    "operating_status": "ONLINE",
    "updated_at": "2018-09-18T03:45:33",
    "healthmonitor": {
        "url_path": "/",
        "created_at": "2018-09-18T03:43:31",
        "tenant_id": "1e7f10a9850b45b488a3f0417ccb60e0",
        "type": "HTTP",
        "delay": 5,
        "max_retries": 3,
        "pools": [
            {
                "id": "1fb271b2-a77e-4afc-8ec6-c6bc110f4c75"
            }
        ],
        "provisioning_status": "ACTIVE",
        "http_method": "GET",
        "operating_status": "OFFLINE",
        "updated_at": "2018-09-18T03:45:30",
        "name": "",
        "admin_state_up": true,
        "max_retries_down": 3,
        "timeout": 5,
        "project_id": "1e7f10a9850b45b488a3f0417ccb60e0",
        "expected_codes": "200",
        "id": "a1546f51-aa64-442a-a338-886561834a4c"
    },
    "name": "Default",
    "lb_algorithm": "ROUND_ROBIN",
    "description": "",
    "tenant_id": "1e7f10a9850b45b488a3f0417ccb60e0",
    "id": "1fb271b2-a77e-4afc-8ec6-c6bc110f4c75"
}

- PUT /pool/{pool_id}

$ curl -X PUT -H "X-Auth-Token: {token}" -d "{}"

Update a pool in a load balancer

Success

Code Descripiton
202 Request is accepted

Error

Code Reason
400 - Bad Request Some content in the request was invalid.
401 - Unauthorized Access is denied due to invalid credentials.
403 - Forbidden Policy does not allow current user to do this operation.
404 - Not Found The requested resource could not be found.
409 - Conflict This resource has an action in progress that would conflict with this request.
500 - Internal Server Error Something went wrong with the service which prevents it from fulfilling the request.

Request

Name In Type Description
admin_state_up (Optional) body boolean The administrative state of the resource, which is up (true) or down (false). Default is true.
description (Optional) body string A human-readable description for the resource.
lb_algorithm (Optional) body string The load balancing algorithm for the pool. One of LEAST_CONNECTIONS, ROUND_ROBIN, or SOURCE_IP.
name (Optional) body string Human-readable name of the resource.
pool_id path uuid The ID of the pool to query.
session_persistence (Optional) body object A JSON object specifying the session persistence for the pool or null for no session persistence. See Pool Session Persistence. Default is null.

Request Example

{
    "pool": {
        "lb_algorithm": "LEAST_CONNECTIONS",
        "session_persistence": {
            "type": "SOURCE_IP"
        },
        "description": "Super Least Connections Pool",
        "name": "super-least-conn-pool"
    }
}

Response Example

{
    "pool": {
        "lb_algorithm": "LEAST_CONNECTIONS",
        "protocol": "HTTP",
        "description": "Super Least Connections Pool",
        "admin_state_up": true,
        "loadbalancers": [
            {
                "id": "607226db-27ef-4d41-ae89-f2a800e9c2db"
            }
        ],
        "created_at": "2017-05-10T18:14:44",
        "provisioning_status": "PENDING_UPDATE",
        "updated_at": "2017-05-10T23:08:12",
        "session_persistence": {
            "cookie_name": null,
            "type": "SOURCE_IP"
        },
        "listeners": [
            {
                "id": "023f2e34-7806-443b-bfae-16c324569a3d"
            }
        ],
        "members": [],
        "healthmonitor_id": null,
        "project_id": "e3cd678b11784734bc366148aa37580e",
        "id": "4029d267-3983-4224-a3d0-afb3fe16a2cd",
        "operating_status": "ONLINE",
        "name": "super-least-conn-pool"
    }
}

- DELETE /pool/{pool_id}

$ curl -X PUT -H "X-Auth-Token: {token}" -d "{}"

Update a pool in a load balancer

Parameters

Name Descripiton
204 Request fulfilled but service does not return anything.

Error

Code Reason
400 - Bad Request Some content in the request was invalid.
401 - Unauthorized Access is denied due to invalid credentials.
403 - Forbidden Policy does not allow current user to do this operation.
404 - Not Found The requested resource could not be found.
409 - Conflict This resource has an action in progress that would conflict with this request.
500 - Internal Server Error Something went wrong with the service which prevents it from fulfilling the request.

Request

Name In Type Description
pool_id path uuid The ID of the pool to query

Member

- GET /pool/{pool_id}/member

$ curl -X GET -H "X-Auth-Token: {token}" https://manage.vccloud.vn/loadbalancers/api/pool/1fb271b2-a77e-4afc-8ec6-c6bc110f4c75/member

Get all member in a pool

Parameters
No parameters

Response Example

{
    "members": [
        {
            "backup": false,
            "created_at": "2018-09-18T07:25:04",
            "weight": 1,
            "address": "10.6.169.102",
            "monitor_port": null,
            "subnet_id": "2f866d94-8218-4c9f-8c96-358837e63e6e",
            "protocol_port": 80,
            "project_id": "1e7f10a9850b45b488a3f0417ccb60e0",
            "provisioning_status": "ACTIVE",
            "monitor_address": null,
            "operating_status": "ONLINE",
            "updated_at": "2018-09-18T07:25:21",
            "name": "sapd-lemp-8",
            "admin_state_up": true,
            "tenant_id": "1e7f10a9850b45b488a3f0417ccb60e0",
            "id": "0b9b1602-fb7a-4f9e-ac2e-99f2d4f7b494"
        },
        {
            "backup": false,
            "created_at": "2018-09-18T07:25:22",
            "weight": 1,
            "address": "10.6.169.31",
            "monitor_port": null,
            "subnet_id": "2f866d94-8218-4c9f-8c96-358837e63e6e",
            "protocol_port": 80,
            "project_id": "1e7f10a9850b45b488a3f0417ccb60e0",
            "provisioning_status": "ACTIVE",
            "monitor_address": null,
            "operating_status": "ONLINE",
            "updated_at": "2018-09-18T07:25:27",
            "name": "sapd-lemp-11",
            "admin_state_up": true,
            "tenant_id": "1e7f10a9850b45b488a3f0417ccb60e0",
            "id": "54277bf2-68ea-4ddd-87ee-6bf4c91850a5"
        }
    ],
    "members_links": []
}

- GET /pool/{pool_id}/member/{member_id}

$ curl -X GET -H "X-Auth-Token: {token}" https://manage.vccloud.vn/loadbalancers/api/pool/1fb271b2-a77e-4afc-8ec6-c6bc110f4c75/member/0b9b1602-fb7a-4f9e-ac2e-99f2d4f7b494

Get detail a member

Parameters
No parameters

Response Example

{
    "backup": false,
    "created_at": "2018-09-18T07:25:04",
    "weight": 1,
    "address": "10.6.169.102",
    "monitor_port": null,
    "subnet_id": "2f866d94-8218-4c9f-8c96-358837e63e6e",
    "protocol_port": 80,
    "project_id": "1e7f10a9850b45b488a3f0417ccb60e0",
    "provisioning_status": "ACTIVE",
    "monitor_address": null,
    "operating_status": "ONLINE",
    "updated_at": "2018-09-18T07:25:21",
    "name": "sapd-lemp-8",
    "admin_state_up": true,
    "tenant_id": "1e7f10a9850b45b488a3f0417ccb60e0",
    "id": "0b9b1602-fb7a-4f9e-ac2e-99f2d4f7b494"
}

- DELETE /member/{member_id}

$ curl -X DELETE -H "X-Auth-Token: {token}" -d "{}"

Delete a member

Parameters

Name Descripiton

- PUT /member/{member_id}

$ curl -X DELETE -H "X-Auth-Token: {token}" -d "{}"

Update member

Success

Code Reason
202 - Accepted Request is accepted, but processing may take some time.

Error

Code Reason
400 - Bad Request Some content in the request was invalid.
401 - Unauthorized Access is denied due to invalid credentials.
403 - Forbidden Policy does not allow current user to do this operation.
404 - Not Found The requested resource could not be found.
409 - Conflict This resource has an action in progress that would conflict with this request.
500 - Internal Server Error Something went wrong with the service which prevents it from fulfilling the request.

Request

Name In Type Description
admin_state_up (Optional) body boolean The administrative state of the resource, which is up (true) or down (false). Default is true.
backup (Optional) body boolean Is the member a backup? Backup members only receive traffic when all non-backup members are down.
member_id path uuid The ID of the member to query.
monitor_address (Optional) body string An alternate IP address used for health monitoring a backend member. Default is null which monitors the member address.
monitor_port (Optional) body integer An alternate protocol port used for health monitoring a backend member. Default is null which monitors the member protocol_port.
name (Optional) body string Human-readable name of the resource.
pool_id path uuid The ID of the pool to query.
weight (Optional) body integer The weight of a member determines the portion of requests or connections it services compared to the other members of the pool. For example, a member with a weight of 10 receives five times as many requests as a member with a weight of 2. A value of 0 means the member does not receive new connections but continues to service existing connections. A valid value is from 0 to 256. Default is 1.

Request Example

{
    "member": {
        "name": "web-server-1-2",
        "weight": 0,
        "admin_state_up": true,
        "monitor_address": "192.0.2.40",
        "monitor_port": 8888,
        "backup": false
    }
}

Response Example

{
    "member": {
        "monitor_port": 8888,
        "project_id": "e3cd678b11784734bc366148aa37580e",
        "name": "web-server-1-2",
        "weight": 0,
        "backup": false,
        "admin_state_up": true,
        "subnet_id": "bbb35f84-35cc-4b2f-84c2-a6a29bba68aa",
        "created_at": "2017-05-11T17:21:34",
        "provisioning_status": "PENDING_UPDATE",
        "monitor_address": null,
        "updated_at": "2017-05-11T17:21:37",
        "address": "192.0.2.16",
        "protocol_port": 80,
        "id": "957a1ace-1bd2-449b-8455-820b6e4b63f3",
        "operating_status": "NO_MONITOR"
    }
}

- DELETE /members/{member_id}

Remove a Member

Success

Code Reason
204 - No Content Request fulfilled but service does not return anything.

Error

Code Reason
400 - Bad Request Some content in the request was invalid.
401 - Unauthorized Access is denied due to invalid credentials.
403 - Forbidden Policy does not allow current user to do this operation.
404 - Not Found The requested resource could not be found.
409 - Conflict This resource has an action in progress that would conflict with this request.
500 - Internal Server Error Something went wrong with the service which prevents it from fulfilling the request.

Request

Name In Type Description
member_id path uuid The ID of the member to query.
pool_id path uuid The ID of the pool to query.

Health Monitor

- PUT /healthmonitors/{healthmonitor_id}

Success

Code Reason
202 - Accepted Request is accepted, but processing may take some time.

Error

Code Reason
400 - Bad Request Some content in the request was invalid.
401 - Unauthorized Access is denied due to invalid credentials.
403 - Forbidden Policy does not allow current user to do this operation.
404 - Not Found The requested resource could not be found.
409 - Conflict This resource has an action in progress that would conflict with this request.
500 - Internal Server Error Something went wrong with the service which prevents it from fulfilling the request.

Request

Name In Type Description
admin_state_up (Optional) body boolean The administrative state of the resource, which is up (true) or down (false). Default is true.
delay (Optional) body integer The time, in seconds, between sending probes to members.
expected_codes (Optional) body string The list of HTTP status codes expected in response from the member to declare it healthy. Specify one of the following values: A single value, such as 200. A list, such as 200, 202. A range, such as 200-204. The default is 200.
healthmonitor_id path uuid The ID of the health monitor to query.
http_method (Optional) body string The HTTP method that the health monitor uses for requests. One of CONNECT, DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT, or TRACE. The default is GET.
max_retries (Optional) body integer The number of successful checks before changing the operating status of the member to ONLINE. A valid value is from 1 to 10.
max_retries_down (Optional) body integer The number of allowed check failures before changing the operating status of the member to ERROR. A valid value is from 1 to 10. The default is 3.
name (Optional) body string Human-readable name of the resource.
timeout (Optional) body integer The maximum time, in seconds, that a monitor waits to connect before it times out. This value must be less than the delay value.
url_path (Optional) body string The HTTP URL path of the request sent by the monitor to test the health of a backend member. Must be a string that begins with a forward slash (/). The default URL path is /.

Request Example

{
    "healthmonitor": {
        "name": "super-pool-health-monitor-updated",
        "admin_state_up": true,
        "delay": 5,
        "expected_codes": "200",
        "http_method": "HEAD",
        "timeout": 2,
        "url_path": "/index.html",
        "max_retries": 2,
        "max_retries_down": 2
    }
}

Response Example

{
    "healthmonitor": {
        "project_id": "e3cd678b11784734bc366148aa37580e",
        "name": "super-pool-health-monitor-updated",
        "admin_state_up": true,
        "pools": [
            {
                "id": "4029d267-3983-4224-a3d0-afb3fe16a2cd"
            }
        ],
        "created_at": "2017-05-11T23:53:47",
        "provisioning_status": "PENDING_UPDATE",
        "updated_at": "2017-05-11T23:53:47",
        "delay": 5,
        "expected_codes": "200",
        "max_retries": 2,
        "http_method": "HEAD",
        "timeout": 2,
        "max_retries_down": 2,
        "url_path": "/index.html",
        "type": "HTTP",
        "id": "8ed3c5ac-6efa-420c-bedb-99ba14e58db5",
        "operating_status": "ONLINE"
    }
}

- DELETE healthmonitors/{healthmonitor_id}

Remove a Health Monitor

Error

Code Reason
204 - No Content Request fulfilled but service does not return anything.

Error

Code Reason
400 - Bad Request Some content in the request was invalid.
401 - Unauthorized Access is denied due to invalid credentials.
403 - Forbidden Policy does not allow current user to do this operation.
404 - Not Found The requested resource could not be found.
409 - Conflict This resource has an action in progress that would conflict with this request.
500 - Internal Server Error Something went wrong with the service which prevents it from fulfilling the request.

Request

Name In Type Description
healthmonitor_id path uuid The ID of the health monitor to query.

RESTful API Errors

The LoadBalancer API uses the following error codes:

Code Meaning
400 Bad Request -- Your request is invalid.
401 Unauthorized -- Your API key is wrong.
403 Forbidden -- The kitten requested is hidden for administrators only.
404 Not Found -- The specified kitten could not be found.
405 Method Not Allowed -- You tried to access a kitten with an invalid method.
406 Not Acceptable -- You requested a format that isn't json.
410 Gone -- The kitten requested has been removed from our servers.
418 I'm a teapot.
429 Too Many Requests -- You're requesting too many kittens! Slow down!
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.