Get a Load Balancer
From Hostway API Documentation
(Difference between revisions)
Mike.robski (Talk | contribs) |
Mike.robski (Talk | contribs) m (1 revision: Release 109) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
= '''GET''' /accounts/''{accountId}''/loadbalancers/''{lbId}'' = | = '''GET''' /accounts/''{accountId}''/loadbalancers/''{lbId}'' = | ||
− | This operation | + | This operation lists the details for the specified load balancer |
== Request == | == Request == | ||
− | === | + | <code>GET /accounts/''{accountId}''/loadbalancers/''{lbId}''</code> |
+ | |||
+ | === Request Parameters === | ||
; accountId - ''string'' | ; accountId - ''string'' | ||
− | : The selected account | + | : The selected account id. |
; lbId - ''string'' | ; lbId - ''string'' | ||
− | : The | + | : The selected load balancer id. |
== Response == | == Response == | ||
Line 23: | Line 25: | ||
=== Response Body === | === Response Body === | ||
<nowiki> | <nowiki> | ||
− | + | { | |
− | + | "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"}] | |
− | + | }</nowiki> | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
==== Parameters ==== | ==== Parameters ==== | ||
; id - ''string'' | ; id - ''string'' | ||
− | : The id of this Load Balancer. | + | : The id of this Load Balancer. |
; displayName - ''string'' | ; displayName - ''string'' | ||
− | : The display name of the | + | : The display name of the load balancer |
; region - ''string'' | ; region - ''string'' | ||
− | : | + | : The region which this vm belongs to |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
; virtualIp - ''string'' | ; 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 == | == Examples == | ||
Line 108: | Line 59: | ||
'''Request''' | '''Request''' | ||
<pre> | <pre> | ||
− | GET /accounts/{accountId}/loadbalancers/ | + | GET /accounts/{accountId}/loadbalancers/123 |
Content-Type:application/json | Content-Type:application/json | ||
Charset=UTF-8 | Charset=UTF-8 | ||
− | Authorization:Base64-encoded username & password string | + | Authorization: Basic {Base64-encoded username & password string} |
</pre> | </pre> | ||
Line 119: | Line 70: | ||
{ | { | ||
− | + | "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"}] | |
− | + | } | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
</pre> | </pre> | ||
Line 161: | Line 86: | ||
Content-Type:application/json | Content-Type:application/json | ||
Charset=UTF-8 | Charset=UTF-8 | ||
− | Authorization:Base64-encoded username & password string | + | Authorization: Basic {Base64-encoded username & password string} |
</pre> | </pre> | ||
Line 168: | Line 93: | ||
HTTP/1.1 404 Not Found | HTTP/1.1 404 Not Found | ||
− | + | { | |
"itemNotFound": | "itemNotFound": | ||
− | + | { | |
− | + | "message": "Resource not found", | |
− | + | "code": 404, | |
− | + | "details": "", | |
− | + | "errorid": "59e0b3dd-2173-432a-8ff5-60efe16e83bf" | |
− | + | } | |
− | + | } | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
</pre> | </pre> | ||
− | |||
[[Category:Hostway API]] | [[Category:Hostway API]] | ||
[[Category:Load Balancer API]] | [[Category:Load Balancer API]] |
Latest revision as of 12:13, 24 July 2015
Contents |
[edit] GET /accounts/{accountId}/loadbalancers/{lbId}
This operation lists the details for the specified load balancer
[edit] Request
GET /accounts/{accountId}/loadbalancers/{lbId}
[edit] Request Parameters
- accountId - string
- The selected account id.
- lbId - string
- The selected load balancer id.
[edit] Response
[edit] 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.
[edit] 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"}] }
[edit] 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.
[edit] Examples
[edit] 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"}] }
[edit] 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" } }