List nodes in a node pool
From Hostway API Documentation
Revision as of 12:13, 24 July 2015 by Mike.robski (Talk | contribs)
Contents |
GET /accounts/{accountId}/loadbalancers/{lbId}/nodePools/{nodePoolId}/nodes
This operation lists existing node pools.
Request
GET /accounts/{accountId}/loadbalancers/{lbId}/nodePools/{nodePoolId}/nodes
Request Parameters
- accountId - string
- The selected account id.
- lbId - string
- The selected load balancer id.
- nodePoolId - string
- The selected node pool 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": "{lbNodeId}", "port": "{lbNodePort}", "status": "{lbStatus}", "links": [{"href": "http://{api-server}/accounts/{accountId}/loadbalancers/{lbId}/nodePools/{nodePoolId}/nodes/{lbNodeId}", "rel" : "self"}] } ], "links": [ { "href": "http://{api-server}/account/{accountId}/loadbalancers/{lbId}/nodePools/{nodePoolId}/nodes?pageSize={pageSize}&page={page}", "rel": "self" }, { "href": "http://{api-server}/account/{accountId}/loadbalancers/{lbId}/nodePools/{nodePoolId}/nodes?pageSize={pageSize}&page={page}", "rel": "first" }, { "href": "http://{api-server}/account/{accountId}/loadbalancers/{lbId}/nodePools/{nodePoolId}/nodes?pageSize={pageSize}&page={page}", "rel": "previous" }, { "href": "http://{api-server}/account/{accountId}/loadbalancers/{lbId}/nodePools/{nodePoolId}/nodes?pageSize={pageSize}&page={page}", "rel": "next" }, { "href": "http://{api-server}/account/{accountId}/loadbalancers/{lbId}/nodePools/{nodePoolId}/nodes?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/{nodePoolId}/nodes Content-Type:application/json Charset=UTF-8 Authorization: Basic {Base64-encoded username & password string}
Response
HTTP/1.1 200 OK { "list" : [ { "id" : "1401", "port": "80", "status" : "ENABLED", "links" : [{"href" : "http://{api-server}/accounts/{accountId}/loadbalancers/{lbId}/nodePools/{nodePoolId}/nodes/{nodeId}", "rel" : "self"}] } ], "links" : [ { "href" : "http://{api-server}/account/{accountId}/loadbalancers/{lbId}/nodePools/{nodePoolId}/nodes", "rel" : "self" } ] }
Successfully list node pools with pagination
Request
GET /accounts/{accountId}/loadbalancers/{lbId}/nodePools/{nodePoolId}/nodes?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" : "1401", "port": "80", "status" : "ENABLED", "links" : [{"href" : "http://{api-server}/accounts/{accountId}/loadbalancers/{lbId}/nodePools/{nodePoolId}/nodes/{nodeId}", "rel" : "self"}] }, ... ], "links" : [ { "href" : "http://{api-server}/accounts/{accountId}/loadbalancers/{lbId}/nodePools/{nodePoolId}/nodes?page=2&pageSize=3", "rel" : "self" }, { "href" : "http://{api-server}/accounts/{accountId}/loadbalancers/{lbId}/nodePools/{nodePoolId}/nodes?page=1&pageSize=3", "rel" : "first" }, { "href" : "http://{api-server}/accounts/{accountId}/loadbalancers/{lbId}/nodePools/{nodePoolId}/nodes?page=1&pageSize=3", "rel" : "previous" }, { "href" : "http://{api-server}/accounts/{accountId}/loadbalancers/{lbId}/nodePools/{nodePoolId}/nodes?page=3&pageSize=3", "rel" : "next" }, { "href" : "http://{api-server}/accounts/{accountId}/loadbalancers/{lbId}/nodePools/{nodePoolId}/nodes?page=3&pageSize=3", "rel" : "last" } ] }