Monitoring/Process

From Hostway API Documentation
Jump to: navigation, search

Contents

POST /accounts/account_number/dedicatedServers/dedicated_server_id/ipAddresses/ip_address/monitoring/process

This API call is deprecated!

Create a Process check

Parameters

account_number - string
dedicated_server_id - string
ip_address - string

Request

JSON

{
   "monitoring": {
      "check": {
         "enabled": true, 
         "enabledAlert": false
      }, 
      "options": {
         "checkProcessType" : "COUNT", 
         "maxProcess" : 10
      }
   }
}

monitoring

check
check.enabled - boolean
Enable the check
check.enabledAlert - boolean
Enable alerts
options
options.checkProcessType - int
The type of process monitoring check
options.maxProcess - int
The maximum threshold number of processes

Response

JSON

{
   "monitoring": {
	"type": "process",
	"options": {
		"processName": null,
		"maxProcess": 10,
		"checkProcessType": "COUNT"
	},
	"check": {
		"status": "UNKNOWN",
		"lastCheck": 0,
		"enabledAlert": false,
		"enabled": true,
		"id": 19
	}
   },
   "links": [{
	"href": "http://{server-name}/accounts/account_number/dedicatedServers/dedicated_server_id/ipAddresses/ip_address/monitoring/process/19",
	"rel": "self"
   }]
}

monitoring

type - string
process
links - list
Hypermedia for this resource.
check
check.id - string
Unique identifier for this check.
check.status
Status of the process check
check.lastCheck
Time of last process check
check.enabled - boolean
Is the check enabled
check.enabledAlert - boolean
Are alerts enabled
options
options.processName - string
The name of the monitored process
options.maxProcess - int
The threshold count for this monitoring check
options.checkProcessType - string
The type of process check

Response Codes

Success
HTTP/1.1 201 Created
Failure
HTTP/1.1 400 Bad Request: There was an error in the request the client sent
HTTP/1.1 401 Unauthorized : 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.
HTTP/1.1 403 Forbidden : You don't have permissions to access the resource
HTTP/1.1 404 Not Found : The resource requested is not found.
HTTP/1.1 409 Conflict : Only one process check for Dedicated Server per IP is allowed

Examples

Successfully create a process check

POST http(s)://{api_server}/accounts/{account_number}/dedicatedServers/{dedicated_server}/ipAddresses/{ip_address}/monitoring/process

Request:

{"monitoring": {"check": {"enabled": true, "enabledAlert": false}, "options": {"checkProcessType" : "COUNT", "maxProcess" : 10 }}}

Response Code:

HTTP/1.1 201 Created

Response Body:

{
   "monitoring": {
	"type": "process",
	"options": {
		"processName": null,
		"maxProcess": 10,
		"checkProcessType": "COUNT"
	},
	"check": {
		"status": "UNKNOWN",
		"lastCheck": 0,
		"enabledAlert": false,
		"enabled": true,
		"id": 19
	}
   },
   "links": [{
	"href": "http://{server-name}/accounts/account_number/dedicatedServers/dedicated_server_id/ipAddresses/ip_address/monitoring/process/19",
	"rel": "self"
   }]
}


Bad request - missing options in the request body

POST http(s)://{api_server}/accounts/{account_number}/dedicatedServers/{dedicated_server}/ipAddresses/{ip_address}/monitoring/process

Request:

{"monitoring": {"check": {"enabled": false, "enabledAlert": false}}}

Response Code:

HTTP/1.1 400 Bad Request

Response Body:

{"badRequest": {"message": "POST data error", "code": 400, "details": {"monitoring.options": "Required"}}}


Request to create process check for a missing dedicated server or IP address

POST http(s)://{api_server}/accounts/{account_number}/dedicatedServers/{fake_server}/ipAddresses/{ip_address}/monitoring/process
POST http(s)://{api_server}/accounts/{account_number}/dedicatedServers/{dedicated_server}/ipAddresses/{fake_ip}/monitoring/process

Request:

{"monitoring": {"check": {"enabled": true, "enabledAlert": false}, "options": {"checkProcessType" : "COUNT", "maxProcess" : 10}}}

Response Code:

HTTP/1.1 404 Not Found


Add an already existing process check

POST http(s)://{api_server}/accounts/{account_number}/dedicatedServers/{dedicated_server}/ipAddresses/{ip_address}/monitoring/process

Request:

{"monitoring": {"check": {"enabled": true, "enabledAlert": false}, "options": {"checkProcessType" : "COUNT", "maxProcess" : 10}}}

Response Code:

HTTP/1.1 409 Conflict

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

This API call is deprecated!

Get process check details

Parameters

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

Response

JSON

{
   "monitoring": {
      "type": "{type}", 
      "options": {
         "processName": null,
	 "maxProcess": 10,
	 "checkProcessType": "COUNT"
      },
      "check": {
         "status": {status}, 
         "lastCheck": {last_check}, 
         "enabledAlert": {enabled_alert}, 
         "enabled": {enabled}, 
         "id": {id}
      }
   }, 
   "links": [
      {
         "href": "http(s)://{api_server}/accounts/{account_number}/dedicatedServers/{dedicated_server_id}/ipAddresses/{ip_address}/monitoring/process/{id}", "rel": "self"
      }
   ]
}

monitoring

type - string
process
links - list
Hypermedia for this resource.
check
check.id - string
Unique identifier for this check.
check.status
Status of the process check
check.lastCheck
Time of last process check
check.enabled - boolean
Is the check enabled
check.enabledAlert - boolean
Are alerts enabled
options
options.processName - string
The name of monitored process
options.maxProcess - int
The threshold count for this monitoring check
options.checkProcessType - string
The type of process check

Response Codes

Success
HTTP/1.1 200 Ok
Failure
HTTP/1.1 401 Unauthorized : 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.
HTTP/1.1 403 Forbidden : You don't have permissions to access the resource
HTTP/1.1 404 Not Found : The resource requested is not found.


Examples

View process check details

GET http(s)://{api_server}/accounts/{account_number}/dedicatedServers/{dedicated_server}/ipAddresses/{ip_address}/monitoring/process/19

Response Code:

HTTP/1.1 200 Ok

Response Body:

{
   "monitoring": {
      "type": "process", 
      "options": {
         "processName": null,
	 "maxProcess": 10,
	 "checkProcessType": "COUNT"
      }, 
      "check": {
         "status": "UNKNOWN",
         "lastCheck": 0,
	 "enabledAlert": false,
	 "enabled": true,
	 "id": 19
      }
   }, 
   "links": [
      {
         "href": "http(s)://{api_server}/accounts/{account_number}/dedicatedServers/{dedicated_server}/ipAddresses/{ip_address}/monitoring/process/19", "rel": "self"
      }
   ]
}

Access a non-existing process check

GET http(s)://{api_server}/accounts/{account_number}/dedicatedServers/{dedicated_server}/ipAddresses/{ip_address}/monitoring/process/9999

Response Code:

HTTP/1.1 404 Not Found

Request a check for missing server or IP addresss

GET http(s)://{api_server}/accounts/{account_number}/dedicatedServers/{fake_server}/ipAddresses/{ip_address}/monitoring/process/19
GET http(s)://{api_server}/accounts/{account_number}/dedicatedServers/{dedicated_server}/ipAddresses/{fake_ip}/monitoring/process/19

Response Code:

HTTP/1.1 404 Not Found

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

This API call is deprecated!

Update process monitoring check

Parameters

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

Request

JSON

{
   "monitoring": {
      "check": {
            "enabled": {enabled}, 
            "enabledAlert": {enabled_alert}
         }, 
      "options": {
         "checkProcessType" : "COUNT",
         "maxProcess" : 5 
      },
   }
}

monitoring

check
check.enabled - boolean
Enable the check
check.enabledAlert - boolean
Enable alerts
options
options.maxProcess - int
The threshold count for this monitoring check
options.checkProcessType - string
The type of process check

Response

