Monitoring/Port
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/port
This API call is deprecated!
Create PORT check
[edit] Parameters
- account - string
- dedicated_server - string
- ip_address - string
[edit] Request
[edit] JSON
{ "monitoring": { "check": { "enabled": {enabled}, "enabledAlert": {enabled_alert} }, "options": { "port": {port} } } }
[edit] monitoring
[edit] check
- check.enabled - boolean
- Enable the check
- check.enabledAlert - boolean
- Enable alerts
[edit] options
- options.port- int
[edit] Result
[edit] JSON
{ "monitoring": { "type": "{type}", "options": { "port": {port} }, "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/port/{id}", "rel": "self" } ] }
[edit] monitoring
- type - string
- port
- links - list
- Hypermedia for this resource.
[edit] check
- check.id - string
- Unique identifier for this check.
- check.status
- Status of the port check
- check.lastCheck
- Time of last port check
- check.enabled - boolean
- Is the check enabled
- check.enabledAlert - boolean
- Are alerts enabled
[edit] options
- options.port - 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)
[edit] Examples
POST {server_name}/accounts/{account_number}/dedicatedServers/{dedicated_server}/ipAddresses/{ip_address}/monitoring/port
Request:
{"monitoring" : {"check": {"enabled": true, "enabledAlert": false }, "options": {"port": 8981}}}
Response:
- Created (201):
{"monitoring": {"type": "port", "options": {"port": 8981}, "check": {"status": null, "lastCheck": null, "enabledAlert": false, "enabled": true, "id": 42}}, "links": [{"href": "{server_name}/accounts/{account_number}/dedicatedServers/{dedicated_server}/ipAddresses/{ip_address}/monitoring/port/42", "rel": "self"}]}
POST {server_name}/accounts/{account_number}/dedicatedServers/{dedicated_server}/ipAddresses/{ip_address}/monitoring/port
Request:
{"monitoring" : {"check": {"enabledAlert": false}, "options": {"port": 8981}}}
Response:
- Bad Request (400):
{"badRequest": {"message": "POST data error", "code": 400, "details": {"monitoring.check.enabled": "Required"}}}
POST {server_name}/accounts/{account_number}/dedicatedServers/abc/ipAddresses/{ip_address}/monitoring/port
Request:
{"monitoring" : {"check": {"enabledAlert": false}, "options": {"port": 8080}}}
Response:
- Not Found (404)
POST {server_name}/accounts/{account_number}/dedicatedServers/{dedicated_server}/ipAddresses/{ip_address}/monitoring/port
Request:
{"monitoring" : {"check": {"enabled": true, "enabledAlert": false }, "options": {"port": 8981}}}
Response:
- Conflict (409)
[edit] GET /accounts/account/dedicatedServers/dedicated_server/ipAddresses/ip_address/monitoring/port/id
This API call is deprecated!
Get PORT check details
[edit] Parameters
- account - string
- dedicated_server - string
- ip_address - string
- id - string
- Id of the port check.
[edit] Result
[edit] JSON
{ "monitoring": { "type": "{type}", "options": { "port": {port} }, "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/port/{id}", "rel": "self" } ] }
[edit] monitoring
- type - string
- port
- links - list
- Hypermedia for this resource.
[edit] check
- check.id - string
- Unique identifier for this check.
- check.status
- Status of the port check
- check.lastCheck
- Time of last port check
- check.enabled - boolean
- Is the check enabled
- check.enabledAlert - boolean
- Are alerts enabled
[edit] options
- options.port - 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/port/42
Response:
- OK (200):
{"monitoring": {"type": "port", "options": {"port": 8981}, "check": {"status": null, "lastCheck": null, "enabledAlert": false, "enabled": false, "id": 42}}, "links": [{"href": "{server_name}/accounts/{account_number}/dedicatedServers/{dedicated_server}/ipAddresses/{ip_address}/monitoring/port/42/", "rel": "self"}]}
GET {server_name}/accounts/{account_number}/dedicatedServers/{dedicated_server}/ipAddresses/{ip_address}/monitoring/port/9999
Response:
- Not Found (404)
GET {server_name}/accounts/{account_number}/dedicatedServers/abc/ipAddresses/{ip_address}/monitoring/port/42
Response:
- Not Found (404)
[edit] PUT /accounts/account/dedicatedServers/dedicated_server/ipAddresses/ip_address/monitoring/port/id
This API call is deprecated!
Update PORT check
[edit] Parameters
- account - string
- dedicated_server - string
- ip_address - string
- id - string
- Id of the port check.
[edit] Request
[edit] JSON
{ "monitoring": { "check": { "enabled": {enabled}, "enabledAlert": {enabled_alert} }, "options": { "port": {port} } } }
[edit] monitoring
[edit] check
- check.enabled - boolean
- Enable the check
- check.enabledAlert - boolean
- Enable alerts
[edit] options
- options.port - int
[edit] Result
[edit] JSON
{ "monitoring": { "type": "{type}", "options": { "port": {port} }, "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/port/{id}", "rel": "self" } ] }
[edit] monitoring
- type - string
- port
- links - list
- Hypermedia for this resource.
[edit] check
- check.id - string
- Unique identifier for this check.
- check.status
- Status of the port check
- check.lastCheck
- Time of last port check
- check.enabled - boolean
- Is the check enabled
- check.enabledAlert - boolean
- Are alerts enabled
[edit] options
- options.port - 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.
- Bad Gateway (502)
[edit] Examples
PUT {server_name}/accounts/{account_number}/dedicatedServers/{dedicated_server}/ipAddresses/{ip_address}/monitoring/port/42
Request:
{"monitoring": {"check": {"enabled": false, "enabledAlert": false}, "options": {"port": 8981}}}
Response:
- OK (200):
{"monitoring": {"type": "port", "options": {"port": 8981}, "check": {"status": null, "lastCheck": null, "enabledAlert": false, "enabled": false, "id": 42}}, "links": [{"href": "{server_name}/accounts/{account_number}/dedicatedServers/{dedicated_server}/ipAddresses/{ip_address}/monitoring/port/42/", "rel": "self"}]}
PUT {server_name}/accounts/{account_number}/dedicatedServers/{dedicated_server}/ipAddresses/{ip_address}/monitoring/port/42
Request:
{"monitoring": {"options": {"port": 8981}}}
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/port/9999
Request:
{"monitoring": {"check": {"enabled": false, "enabledAlert": false}, "options": {"port": 8981}}}
Response:
- Not Found (404)
PUT {server_name}/accounts/{account_number}/dedicatedServers/{dedicated_server}/ipAddresses/{ip_address}/monitoring/port/42
Request:
{"monitoring": {"check": {"enabled": false, "enabledAlert": false}, "options": {"port": 8080}}}
Response:
- Bad Gateway (502)
[edit] DELETE /accounts/account/dedicatedServers/dedicated_server/ipAddresses/ip_address/monitoring/port/id
This API call is deprecated!
Delete PORT check
[edit] Parameters
- account - string
- dedicated_server - string
- ip_address - string
- id - string
- Id of the port 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/port/42
Response:
- No Content (204)
DELETE {server_name}/accounts/{account_number}/dedicatedServers/{dedicated_server}/ipAddresses/{ip_address}/monitoring/port/9999
Response:
- Not Found (404)