Results API

The /results/:client/:check API endpoint

The /results/:client/:check API endpoint provides HTTP DELETE access to check result data for a named client and check.

/results/:client/:check (DELETE)

EXAMPLES

The following example demonstrates a /results/:client/:check request to delete check result data for a client named client-01 and a check named sensu_website, resulting in a 202 (Accepted) HTTP response code indicating that the result was successful, but that no content is provided as output.

curl -s -i -X DELETE http://127.0.0.1:3000/results/client-01/sensu_website
HTTP/1.1 202 Accepted
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS
Access-Control-Allow-Credentials: true
Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, Authorization
Connection: close
Server: thin

API specification

/results/:client/:check (DELETE)
description Delete a check result for a given client & check name.
example url http://hostname:3000/results/i-424242/chef_client_process
parameters
  • dc:
    • required: false
    • type: String
    • description: If the check name is present in multiple datacenters, specifying the dc parameter accesses only the check found in that datacenter.
    • example: http://hostname:3000/results/i-424242/chef_client_process?dc=us_west1
response type HTTP-header only (No Content)
response codes
  • Success: 202 (Accepted)
  • Found in multiple datacenters: 300 (Multiple Choices)
  • Missing: 404 (Not Found)
  • Error: 500 (Internal Server Error)
output
HTTP/1.1 202 Accepted
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS
Access-Control-Allow-Credentials: true
Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, Authorization
Connection: close
Server: thin