JSON

{
   "monitoring": {
      "type": "{type}", 
      "options": {
         "checkProcessType" : "COUNT",
         "maxProcess" : 5
      },
      "check": {
         "status": {status}, 
         "lastCheck": {last_check}, 
         "enabledAlert": {enabled_alert}, 
         "enabled": {enabled}, 
         "id": {id}
      }
   }, 
   "links": [
      {
         "href": "http(s)://{api_server}/accounts/{account_number}/dedicatedServers/{dedicated_server}/ipAddresses/{ip_address}/monitoring/process/{id}", "rel": "self"
      }
   ]
}

monitoring

type - string
process
links - list
Hypermedia for this resource.
check
check.id - string
Unique identifier for this check.
check.status
Status of the process check
check.lastCheck
Time of last process check
check.enabled - boolean
Is the check enabled
check.enabledAlert - boolean
Are alerts enabled
options
options.maxProcess - int
The threshold count for this monitoring check
options.checkProcessType - string
The type of process check

Response Codes

Success
HTTP/1.1 200 Ok
Failure
HTTP/1.1 400 Bad Request
HTTP/1.1 401 Unauthorized : 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.
HTTP/1.1 403 Forbidden
HTTP/1.1 404 Not Found : The resource requested is not found.


Examples

Update existing process check

PUT http(s)://{api_server}/accounts/{account_number}/dedicatedServers/{dedicated_server}/ipAddresses/{ip_address}/monitoring/process/19

Request:

{"monitoring": {"check": {"enabled": true, "enabledAlert": false}, "options": {"checkProcessType" : "COUNT", "maxProcess" : 5}}}

Response Code:

HTTP/1.1 200 Ok

Response Body:

{
   "monitoring": {
      "type": "process", 
      "options": {
         "processName": null,
         "maxProcess": 5,
         "checkProcessType": "COUNT"
      }, 
      "check": {
         "status": "UNKNOWN", 
         "lastCheck": 0, 
         "enabledAlert": false, 
         "enabled": true, 
         "id": 19
      }
   }, 
   "links": [
      {
         "href": "http(s)://{api_server}/accounts/{account_number}/dedicatedServers/{dedicated_server}/ipAddresses/{ip_address}/monitoring/process/19", "rel": "self"
      }
   ]
}

Bad request - update a process check with wrong request data

PUT http(s)://{api_server}/accounts/{account_number}/dedicatedServers/{dedicated_server}/ipAddresses/{ip_address}/monitoring/process/19

Request:

{"monitoring": {"options": {"maxProcess": 5, "checkProcessType": "COUNT"}}}

Response Code:

HTTP/1.1 400 Bad Request

Response Body:

{"badRequest": {"message": "POST data error", "code": 400, "details": {"monitoring.check": "Required"}}}


Try to update a missing process check resource

PUT http(s)://{api_server}/accounts/{account_number}/dedicatedServers/{dedicated_server}/ipAddresses/{ip_address}/monitoring/process/9999

Request:

{"monitoring": {"check": {"enabled": true, "enabledAlert": false}, "options": {"maxProcess": 5, "checkProcessType": "COUNT"}}}

Response Code:

HTTP/1.1 404 Not Found

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

This API call is deprecated!

Delete process check

Parameters

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

Response Codes

Success deleting the resource
HTTP/1.1 204 No Content
Failure
HTTP/1.1 401 Unauthorized : 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.
HTTP/1.1 403 Forbidden
HTTP/1.1 404 Not Found : The resource requested is not found.


Examples

Successfully delete a process check

DELETE http(s)://{api_server}/accounts/{account_number}/dedicatedServers/{dedicated_server}/ipAddresses/{ip_address}/monitoring/process/19

Response Code:

HTTP/1.1 204 No Content


Request to delete a missing process check resource

DELETE http(s)://{api_server}/accounts/{account_number}/dedicatedServers/{dedicated_server}/ipAddresses/{ip_address}/monitoring/process/9999

Response Code:

HTTP/1.1 404 Not Found
Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox