Monitoring/Ping

From Hostway API Documentation
Jump to: navigation, search

Contents

POST /accounts/account/dedicatedServers/dedicated_server/ipAddresses/ip_address/monitoring/ping

This API call is deprecated!

Create PING check

Parameters

account - string
dedicated_server - string
ip_address - string

Request

JSON

{
   "monitoring": {
      "check": {
            "enabled": {enabled}, 
            "enabledAlert": {enabled_alert}
         }, 
      "options": {
         "count": {count} 
      }
   }
}

monitoring

check
check.enabled - boolean
Enable the check
check.enabledAlert - boolean
Enable alerts
options
options.count - int

Result

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

monitoring

type - string
ping
links - list
Hypermedia for this resource.
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
options
options.count - int


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

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)

GET /accounts/account/dedicatedServers/dedicated_server/ipAddresses/ip_address/monitoring/ping/id

This API call is deprecated!

Get PING check details

Parameters

account - string
dedicated_server - string
ip_address - string
id - string
Id of the ping check.

Result

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

monitoring

type - string
ping
links - list
Hypermedia for this resource.
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
options
options.count - int


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.


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)

PUT /accounts/account/dedicatedServers/dedicated_server/ipAddresses/ip_address/monitoring/ping/id

This API call is deprecated!

Update PING check

Parameters

account - string
dedicated_server - string
ip_address - string
id - string
Id of the ping check.

Request

JSON

{
   "monitoring": {
      "check": {
            "enabled": {enabled}, 
            "enabledAlert": {enabled_alert}
         }, 
      "options": {
         "count": {count} 
      }
   }
}

monitoring

check
check.enabled - boolean
Enable the check
check.enabledAlert - boolean
Enable alerts
options
options.count - int


Result

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

monitoring

type - string
ping
links - list
Hypermedia for this resource.
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
options
options.count - int


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.


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)


DELETE /accounts/account/dedicatedServers/dedicated_server/ipAddresses/ip_address/monitoring/ping/id

This API call is deprecated!

Delete PING check

Parameters

account - string
dedicated_server - string
ip_address - string
id - string
Id of the ping check.

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.


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)
Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox