Add a node to a load balancer
From Hostway API Documentation
Revision as of 16:43, 2 July 2014 by Mike.robski (Talk | contribs)
Contents |
POST /accounts/{accountId}/loadbalancers/{loadbalancerId}/nodes
This operation will add a node to an existing load balancer.
Request
URI Parameters
- accountId - string
- The selected account Id.
- loadbalancerId - string
- The selected loadbalancer Id.
Request Body
{ "serverRef":"{serverRefURL}", "port:":"{port}", "condition":"{lbNodeCondition}" }
Parameters
- serverRef - string
- the URI of this node
- port - integer
- port of this node
- condition -- string
- (optional) node condition when added (possible values are ENABLED or DISABLED)
Response
Response Codes
- Success
- HTTP/1.1 201 Created
- Failure
- HTTP/1.1 400 Bad Request
- HTTP/1.1 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.
- HTTP/1.1 404 Not Found - The resource does not exist.
Examples
Request
POST /accounts/{accountId}/loadbalancers/{loadbalancerId}/nodes Content-Type:application/json Authorization:Base64-encoded username & password string { "serverRef": "http://localhost:6543/accounts/jello614636/flexcloud/servers/jello614636-USOTE-2008-TAMPA-0002", "port":"80", "condition":"ENABLED" }
Response
201 Created Content-Type: application/json; charset=UTF-8 Location : </nowiki>{{APIBaseURL}}<nowiki>/account/{accountId}/loadbalancer/{lbId}/nodes/{nodeId}