Accounts-accountId-dedicatedServers-serverId-ipAddresses-ipaddress-natRules:GET

From Hostway API Documentation
Revision as of 11:15, 18 September 2015 by Mike.robski (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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


Request

GET /accounts/{accountId}/dedicatedServers/{serverId}/ipAddresses/{ipAddress}/natRules

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

Request Headers

Authorization - HTTP Authorization header [1]
The Authentication credentials of the client application.

Response

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.

Response Body

{
    "list": [
        {
            "priority": {priority},
            "protocol": "{protocol}",
            "externalPort": {externalPort},
            "port": {port},
            "links": [
                {
                    "href": {ruleResourceURL},
                    "rel": "self"
                }
            ]
        }
    ],
   "links": [
       {
           "href": "{resourceURL}",
           "rel": "self"
       }
   ]

}
 

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.

Examples

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"
       }
   ]
}
 


blog comments powered by Disqus

Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox