List Load Balancers

(Difference between revisions)
Jump to: navigation, search
m (1 revision: Release 95)

Revision as of 16:43, 2 July 2014

Contents

GET /accounts/{accountId}/loadbalancers

This operation lists existing load balancers.

Request

GET /accounts/{accountId}/loadbalancers?virtualIp={virtualIp}&region={region}

Request Parameters

accountId - string
The selected account Id.

URI Parameters

virtualIp - string
optional, only loadbalancers with specified virtualIp will be returned
region - string
optional, only loadbalancers in the specified region will be returned

Response

Response Codes

200 OK
401 Unauthorized
This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required.
404 Not Found
The resource does not exist.

Response Body

 {
    "list" : [
       {
           "id": "743",
           "protocol": "HTTP",
           "algorithm": "ROUND_ROBIN",
           "region": "ote.2008.tampa",
           "virtualIp": "10.140.141.88",
           "port": 80,
           "healthMonitor": {},
           "timeout": 5,
           "displayName": "test-lb-name",
           "nodes": [
               {
                   "serverRef": "http://localhost:6543/accounts/jello614636/flexcloud/servers/jello614636-USOTE-2008-TAMPA-0002",
                   "id": "1344",
                   "condition": "ENABLED",
                   "port": 80
               }
           ],
           "sessionPersistence": {}
       }
    ],
    "links" : [
       {
           "href" : "http://{api-server}/accounts/{accountId}/loadbalancers",
           "rel" : "self"
       }
    ],
 }

Parameters

list
the list of loadbalancers
links - list
Hypermedia for this resource.

Examples

Successfully list load balancers

Request

GET /accounts/{accountId}/loadbalancers
Content-Type:application/json
Charset=UTF-8
Authorization:Base64-encoded username & password string

Response

HTTP/1.1 200 OK

 {
    "list" : [
       {
           "id": "743",
           "protocol": "HTTP",
           "algorithm": "ROUND_ROBIN",
           "region": "ote.2008.tampa",
           "virtualIp": "10.140.141.88",
           "port": 80,
           "healthMonitor": {},
           "timeout": 5,
           "displayName": "test-lb-name",
           "nodes": [
               {
                   "serverRef": "http://localhost:6543/accounts/jello614636/flexcloud/servers/jello614636-USOTE-2008-TAMPA-0002",
                   "id": "1344",
                   "condition": "ENABLED",
                   "port": 80
               }
           ],
           "sessionPersistence": {}
       }
    ],
    "links" : [
       {
           "href" : "http://{api-server}/accounts/{accountId}/loadbalancers",
           "rel" : "self"
       }
    ],
 }

Failure while trying to make unauthorized access

Request

POST /accounts/{accountId}/loadbalancers
Content-Type:application/json
Charset=UTF-8
Authorization:Base64-encoded fake_authentication_string

Response

HTTP/1.1 401 Unauthorized

Failure while trying to pass invalid account number

Request

POST /accounts/fake/loadbalancers
Content-Type:application/json
Charset=UTF-8
Authorization:Base64-encoded <span style="color:red">fake_authentication_string</span>

Response

HTTP/1.1 404 Not Found

 {
    "itemNotFound" : {
       "message": "Resource not found", 
       "code": 404, 
       "details": "",
       "errorid": "59e0b3dd-2173-432a-8ff5-60efe16e83bf"
    }
 }


blog comments powered by Disqus

Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox