Accounts-account-dedicatedServers-server-ipAddresses:GET
From Hostway API Documentation
GET /accounts/{account_number}/dedicatedServers/{serverId}/ipAddresses
Retrieves a list of the IP addresses of a dedicated server
Contents |
Request
GET /accounts/{account_number}/dedicatedServers/{serverId}/ipAddresses
GET /accounts/{account_number}/dedicatedServers/{serverId}/ipAddresses?status=pending
Request Parameters
- account_number - string
- The user account owning the dedicated servers
- serverId - string
- The specified dedicated server Id
URI Parameters
- status- string
- Specifies the status of the IP product, which is a child of the Dedicated Server product. Can be "open" or "pending".
- details - string
- If set to true details will be displayed for each IP address
Request Headers
- Authorization - HTTP Authorization header [1]
- The Authentication credentials of the client application.
Response
Response Body
[
"{APIBaseURL}/accounts/{accountId}/dedicatedServers/{serverId}/ipAddresses/{ipAddress}",
"{APIBaseURL}/accounts/{accountId}/dedicatedServers/{serverId}/ipAddresses/{ipAddress}"
]
Expected Response Codes
- 200 OK
- Success
- 401 Unauthorized
- The supplied credentials are invalid.
- 403 Forbidden
- The authorized user does not have permissions to access the resource. The only user(s) who has access to the dedicated servers list must be a sales agent, the account owner, or the account technical admin.
- 404 Not Found
- The account or server does not exist.
- 405 Method not allowed
- The HTTP request method is not allowed.
Examples
Get a list of a dedicated server's IPs
Request
GET /accounts/test-ng-809027223/dedicatedServers/test-ng-809027223-00000132ff10f8d8d63e8ce6000ac648/ipAddresses
Response
["http://coreapi01.ote.chicago.hostway:8092/accounts/test-ng-809027223/dedicatedServers/test-ng-809027223-00000132ff10f8d8d63e8ce6000ac648/ipAddresses/11.10.13.11"]
Get a list of a dedicated server's open IPs
Request
GET /accounts/test-ng-809027223/dedicatedServers/test-ng-809027223-00000132ff10f8d8d63e8ce6000ac648/ipAddresses?status=open
Response
["http://coreapi01.ote.chicago.hostway:8092/accounts/test-ng-809027223/dedicatedServers/test-ng-809027223-00000132ff10f8d8d63e8ce6000ac648/ipAddresses/11.10.13.11"]
Get a list with details of a dedicated server's IPs
Request
GET /accounts/test-ng-809027223/dedicatedServers/test-ng-809027223-00000132ff10f8d8d63e8ce6000ac648/ipAddresses?details=true
Response
{
"list":
[
{
"ipAddress": "200.200.200.13",
"links":
[
{
"href": "http://localhost:6545/accounts/test-ng-809027223/dedicatedServers/test-ng-809027223-00000132ff10f8d8d63e8ce6000ac648/ipAddresses/200.200.200.13",
"rel": "self"
}
]
},
{
"ipAddress": "200.200.200.14",
"links":
[
{
"href": "http://localhost:6545/accounts/test-ng-809027223/dedicatedServers/test-ng-809027223-00000132ff10f8d8d63e8ce6000ac648/ipAddresses/200.200.200.14",
"rel": "self"
}
]
}
]
}