List node pools

From Hostway API Documentation
(Difference between revisions)
Jump to: navigation, search
(Response)
 
m (1 revision: Release 109)
 

Latest revision as of 12:13, 24 July 2015

Contents

GET /accounts/{accountId}/loadbalancers/{lbId}/nodePools

This operation lists existing node pools.

Request

GET /accounts/{accountId}/loadbalancers/{lbId}/nodePools

Request Parameters

accountId - string
The selected account id.
lbId - string
The selected load balancer id.

URI Parameters

pageSize - integer
Optional. Specifies the number of records per page. Default 10, Max 100.
page - integer
Optional. Specifies the page to return in paginated response. Default is 1.

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": "{lbId}",
            "displayName": "{name}",
            "protocol": "{lbProtocol}",
            "port": {lbPort},
            "algorithm": "{lbAlgorithm}",
            "timeout": {timeout},
            "links": [{"href": "https://{api-server}/accounts/{accountId}/loadbalancers/{lbId}/nodePools/{nodePoolId}", "rel": "self"}]
        }
    ],
    "links": [
        {
            "href": "http://{api-server}/account/{accountId}/loadbalancers/{lbId}/nodePools?pageSize={pageSize}&page={page}",
            "rel": "self"
        },
        {
            "href": "http://{api-server}/account/{accountId}/loadbalancers/{lbId}/nodePools?pageSize={pageSize}&page={page}",
            "rel": "first"
        }, 
        {
            "href": "http://{api-server}/account/{accountId}/loadbalancers/{lbId}/nodePools?pageSize={pageSize}&page={page}",
            "rel": "previous"
        }, 
        {
            "href": "http://{api-server}/account/{accountId}/loadbalancers/{lbId}/nodePools?pageSize={pageSize}&page={page}",
            "rel": "next"
        }, 
        {
            "href": "http://{api-server}/account/{accountId}/loadbalancers/{lbId}/nodePools?pageSize={pageSize}&page={page}",
            "rel": "last"
        }
    ]
}

Parameters

list
Hypermedia for this load balancer resource. Links to the node pools
links - list
Hypermedia Link to self and other resources relevant to the lists

Examples

Successfully list node pools

Request

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

Response

HTTP/1.1 200 OK

{
    "list" : [
        {
            "id": "743",
            "displayName": "test-lb-80-nodepools",
            "protocol" : "TCP",
            "port" : 22,
            "algorithm" : "SOURCE_IP",
            "timeout": 10,
            "links" : [{"href" : "https://{api-server}/accounts/{accountId}/loadbalancers/{lbId}/nodePools/743", "rel" : "self"}]
        }
    ],
    "links" : [
        {
            "href" : "http://{api-server}/account/{accountId}/loadbalancers/{lbId}/nodePools",
            "rel" : "self"
        }
    ]
}

Successfully list node pools with pagination

Request

GET /accounts/{accountId}/loadbalancers/{lbId}/nodePools?page=2&pageSize=3
Content-Type:application/json
Charset=UTF-8
Authorization: Basic {Base64-encoded username & password string}

Response

HTTP/1.1 200 OK

{
    "list" : [
        {
            "id": "743",
            "displayName": "test-lb-80-nodepools",
            "protocol" : "TCP",
            "port" : 22,
            "algorithm" : "SOURCE_IP",
            "timeout": 10,
            "links" : [{"href" : "https://{api-server}/accounts/{accountId}/loadbalancers/{lbId}/nodePools/743", "rel" : "self"}]
        },
        ...
    ],
    "links" : [
        {
            "href" : "http://{api-server}/accounts/{accountId}/loadbalancers/{lbId}/nodePools?page=2&pageSize=3",
            "rel" : "self"
        },
        {
            "href" : "http://{api-server}/accounts/{accountId}/loadbalancers/{lbId}/nodePools?page=1&pageSize=3",
            "rel" : "first"
        },
        {
            "href" : "http://{api-server}/accounts/{accountId}/loadbalancers/{lbId}/nodePools?page=1&pageSize=3",
            "rel" : "previous"
        },
        {
            "href" : "http://{api-server}/accounts/{accountId}/loadbalancers/{lbId}/nodePools?page=3&pageSize=3",
            "rel" : "next"
        },
        {
            "href" : "http://{api-server}/accounts/{accountId}/loadbalancers/{lbId}/nodePools?page=3&pageSize=3",
            "rel" : "last"
        }
    ]
}
Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox