Accounts-accountId-dedicatedServers-serverId-ipAddresses-ipaddress-natRules:GET
From Hostway API Documentation
(Difference between revisions)
(→Parameters) |
Mike.robski (Talk | contribs) m (1 revision: Release 111) |
Latest revision as of 11:15, 18 September 2015
[edit] GET /accounts/{accountId}/dedicatedServers/{serverId}/ipAddresses/{ipAddress}/natRules
Get all NAT rules, which are assigned to a specific IP address of a dedicated server
Contents |
[edit] Request
GET /accounts/{accountId}/dedicatedServers/{serverId}/ipAddresses/{ipAddress}/natRules
[edit] Request Parameters
- accountId - string
- The user account owning the dedicated server
- serverId - string
- The specified dedicated server Id
- ipAddress - string
- The specified IP address of the dedicated server
[edit] Request Headers
- Authorization - HTTP Authorization header [1]
- The Authentication credentials of the client application.
[edit] Response
[edit] Status Code
- 200 OK
- Success
- 401 Unauthorized
- The supplied credentials are invalid or do not provide permissions for this operation.
- 403 Forbidden
- The authorized user does not have permissions to access the resource.
- 404 Not Found
- The IP address, dedicated server or account does not exist.
[edit] Response Body
{ "list": [ { "priority": {priority}, "protocol": "{protocol}", "externalPort": {externalPort}, "port": {port}, "links": [ { "href": {ruleResourceURL}, "rel": "self" } ] } ], "links": [ { "href": "{resourceURL}", "rel": "self" } ] }
[edit] Parameters
- list - list
- A collection of dictionaries containing information about the NAT rules
- priority - integer
- rule priority, starting from 0 lowest priority
- protocol - string
- TCP, UDP, AH, ESP, GRE, AH+ESP or ALL
- port - integer
- internal port
- externalPort - integer
- external port
- links - list
- Hypermedia for the individual NAT rule resource. Links to NAT rule.
- links - list
- Hypermedia for this resource. Link to self.
[edit] Examples
[edit] Success getting a list of NAT rules for a specific dedicated server IP
Request
GET /accounts/test-acount/dedicatedServers/test-server-213/ipAddresses/1.1.1.1/natRules
Response
{ "list": [ { "priority": 0, "protocol": "TCP", "externalPort": 1234, "port": 4321, "links": [ { "href": "https://api.hostway.com/accounts/test-acount/dedicatedServers/test-server-213/ipAddresses/1.1.1.1/natRules/test-rule-1", "rel": "self" } ] }, { "priority": 0, "protocol": "UDP", "externalPort": 1111, "port": 2222, "links": [ { "href": "https://api.hostway.com/accounts/test-acount/dedicatedServers/test-server-213/ipAddresses/1.1.1.1/natRules/test-rule-2", "rel": "self" } ] } ], "links": [ { "href": "https://api.hostway.com/accounts/test-acount/dedicatedServers/test-server-213/ipAddresses/1.1.1.1/natRules/", "rel": "self" } ] }