Host
From Hostway API Documentation
(Difference between revisions)
Corinne.chui (Talk | contribs) m (1 revision) |
Latest revision as of 13:36, 30 May 2016
This API call is deprecated!
Contents |
PUT /accounts/account_id/dedicatedServers/dedicated_server_id/ipAddresses/ip_address/monitoring
Creates a Monitoring host
Parameters
- account_id - string
- Id of the Account
- dedicated_server_id - string
- Id of the monitored dedicated server
- ip_address - string
- Dedicated server's IP address specified
Request
JSON
{ }
Result
JSON
{ "orders": [{ "href": "http://{server-name}/orders/{order-id}/action", "rel": "related" }], "links": [{ "href": "http://{server-name}/accounts/{account-number}/dedicatedServers/{dedicated-server-id}/ipAddresses/{ip-address}/monitoring/", "rel": "self" }] }
Response Codes
- Success
- Accepted (202)
- Failure
- Bad Request (400)
- Unauthorized (401) : 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.
- No Permission (403)
Examples
PUT /accounts/test-358536378/dedicatedServers/test-358536378-000001338fd091e/ipAddresses/11.22.33.44/monitoring
- Response:
- Accepted (202):
{ "orders": [{ "href": "http://{server-name}/orders/00000139e48dfcc7639c2ab9000a33dc8c8ae4f8/action", "rel": "related" }], "links": [{ "href": "http://{server-name}/accounts/test-358536378/dedicatedServers/test-358536378-000001338fd091e/ipAddresses/11.22.33.44/monitoring/", "rel": "self" }] }
GET /accounts/account_id/dedicatedServers/dedicated_server_id/ipAddresses/ip_address/monitoring
Get Monitoring host information
Result
JSON
{ "links": [{ "href": "http://{server-name}/accounts/account_id_123/dedicatedServers/dedicated_server_id_123/ipAddresses/11.22.33.44/monitoring/", "rel": "self" }], "notificationGroups": [{ "href": "http://{server-name}/accounts/account_id_123/dedicatedServers/dedicated_server_id_123/ipAddresses/11.22.33.44/monitoring/notificationGroups/186", "rel": "related" }], "process": [{ "href": "http://{server-name}/accounts/account_id_123/dedicatedServers/dedicated_server_id_123/ipAddresses/11.22.33.44/monitoring/process", "rel": "related" }], "ping": [{ "href": "http://{server-name}/accounts/account_id_123/dedicatedServers/dedicated_server_id_123/ipAddresses/11.22.33.44/monitoring/ping", "rel": "related" }], "checks": [{ "href": "http://{server-name}/accounts/account_id_123/dedicatedServers/dedicated_server_id_123/ipAddresses/11.22.33.44/monitoring/checks", "rel": "self" }], "port": [{ "href": "http://{server-name}/accounts/account_id_123/dedicatedServers/dedicated_server_id_123/ipAddresses/11.22.33.44/monitoring/port", "rel": "related" }], "memory": [{ "href": "http://{server-name}/accounts/account_id_123/dedicatedServers/dedicated_server_id_123/ipAddresses/11.22.33.44/monitoring/memory", "rel": "related" }], "disk": [{ "href": "http://{server-name}/accounts/account_id_123/dedicatedServers/dedicated_server_id_123/ipAddresses/11.22.33.44/monitoring/disk", "rel": "related" }], "cpu": [{ "href": "http://{server-name}/accounts/account_id_123/dedicatedServers/dedicated_server_id_123/ipAddresses/11.22.33.44/monitoring/cpu", "rel": "related" }] }
- links - list
- Hypermedia for this resource.
- notificationGroups - list
- Link to Notification Groups defined for this monitoring
- process - list
- Link to Process check for this monitoring
- ping - list
- Link to Ping check for this monitoring
- checks - list
- Link to Checks list for this monitoring
- port - list
- Link to Port check for this monitoring
- memory - list
- Link to Memory check for this monitoring
- disk - list
- Link to Disk check for this monitoring
- cpu - list
- Link to CPU check for this monitoring
Response Codes
- Success
- OK (200)
- Failure
- Unauthorized (401) : 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.
- No Permission (403)
- Not Found (404) : The resource requested is not found. Returned when either of account_id, dedicated_server_id or ip_address parameters do not exist.
Examples(errors)
GET /accounts/fake_account_id/dedicatedServers/dedicated_server_id_123/ipAddresses/11.22.33.44/monitoring
- Response:
- Not Found (404):
{"itemNotFound": {"message": "/accounts/fake_account_id/dedicatedServers/dedicated_server_id_123/ipAddresses/11.22.33.44/monitoring", "code": 404, "details": ""}}
GET /accounts/account_id_123/dedicatedServers/fake_dedicated_server_id/ipAddresses/11.22.33.44/monitoring
- Response:
- Not Found (404):
{"itemNotFound": {"message": "/accounts/account_id_123/dedicatedServers/fake_dedicated_server_id/ipAddresses/11.22.33.44/monitoring", "code": 404, "details": ""}}
GET /accounts/account_id_123/dedicatedServers/dedicated_server_id_123/ipAddresses/99.99.99.99/monitoring
- Response:
- Not Found (404):
{"itemNotFound": {"message": "/accounts/account_id_123/dedicatedServers/dedicated_server_id_123/ipAddresses/99.99.99.99/monitoring", "code": 404, "details": ""}}