Get a Load Balancer
From Hostway API Documentation
Revision as of 12:13, 24 July 2015 by Mike.robski (Talk | contribs)
Contents |
GET /accounts/{accountId}/loadbalancers/{lbId}
This operation lists the details for the specified load balancer
Request
GET /accounts/{accountId}/loadbalancers/{lbId}
Request Parameters
- accountId - string
- The selected account id.
- lbId - string
- The selected load balancer id.
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
{ "id": "{lbId}", "displayName": "{lbName}", "virtualIp": "{lbVirtualIp}", "region": "{regionTextKey}", "nodePools": [{"href": "http://{api-server}/account/{accountId}/loadbalancers/{lbId}/nodepools", "rel": "related"}], "links": [{"href": "http://{api-server}/accounts/{accountId}/loadbalancers/{lbId}", "rel": "self"}] }
Parameters
- id - string
- The id of this Load Balancer.
- displayName - string
- The display name of the load balancer
- region - string
- The region which this vm belongs to
- virtualIp - string
- The public-facing ip address to be used for load-balancing (either an IPv4 or IPv6 address)
- nodePools - list
- Hypermedia to a resource of the node pools under this load balancer
- links - list
- Hypermedia for this resource. Links to self.
Examples
Successfully list details for specified load balancer
Request
GET /accounts/{accountId}/loadbalancers/123 Content-Type:application/json Charset=UTF-8 Authorization: Basic {Base64-encoded username & password string}
Response
HTTP/1.1 200 OK { "id" : "123", "displayName" : "test Load Balancer", "region" : "region-A", "virtualIps" : "2001:cdba:0000:0000:0000:0000:3257:9652", "nodePools": [{"href": "http://{api-server}/accounts/{accountId}/loadbalancers/123/nodepools", "rel": "related"}], "links" : [{"href" : "http://{api-server}/accounts/{accountId}/loadbalancers/123", "rel" : "self"}] }
Failure while trying to request details for a load balancer that does not exist
Request
GET /accounts/{accountId}/loadbalancers/{fake_load_balancer_id} Content-Type:application/json Charset=UTF-8 Authorization: Basic {Base64-encoded username & password string}
Response
HTTP/1.1 404 Not Found { "itemNotFound": { "message": "Resource not found", "code": 404, "details": "", "errorid": "59e0b3dd-2173-432a-8ff5-60efe16e83bf" } }