Monitoring/Ping
Corinne.chui (Talk | contribs) m (1 revision) |
Latest revision as of 13:36, 30 May 2016
[edit] POST /accounts/account/dedicatedServers/dedicated_server/ipAddresses/ip_address/monitoring/ping
This API call is deprecated!
Create PING check
[edit] Parameters
- account - string
- dedicated_server - string
- ip_address - string
[edit] Request
[edit] JSON
{ "monitoring": { "check": { "enabled": {enabled}, "enabledAlert": {enabled_alert} }, "options": { "count": {count} } } }
[edit] monitoring
[edit] check
- check.enabled - boolean
- Enable the check
- check.enabledAlert - boolean
- Enable alerts
[edit] options
- options.count - int
[edit] Result
[edit] JSON
{ "monitoring": { "type": "{type}", "options": { "count": {count} }, "check": { "status": {status}, "lastCheck": {last_check}, "enabledAlert": {enabled_alert}, "enabled": {enabled}, "id": {id} } }, "links": [ { "href": "{server_name}/accounts/{account}/dedicatedServers/{dedicated_server}/ipAddresses/{ip_address}/monitoring/ping/{id}", "rel": "self" } ] }
[edit] monitoring
- type - string
- ping
- links - list
- Hypermedia for this resource.
[edit] check
- check.id - string
- Unique identifier for this check.
- check.status
- Status of the ping check
- check.lastCheck
- Time of last ping check
- check.enabled - boolean
- Is the check enabled
- check.enabledAlert - boolean
- Are alerts enabled
[edit] options
- options.count - int
[edit] Response Codes
- Success
- Created (201)
- 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)
- Not Found (404) : The resource requested is not found.
- Conflict (409) : Only one ping for Dedicated Server is allowed
[edit] Examples
POST {server_name}/accounts/{account_number}/dedicatedServers/{dedicated_server}/ipAddresses/{ip_address}/monitoring/ping
Request:
{"monitoring": {"check": {"enabled": false, "enabledAlert": false}, "options": {"count": 10}}}
Response:
- Created (201):
{"monitoring": {"type": "ping", "options": {"count": 10}, "check": {"status": null, "lastCheck": null, "enabledAlert": false, "enabled": false, "id": 16}}, "links": [{"href": "{server_name}/accounts/{account_number}/dedicatedServers/{dedicated_server}/ipAddresses/{ip_address}/monitoring/ping/16", "rel": "self"}]}
POST {server_name}/accounts/{account_number}/dedicatedServers/{dedicated_server}/ipAddresses/{ip_address}/monitoring/ping
Request:
{"monitoring": {"check": {"enabled": false, "enabledAlert": false}}}
Response:
- Bad Request (400):
{"badRequest": {"message": "POST data error", "code": 400, "details": {"monitoring.options": "Required"}}}
POST {server_name}/accounts/{account_number}/dedicatedServers/abc/ipAddresses/{ip_address}/monitoring/ping
Request:
{"monitoring": {"check": {"enabled": true, "enabledAlert": false}, "options": {"count": 10}}}
Response:
- Not Found (404)
POST {server_name}/accounts/{account_number}/dedicatedServers/{dedicated_server}/ipAddresses/{ip_address}/monitoring/ping
Request:
{"monitoring": {"check": {"enabled": true, "enabledAlert": false}, "options": {"count": 10}}}
Response:
- Conflict (409)
[edit] GET /accounts/account/dedicatedServers/dedicated_server/ipAddresses/ip_address/monitoring/ping/id
This API call is deprecated!
Get PING check details
[edit] Parameters
- account - string
- dedicated_server - string
- ip_address - string
- id - string
- Id of the ping check.
[edit] Result
[edit] JSON
{ "monitoring": { "type": "{type}", "options": { "count": {count} }, "check": { "status": {status}, "lastCheck": {last_check}, "enabledAlert": {enabled_alert}, "enabled": {enabled}, "id": {id} } }, "links": [ { "href": "{server_name}/accounts/{account}/dedicatedServers/{dedicated_server}/ipAddresses/{ip_address}/monitoring/ping/{id}", "rel": "self" } ] }
[edit] monitoring
- type - string
- ping
- links - list
- Hypermedia for this resource.
[edit] check
- check.id - string
- Unique identifier for this check.
- check.status
- Status of the ping check
- check.lastCheck
- Time of last ping check
- check.enabled - boolean
- Is the check enabled
- check.enabledAlert - boolean
- Are alerts enabled
[edit] options
- options.count - int
[edit] 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.
[edit] Examples
GET {server_name}/accounts/{account_number}/dedicatedServers/{dedicated_server}/ipAddresses/{ip_address}/monitoring/ping/16
Response:
- OK (200):
{"monitoring": {"type": "ping", "options": {"count": 10}, "check": {"status": "ERROR", "lastCheck": 1334148166, "enabledAlert": false, "enabled": false, "id": 16}}, "links": [{"href": "{server_name}/accounts/{account_number}/dedicatedServers/{dedicated_server}/ipAddresses/{ip_address}/monitoring/ping/16/", "rel": "self"}]}
GET {server_name}/accounts/{account_number}/dedicatedServers/{dedicated_server}/ipAddresses/{ip_address}/monitoring/ping/9999
Response:
- Not Found (404)
GET {server_name}/accounts/{account_number}/dedicatedServers/abc/ipAddresses/{ip_address}/monitoring/ping/16
Response:
- Not Found (404)
[edit] PUT /accounts/account/dedicatedServers/dedicated_server/ipAddresses/ip_address/monitoring/ping/id
This API call is deprecated!
Update PING check
[edit] Parameters
- account - string
- dedicated_server - string
- ip_address - string
- id - string
- Id of the ping check.
[edit] Request
[edit] JSON
{ "monitoring": { "check": { "enabled": {enabled}, "enabledAlert": {enabled_alert} }, "options": { "count": {count} } } }
[edit] monitoring
[edit] check
- check.enabled - boolean
- Enable the check
- check.enabledAlert - boolean
- Enable alerts
[edit] options
- options.count - int
[edit] Result
[edit] JSON
{ "monitoring": { "type": "{type}", "options": { "count": {count} }, "check": { "status": {status}, "lastCheck": {last_check}, "enabledAlert": {enabled_alert}, "enabled": {enabled}, "id": {id} } }, "links": [ { "href": "{server_name}/accounts/{account}/dedicatedServers/{dedicated_server}/ipAddresses/{ip_address}/monitoring/ping/{id}", "rel": "self" } ] }
[edit] monitoring
- type - string
- ping
- links - list
- Hypermedia for this resource.
[edit] check
- check.id - string
- Unique identifier for this check.
- check.status
- Status of the ping check
- check.lastCheck
- Time of last ping check
- check.enabled - boolean
- Is the check enabled
- check.enabledAlert - boolean
- Are alerts enabled
[edit] options
- options.count - int
[edit] Response Codes
- Success
- OK (200)
- 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)
- Not Found (404) : The resource requested is not found.
[edit] Examples
PUT {server_name}/accounts/{account_number}/dedicatedServers/{dedicated_server}/ipAddresses/{ip_address}/monitoring/ping/16
Request:
{"monitoring": {"check": {"enabled": true, "enabledAlert": false}, "options": {"count": 3}}}
Response:
- OK (200):
{"monitoring": {"type": "ping", "options": {"count": 3}, "check": {"status": "ERROR", "lastCheck": 1334148166, "enabledAlert": false, "enabled": true, "id": 16}}, "links": [{"href": "{server_name}/accounts/{account_number}/dedicatedServers/{dedicated_server}/ipAddresses/{ip_address}/monitoring/ping/16/", "rel": "self"}]}
PUT {server_name}/accounts/{account_number}/dedicatedServers/{dedicated_server}/ipAddresses/{ip_address}/monitoring/ping/16
Request:
{"monitoring": {"options": {"count": 3}}}
Response:
- Bad Request (400):
{"badRequest": {"message": "POST data error", "code": 400, "details": {"monitoring.check": "Required"}}}
PUT {server_name}/accounts/{account_number}/dedicatedServers/{dedicated_server}/ipAddresses/{ip_address}/monitoring/ping/9999
Request:
{"monitoring": {"check": {"enabled": true, "enabledAlert": false}, "options": {"count": 3}}}
Response:
- Not Found (404)
[edit] DELETE /accounts/account/dedicatedServers/dedicated_server/ipAddresses/ip_address/monitoring/ping/id
This API call is deprecated!
Delete PING check
[edit] Parameters
- account - string
- dedicated_server - string
- ip_address - string
- id - string
- Id of the ping check.
[edit] Response Codes
- Success
- No Content (204)
- 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.
[edit] Examples
DELETE {server_name}/accounts/{account_number}/dedicatedServers/{dedicated_server}/ipAddresses/{ip_address}/monitoring/ping/16
Response:
- No Content (204)
DELETE {server_name}/accounts/{account_number}/dedicatedServers/{dedicated_server}/ipAddresses/{ip_address}/monitoring/ping/9999
Response:
- Not Found (404)