core/v2/tessen

NOTE: Requests to core/v2/tessen API endpoints require you to authenticate with a Sensu API key or access token. The code examples in this document use the environment variable $SENSU_API_KEY to represent a valid API key in API requests.

The core/v2/tessen API endpoints provide HTTP access to manage Tessen configuration. Access to core/v2/tessen is restricted to the default admin user.

Get the active Tessen configuration

The /tessen API endpoint provides HTTP GET access to the active Tessen configuration.

Example

The following example demonstrates an HTTP GET request to the /tessen API endpoint:

curl -X GET \
http://127.0.0.1:8080/api/core/v2/tessen \
-H "Authorization: Key $SENSU_API_KEY"

The request returns an HTTP 200 OK response and a JSON map that contains the active Tessen configuration, indicating whether Tessen is enabled:

{
  "opt_out": false
}

API Specification

/tessen (GET)
description Returns the active Tessen configuration. An "opt_out": false response indicates that Tessen is enabled. An "opt_out": true response indicates that Tessen is disabled.
example url http://hostname:8080/api/core/v2/tessen
response type Map
response codes
  • Success: 200 (OK)
  • Error: 500 (Internal Server Error)
example output
{
  "opt_out": false
}

Opt in to or out of Tessen

The /tessen API endpoint provides HTTP PUT access to opt in to or opt out of Tessen for unlicensed Sensu instances.

NOTE: Tessen is enabled by default on Sensu backends and required for licensed Sensu instances. If you have a licensed instance and want to opt out of Tessen, contact your account manager.

Example

In the following example, an HTTP PUT request is submitted to the /tessen API endpoint to opt in to Tessen using the opt_out attribute:

curl -X PUT \
-H "Authorization: Key $SENSU_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
  "opt_out": false
}' \
http://127.0.0.1:8080/api/core/v2/tessen

The request returns an HTTP 200 OK response and the resulting Tessen configuration.

{
  "opt_out": false
}

API Specification

/tessen (PUT)
description Updates the active Tessen configuration for unlicensed Sensu instances. Tessen is enabled by default on Sensu backends and required for licensed Sensu instances.
example url http://hostname:8080/api/core/v2/tessen
request parameters Required: opt_out (for unlicensed instances, set to false to enable Tessen; set to true to opt out of Tessen).
response codes
  • Success: 200 (OK)
  • Missing: 404 (Not Found)
  • Error: 500 (Internal Server Error)
example output
{
  "opt_out": false
}