Get one node from a given load balancer

From Hostway API Documentation
Revision as of 16:43, 2 July 2014 by Mike.robski (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

GET /accounts/{accountId}/loadbalancers/{lbId}/nodes/{lbNodeId}

This operation will retrieve all the information about a single node from a given load balancer.

Request

URI Parameters

accountId - string
The selected account Id.
lbId
The unique identifier of the load balancer.
lbNodeId -- string
The specific node to be retrieved.

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" : "{lbNodeId}",
    "serverRef" : "{lbNodeServerRef}",
    "port": "{lbNodePort}",
    "condition" : "{lbCondition}",
}

Parameters

id - string
unique node identifier for node <n>
serverRef - string
URL of this node
port -- integer
The tcp port on node <n>'s server that will be used for load balancing
condition -- string
either ENABLED or DISABLED

Examples

Successfully list details for specified load balancer node

Request

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

Response

HTTP/1.1 200 OK

{
    "id" : "1401",
    "serverRef" : "http://blah.com/accounts/accountId/flexcloud/servers/sererId",
    "port": "80",
    "condition" : "ENABLED",
 }

Failure while trying to request details for a load balancer node from a non-existent load balancer

Request

GET /accounts/{accountId}/loadbalancers/fake_load_balancer_id/nodes/1401
Content-Type:application/json
Charset=UTF-8
Authorization: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"
     }
}

Failure while trying to request details for a load balancer node that does not exist

Request

GET /accounts/{accountId}/loadbalancers/0001/nodes/fake_node_id
Content-Type:application/json
Charset=UTF-8
Authorization: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"
    }
}

Failure while trying to make unauthorized access

Request

GET /accounts/{accountId}/loadbalancers/0001/nodes/1401
Content-Type:application/json
Charset=UTF-8
Authorization:Base64-encoded fake_authentication_string

Response

HTTP/1.1 401 Unauthorized

Failure while trying to pass invalid account number

Request

GET /accounts/fake/loadbalancers/0001/nodes/1401
Content-Type:application/json
Charset=UTF-8
Authorization:Base64-encoded fake_authentication_string

Response

HTTP/1.1 404 Not Found
{
    "itemNotFound" : {
        "message": "Resource not found", 
        "code": 404, 
        "details": "",
        "errorid": "59e0b3dd-2173-432a-8ff5-60efe16e83bf"
    }
 }


blog comments powered by Disqus

Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox