Monitoring/Port

From Hostway API Documentation
Jump to: navigation, search

Contents

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

This API call is deprecated!

Create PORT check

Parameters

account - string
dedicated_server - string
ip_address - string

Request

JSON

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

monitoring

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

Result

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

monitoring

type - string
port
links - list
Hypermedia for this resource.
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
options
options.port - 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)


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)

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

This API call is deprecated!

Get PORT check details

Parameters

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

Result

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

monitoring

type - string
port
links - list
Hypermedia for this resource.
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
options
options.port - 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/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)

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

This API call is deprecated!

Update PORT check

Parameters

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

Request

JSON

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

monitoring

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

Result

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

monitoring

type - string
port
links - list
Hypermedia for this resource.
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
options
options.port - 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.
Bad Gateway (502)


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)

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

This API call is deprecated!

Delete PORT check

Parameters

account - string
dedicated_server - string
ip_address - string
id - string
Id of the port 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/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)
Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox