2016-10-25 15:20:06 +00:00
{
"swagger" : "2.0" ,
"info" : {
"title" : "Chronograf" ,
"description" : "API endpoints for Chronograf" ,
2017-02-09 06:50:59 +00:00
"version" : "1.2.0"
2016-10-25 15:20:06 +00:00
} ,
"schemes" : [
"http"
] ,
"basePath" : "/chronograf/v1" ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"paths" : {
"/" : {
"get" : {
2016-11-29 21:04:54 +00:00
"tags" : [
"routes"
] ,
2016-10-25 15:20:06 +00:00
"summary" : "Lists all the endpoints" ,
"description" : "List of the endpoints." ,
"responses" : {
"200" : {
"description" : "Returns the links to the top level endpoints." ,
"schema" : {
"$ref" : "#/definitions/Routes"
}
} ,
"default" : {
"description" : "Unexpected internal service error" ,
"schema" : {
"$ref" : "#/definitions/Error"
}
}
}
}
} ,
"/sources" : {
"get" : {
2016-11-29 21:04:54 +00:00
"tags" : [
"sources"
] ,
2016-10-25 15:20:06 +00:00
"summary" : "Configured data sources" ,
"description" : "These data sources store time series data." ,
"responses" : {
"200" : {
"description" : "An array of data sources" ,
"schema" : {
"$ref" : "#/definitions/Sources"
}
} ,
"default" : {
"description" : "Unexpected internal service error" ,
"schema" : {
"$ref" : "#/definitions/Error"
}
}
}
} ,
"post" : {
2016-11-29 21:04:54 +00:00
"tags" : [
"sources"
] ,
2016-10-25 15:20:06 +00:00
"summary" : "Create new data source" ,
2016-11-18 21:35:35 +00:00
"parameters" : [
{
"name" : "source" ,
"in" : "body" ,
"description" : "Configuration options for data source" ,
"schema" : {
"$ref" : "#/definitions/Source"
}
2016-10-25 15:20:06 +00:00
}
2016-11-18 21:35:35 +00:00
] ,
2016-10-25 15:20:06 +00:00
"responses" : {
"201" : {
"description" : "Successfully create data source" ,
"headers" : {
"Location" : {
"type" : "string" ,
"format" : "url" ,
"description" : "Location of the newly created data source resource."
}
} ,
"schema" : {
"$ref" : "#/definitions/Source"
}
} ,
"default" : {
"description" : "A processing or an unexpected error." ,
"schema" : {
"$ref" : "#/definitions/Error"
}
}
}
}
} ,
"/sources/{id}" : {
"get" : {
2016-11-29 21:04:54 +00:00
"tags" : [
"sources"
] ,
2016-11-18 21:35:35 +00:00
"parameters" : [
{
"name" : "id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the data source" ,
"required" : true
}
] ,
2016-10-25 15:20:06 +00:00
"summary" : "Configured data sources" ,
"description" : "These data sources store time series data." ,
"responses" : {
"200" : {
"description" : "Data source used to supply time series information." ,
"schema" : {
"$ref" : "#/definitions/Source"
}
} ,
"404" : {
"description" : "Unknown source id" ,
"schema" : {
"$ref" : "#/definitions/Error"
}
} ,
"default" : {
"description" : "Unexpected internal service error" ,
"schema" : {
"$ref" : "#/definitions/Error"
}
}
}
} ,
"patch" : {
2016-11-29 21:04:54 +00:00
"tags" : [
"sources"
] ,
2016-10-25 15:20:06 +00:00
"summary" : "Update data source configuration" ,
2016-11-18 21:35:35 +00:00
"parameters" : [
{
"name" : "id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of a data source" ,
"required" : true
2016-10-25 15:20:06 +00:00
} ,
2016-11-18 21:35:35 +00:00
{
"name" : "config" ,
"in" : "body" ,
"description" : "data source configuration" ,
"schema" : {
"$ref" : "#/definitions/Source"
} ,
"required" : true
}
] ,
2016-10-25 15:20:06 +00:00
"responses" : {
"200" : {
"description" : "Data source's configuration was changed" ,
"schema" : {
"$ref" : "#/definitions/Source"
}
} ,
"404" : {
"description" : "Happens when trying to access a non-existent data source." ,
"schema" : {
"$ref" : "#/definitions/Error"
}
} ,
"default" : {
"description" : "A processing or an unexpected error." ,
"schema" : {
"$ref" : "#/definitions/Error"
}
}
}
} ,
"delete" : {
2016-11-29 21:04:54 +00:00
"tags" : [
"sources"
] ,
2016-11-18 21:35:35 +00:00
"parameters" : [
{
"name" : "id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the source" ,
"required" : true
}
] ,
2017-01-05 20:47:44 +00:00
"summary" : "This specific data source will be removed from the data store. All associated kapacitor resources and kapacitor rules resources are also removed." ,
2016-10-25 15:20:06 +00:00
"responses" : {
"204" : {
"description" : "data source has been removed"
} ,
"404" : {
"description" : "Unknown data source id" ,
"schema" : {
"$ref" : "#/definitions/Error"
}
} ,
"default" : {
"description" : "Unexpected internal service error" ,
"schema" : {
"$ref" : "#/definitions/Error"
}
}
}
}
} ,
"/sources/{id}/proxy" : {
"post" : {
2016-11-29 21:04:54 +00:00
"tags" : [
"sources" ,
"proxy"
] ,
2016-10-25 15:20:06 +00:00
"description" : "Query the backend time series data source and return the response according to `format`" ,
2016-11-18 21:35:35 +00:00
"parameters" : [
{
"name" : "id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the data source" ,
"required" : true
} ,
{
"name" : "query" ,
"in" : "body" ,
"description" : "Query Parameters" ,
"schema" : {
"$ref" : "#/definitions/Proxy"
} ,
"required" : true
}
] ,
2016-10-25 15:20:06 +00:00
"responses" : {
"200" : {
"description" : "Result of the query from the backend time series data source." ,
"schema" : {
"$ref" : "#/definitions/ProxyResponse"
}
} ,
"400" : {
"description" : "Any query that results in a data source error (syntax error, etc) will cause this response. The error message will be passed back in the body" ,
"schema" : {
"$ref" : "#/definitions/Error"
}
} ,
"404" : {
"description" : "Data source id does not exist." ,
"schema" : {
"$ref" : "#/definitions/Error"
}
} ,
"408" : {
"description" : "Timeout trying to query data source." ,
"schema" : {
"$ref" : "#/definitions/Error"
}
} ,
"default" : {
"description" : "Unexpected internal service error" ,
"schema" : {
"$ref" : "#/definitions/Error"
}
}
}
}
} ,
2017-02-22 17:35:19 +00:00
"/sources/{id}/permissions" : {
"get" : {
"tags" : [
"sources" ,
"users"
] ,
"summary" : "Retrieve possible permissions for this data source" ,
"parameters" : [
{
"name" : "id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the data source" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "Listing of all possible permissions" ,
"schema" : {
"$ref" : "#/definitions/AllPermissions"
}
} ,
"404" : {
"description" : "Data source id does not exist." ,
"schema" : {
"$ref" : "#/definitions/Error"
}
} ,
"default" : {
"description" : "A processing or an unexpected error." ,
"schema" : {
"$ref" : "#/definitions/Error"
}
}
}
}
} ,
"/sources/{id}/users" : {
"get" : {
"tags" : [
"sources" ,
"users"
] ,
"summary" : "Retrieve all data sources users" ,
"parameters" : [
{
"name" : "id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the data source" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "Listing of all users" ,
"schema" : {
"$ref" : "#/definitions/Users"
}
} ,
"404" : {
"description" : "Data source id does not exist." ,
"schema" : {
"$ref" : "#/definitions/Error"
}
} ,
"default" : {
"description" : "A processing or an unexpected error." ,
"schema" : {
"$ref" : "#/definitions/Error"
}
}
}
} ,
2016-10-25 15:20:06 +00:00
"post" : {
2016-11-29 21:04:54 +00:00
"tags" : [
2017-02-22 17:35:19 +00:00
"sources" ,
2016-11-29 21:04:54 +00:00
"users"
] ,
2016-10-25 15:20:06 +00:00
"summary" : "Create new user for this data source" ,
2016-11-18 21:35:35 +00:00
"parameters" : [
2017-02-22 17:35:19 +00:00
{
"name" : "id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the data source" ,
"required" : true
} ,
2016-11-18 21:35:35 +00:00
{
"name" : "user" ,
"in" : "body" ,
"description" : "Configuration options for new user" ,
"schema" : {
"$ref" : "#/definitions/User"
}
2016-10-25 15:20:06 +00:00
}
2016-11-18 21:35:35 +00:00
] ,
2016-10-25 15:20:06 +00:00
"responses" : {
"201" : {
"description" : "Successfully created new user" ,
"headers" : {
"Location" : {
"type" : "string" ,
"format" : "url" ,
"description" : "Location of the newly created user resource."
}
} ,
"schema" : {
"$ref" : "#/definitions/User"
}
} ,
2017-02-22 17:35:19 +00:00
"404" : {
"description" : "Data source id does not exist." ,
"schema" : {
"$ref" : "#/definitions/Error"
}
} ,
2016-10-25 15:20:06 +00:00
"default" : {
"description" : "A processing or an unexpected error." ,
"schema" : {
"$ref" : "#/definitions/Error"
}
}
}
}
} ,
2017-02-22 17:35:19 +00:00
"/sources/{id}/users/{user_id}" : {
2016-10-25 15:20:06 +00:00
"get" : {
2016-11-29 21:04:54 +00:00
"tags" : [
2017-02-22 17:35:19 +00:00
"sources" ,
2016-11-29 21:04:54 +00:00
"users"
] ,
2016-11-18 21:35:35 +00:00
"parameters" : [
2017-02-22 17:35:19 +00:00
{
"name" : "id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the data source" ,
"required" : true
} ,
2016-11-18 21:35:35 +00:00
{
"name" : "user_id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the specific user" ,
"required" : true
}
] ,
2016-10-25 15:20:06 +00:00
"summary" : "Returns information about a specific user" ,
2017-02-22 17:35:19 +00:00
"description" : "Specific User within a data source" ,
2016-10-25 15:20:06 +00:00
"responses" : {
"200" : {
"description" : "Information relating to the user" ,
"schema" : {
"$ref" : "#/definitions/User"
}
} ,
"404" : {
2017-02-22 17:35:19 +00:00
"description" : "Unknown user or unknown source" ,
2016-10-25 15:20:06 +00:00
"schema" : {
"$ref" : "#/definitions/Error"
}
} ,
"default" : {
"description" : "Unexpected internal service error" ,
"schema" : {
"$ref" : "#/definitions/Error"
}
}
}
} ,
"patch" : {
2016-11-29 21:04:54 +00:00
"tags" : [
2017-02-22 17:35:19 +00:00
"sources" ,
2016-11-29 21:04:54 +00:00
"users"
] ,
2016-10-25 15:20:06 +00:00
"summary" : "Update user configuration" ,
2016-11-18 21:35:35 +00:00
"parameters" : [
2017-02-22 17:35:19 +00:00
{
"name" : "id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the data source" ,
"required" : true
} ,
2016-11-18 21:35:35 +00:00
{
"name" : "user_id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the specific user" ,
"required" : true
2016-11-03 06:59:09 +00:00
} ,
2016-11-18 21:35:35 +00:00
{
"name" : "config" ,
"in" : "body" ,
"description" : "user configuration" ,
"schema" : {
"$ref" : "#/definitions/User"
} ,
"required" : true
}
] ,
2016-10-25 15:20:06 +00:00
"responses" : {
"200" : {
"description" : "Users's configuration was changed" ,
"schema" : {
"$ref" : "#/definitions/User"
}
} ,
"404" : {
2017-02-22 17:35:19 +00:00
"description" : "Happens when trying to access a non-existent user or source." ,
2016-10-25 15:20:06 +00:00
"schema" : {
"$ref" : "#/definitions/Error"
}
} ,
"default" : {
"description" : "A processing or an unexpected error." ,
"schema" : {
"$ref" : "#/definitions/Error"
}
}
}
} ,
"delete" : {
2016-11-29 21:04:54 +00:00
"tags" : [
2017-02-22 17:35:19 +00:00
"sources" ,
2016-11-29 21:04:54 +00:00
"users"
] ,
2016-11-18 21:35:35 +00:00
"parameters" : [
2017-02-22 17:35:19 +00:00
{
"name" : "id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the data source" ,
"required" : true
} ,
2016-11-18 21:35:35 +00:00
{
"name" : "user_id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the specific user" ,
"required" : true
}
] ,
2017-02-22 17:35:19 +00:00
"summary" : "This specific user will be removed from the data source" ,
2016-10-25 15:20:06 +00:00
"responses" : {
"204" : {
"description" : "User has been removed"
} ,
"404" : {
2017-02-22 17:35:19 +00:00
"description" : "Unknown user id or data source" ,
2016-10-25 15:20:06 +00:00
"schema" : {
"$ref" : "#/definitions/Error"
}
} ,
"default" : {
"description" : "Unexpected internal service error" ,
"schema" : {
"$ref" : "#/definitions/Error"
}
}
}
}
} ,
2017-02-23 22:02:53 +00:00
"/sources/{id}/roles" : {
"get" : {
"tags" : [
"sources" ,
"users" ,
"roles"
] ,
"summary" : "Retrieve all data sources roles. Available only in Influx Enterprise" ,
"parameters" : [
{
"name" : "id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the data source" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "Listing of all roles" ,
"schema" : {
"$ref" : "#/definitions/Roles"
}
} ,
"404" : {
"description" : "Data source id does not exist." ,
"schema" : {
"$ref" : "#/definitions/Error"
}
} ,
"default" : {
"description" : "A processing or an unexpected error." ,
"schema" : {
"$ref" : "#/definitions/Error"
}
}
}
} ,
"post" : {
"tags" : [
"sources" ,
"users" ,
"roles"
] ,
"summary" : "Create new role for this data source" ,
"parameters" : [
{
"name" : "id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the data source" ,
"required" : true
} ,
{
"name" : "roleuser" ,
"in" : "body" ,
"description" : "Configuration options for new role" ,
"schema" : {
"$ref" : "#/definitions/Role"
}
}
] ,
"responses" : {
"201" : {
"description" : "Successfully created new role" ,
"headers" : {
"Location" : {
"type" : "string" ,
"format" : "url" ,
"description" : "Location of the newly created role resource."
}
} ,
"schema" : {
"$ref" : "#/definitions/Role"
}
} ,
"404" : {
"description" : "Data source id does not exist." ,
"schema" : {
"$ref" : "#/definitions/Error"
}
} ,
"default" : {
"description" : "A processing or an unexpected error." ,
"schema" : {
"$ref" : "#/definitions/Error"
}
}
}
}
} ,
"/sources/{id}/roles/{role_id}" : {
"get" : {
"tags" : [
"sources" ,
"users" ,
"roles"
] ,
"parameters" : [
{
"name" : "id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the data source" ,
"required" : true
} ,
{
"name" : "role_id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the specific role" ,
"required" : true
}
] ,
"summary" : "Returns information about a specific role" ,
"description" : "Specific role within a data source" ,
"responses" : {
"200" : {
"description" : "Information relating to the role" ,
"schema" : {
"$ref" : "#/definitions/Role"
}
} ,
"404" : {
"description" : "Unknown role or unknown source" ,
"schema" : {
"$ref" : "#/definitions/Error"
}
} ,
"default" : {
"description" : "Unexpected internal service error" ,
"schema" : {
"$ref" : "#/definitions/Error"
}
}
}
} ,
"patch" : {
"tags" : [
"sources" ,
"users" ,
"roles"
] ,
"summary" : "Update role configuration" ,
"parameters" : [
{
"name" : "id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the data source" ,
"required" : true
} ,
{
"name" : "role_id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the specific role" ,
"required" : true
} ,
{
"name" : "config" ,
"in" : "body" ,
"description" : "role configuration" ,
"schema" : {
"$ref" : "#/definitions/Role"
} ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "Roles's configuration was changed" ,
"schema" : {
"$ref" : "#/definitions/Role"
}
} ,
"404" : {
"description" : "Happens when trying to access a non-existent role or source." ,
"schema" : {
"$ref" : "#/definitions/Error"
}
} ,
"default" : {
"description" : "A processing or an unexpected error." ,
"schema" : {
"$ref" : "#/definitions/Error"
}
}
}
} ,
"delete" : {
"tags" : [
"sources" ,
"users" ,
"roles"
] ,
"parameters" : [
{
"name" : "id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the data source" ,
"required" : true
} ,
{
"name" : "role_id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the specific role" ,
"required" : true
}
] ,
"summary" : "This specific role will be removed from the data source" ,
"responses" : {
"204" : {
"description" : "Role has been removed"
} ,
"404" : {
"description" : "Unknown role id or data source" ,
"schema" : {
"$ref" : "#/definitions/Error"
}
} ,
"default" : {
"description" : "Unexpected internal service error" ,
"schema" : {
"$ref" : "#/definitions/Error"
}
}
}
}
} ,
2017-03-14 21:01:28 +00:00
"/sources/{id}/dbs/" : {
"get" : {
2017-03-14 23:44:44 +00:00
"tags" : [
"databases"
] ,
2017-03-14 21:01:28 +00:00
"summary" : "Retrieve all databases for a source" ,
"parameters" : [
{
"name" : "id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the data source" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "Listing of all databases for a source" ,
"schema" : {
"$ref" : "#/definitions/Databases"
}
} ,
"404" : {
"description" : "Data source id does not exist." ,
"schema" : {
"$ref" : "#/definitions/Error"
}
} ,
"default" : {
"description" : "A processing or an unexpected error." ,
"schema" : {
"$ref" : "#/definitions/Error"
}
}
}
} ,
"post" : {
2017-03-14 23:44:44 +00:00
"tags" : [
"databases"
] ,
2017-03-14 21:01:28 +00:00
"summary" : "Create new database for a source" ,
"parameters" : [
{
"name" : "id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the data source" ,
"required" : true
2017-03-14 22:31:57 +00:00
} ,
{
"name" : "database" ,
"in" : "body" ,
"description" : "Configuration options for a database" ,
"schema" : {
"$ref" : "#/definitions/Database"
} ,
"required" : true
2017-03-14 21:01:28 +00:00
}
] ,
"responses" : {
"201" : {
"description" : "Database successfully created." ,
"schema" : {
"$ref" : "#/definitions/Database"
}
} ,
"404" : {
"description" : "Data source id does not exist." ,
"schema" : {
"$ref" : "#/definitions/Error"
}
} ,
"default" : {
"description" : "A processing or an unexpected error." ,
"schema" : {
"$ref" : "#/definitions/Error"
}
}
}
}
} ,
"/sources/{id}/dbs/{db_id}" : {
"delete" : {
2017-03-14 23:44:44 +00:00
"tags" : [
"databases"
] ,
2017-03-14 22:31:57 +00:00
"summary" : "Delete database for a source" ,
"parameters" : [
{
"name" : "id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the data source" ,
"required" : true
} ,
{
"name" : "db_id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the database" ,
"required" : true
}
] ,
"responses" : {
"204" : {
"description" : "Database has been deleted" ,
} ,
"404" : {
"description" : "Data source id does not exist." ,
"schema" : {
"$ref" : "#/definitions/Error"
}
} ,
"default" : {
"description" : "A processing or an unexpected error." ,
"schema" : {
"$ref" : "#/definitions/Error"
}
}
}
2017-03-14 21:01:28 +00:00
}
} ,
"/sources/{id}/dbs/{db_id}/rps" : {
"get" : {
2017-03-14 23:44:44 +00:00
"tags" : [
"retention policies"
] ,
2017-03-14 21:01:28 +00:00
"summary" : "Retrieve all retention policies for a database" ,
"parameters" : [
{
"name" : "id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the data source" ,
"required" : true
} ,
{
"name" : "db_id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the database" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "Listing of all retention policies for a database" ,
"schema" : {
"$ref" : "#/definitions/RetentionPolicies"
}
} ,
"404" : {
"description" : "Specified retention policy does not exist." ,
"schema" : {
"$ref" : "#/definitions/Error"
}
} ,
"default" : {
"description" : "A processing or an unexpected error." ,
"schema" : {
"$ref" : "#/definitions/Error"
}
}
}
} ,
"post" : {
2017-03-14 23:44:44 +00:00
"tags" : [
"retention policies"
] ,
2017-03-14 21:01:28 +00:00
"summary" : "Create new retention policy for a database" ,
"parameters" : [
{
"name" : "id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the data source" ,
"required" : true
} ,
{
"name" : "db_id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the database" ,
"required" : true
2017-03-14 22:31:57 +00:00
} ,
{
"name" : "rp" ,
"in" : "body" ,
"description" : "Configuration options for the retention policy" ,
"schema" : {
"$ref" : "#/definitions/RetentionPolicy"
} ,
"required" : true
2017-03-14 21:01:28 +00:00
}
] ,
"responses" : {
"201" : {
"description" : "Retention Policy successfully created." ,
"schema" : {
"$ref" : "#/definitions/RetentionPolicy"
}
} ,
"404" : {
"description" : "Data source id does not exist." ,
"schema" : {
"$ref" : "#/definitions/Error"
}
} ,
"default" : {
"description" : "A processing or an unexpected error." ,
"schema" : {
"$ref" : "#/definitions/Error"
}
}
}
}
} ,
"/sources/{id}/dbs/{db_id}/rps/{rp_id}" : {
"patch" : {
2017-03-14 23:44:44 +00:00
"tags" : [
"retention policies"
] ,
2017-03-14 22:31:57 +00:00
"summary" : "Alter retention policy for a database" ,
"parameters" : [
{
"name" : "id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the data source" ,
"required" : true
} ,
{
"name" : "db_id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the database" ,
"required" : true
} ,
{
"name" : "rp_id" ,
"in" : "path" ,
2017-03-14 23:44:44 +00:00
"type" : "string" ,
2017-03-14 22:31:57 +00:00
"description" : "ID of the retention policy" ,
"required" : true
2017-03-14 23:44:44 +00:00
} ,
2017-03-14 22:31:57 +00:00
{
"name" : "rp" ,
"in" : "body" ,
"description" : "Configuration options for the retention policy" ,
"schema" : {
"$ref" : "#/definitions/RetentionPolicy"
} ,
"required" : true
}
]
2017-03-14 21:01:28 +00:00
} ,
"delete" : {
2017-03-14 23:44:44 +00:00
"tags" : [
"retention policies"
] ,
2017-03-14 22:31:57 +00:00
"summary" : "Delete retention policy for a database" ,
"parameters" : [
{
"name" : "id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the data source" ,
"required" : true
} ,
{
"name" : "db_id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the database" ,
"required" : true
} ,
{
"name" : "rp_id" ,
"in" : "path" ,
2017-03-14 23:44:44 +00:00
"type" : "string" ,
2017-03-14 22:31:57 +00:00
"description" : "ID of the retention policy" ,
"required" : true
}
] ,
"responses" : {
"204" : {
"description" : "Retention Policy has been deleted" ,
} ,
"404" : {
"description" : "Data source id does not exist." ,
"schema" : {
"$ref" : "#/definitions/Error"
}
} ,
"default" : {
"description" : "A processing or an unexpected error." ,
"schema" : {
"$ref" : "#/definitions/Error"
}
}
}
2017-03-14 21:01:28 +00:00
}
} ,
2016-10-25 15:20:06 +00:00
"/sources/{id}/kapacitors" : {
"get" : {
2016-11-29 21:04:54 +00:00
"tags" : [
"sources" ,
"kapacitors"
] ,
2016-11-18 21:35:35 +00:00
"parameters" : [
{
"name" : "id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the source" ,
"required" : true
}
] ,
2016-10-25 15:20:06 +00:00
"summary" : "Configured kapacitors" ,
"responses" : {
"200" : {
"description" : "An array of kapacitors" ,
"schema" : {
"$ref" : "#/definitions/Kapacitors"
}
} ,
"default" : {
"description" : "Unexpected internal service error" ,
"schema" : {
"$ref" : "#/definitions/Error"
}
}
}
} ,
"post" : {
2016-11-29 21:04:54 +00:00
"tags" : [
"sources" ,
"kapacitors"
] ,
2016-10-25 15:20:06 +00:00
"summary" : "Create new kapacitor backend" ,
2016-11-18 21:35:35 +00:00
"parameters" : [
{
"name" : "id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the source" ,
"required" : true
} ,
{
"name" : "kapacitor" ,
"in" : "body" ,
"description" : "Configuration options for kapacitor" ,
"schema" : {
"$ref" : "#/definitions/Kapacitor"
}
2016-10-25 15:20:06 +00:00
}
2016-11-18 21:35:35 +00:00
] ,
2016-10-25 15:20:06 +00:00
"responses" : {
"201" : {
"description" : "Successfully created kapacitor source" ,
"headers" : {
"Location" : {
"type" : "string" ,
"format" : "url" ,
"description" : "Location of the newly created kapacitor resource."
}
} ,
"schema" : {
"$ref" : "#/definitions/Kapacitor"
}
} ,
"default" : {
"description" : "A processing or an unexpected error." ,
"schema" : {
"$ref" : "#/definitions/Error"
}
}
}
}
} ,
"/sources/{id}/kapacitors/{kapa_id}" : {
"get" : {
2016-11-29 21:04:54 +00:00
"tags" : [
"sources" ,
"kapacitors"
] ,
2016-11-18 21:35:35 +00:00
"parameters" : [
{
"name" : "id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the source" ,
"required" : true
} ,
{
"name" : "kapa_id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the kapacitor" ,
"required" : true
}
] ,
2016-10-25 15:20:06 +00:00
"summary" : "Configured kapacitors" ,
"description" : "These kapacitors are used for monitoring and alerting." ,
"responses" : {
"200" : {
"description" : "Kapacitor connection information" ,
"schema" : {
"$ref" : "#/definitions/Kapacitor"
}
} ,
"404" : {
"description" : "Unknown data source or kapacitor id" ,
"schema" : {
"$ref" : "#/definitions/Error"
}
} ,
"default" : {
"description" : "Unexpected internal service error" ,
"schema" : {
"$ref" : "#/definitions/Error"
}
}
}
} ,
"patch" : {
2016-11-29 21:04:54 +00:00
"tags" : [
"sources" ,
"kapacitors"
] ,
2016-10-25 15:20:06 +00:00
"summary" : "Update kapacitor configuration" ,
2016-11-18 21:35:35 +00:00
"parameters" : [
{
"name" : "id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the source" ,
"required" : true
} ,
{
"name" : "kapa_id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of a kapacitor backend" ,
"required" : true
2016-11-03 06:59:09 +00:00
} ,
2016-11-18 21:35:35 +00:00
{
"name" : "config" ,
"in" : "body" ,
"description" : "kapacitor configuration" ,
"schema" : {
"$ref" : "#/definitions/Kapacitor"
} ,
"required" : true
}
] ,
2016-11-03 06:59:09 +00:00
"responses" : {
"200" : {
"description" : "Kapacitor's configuration was changed" ,
"schema" : {
"$ref" : "#/definitions/Kapacitor"
}
} ,
"404" : {
"description" : "Happens when trying to access a non-existent data source or kapacitor." ,
"schema" : {
"$ref" : "#/definitions/Error"
}
} ,
"default" : {
"description" : "A processing or an unexpected error." ,
"schema" : {
"$ref" : "#/definitions/Error"
}
}
}
} ,
"delete" : {
2016-11-29 21:04:54 +00:00
"tags" : [
"sources" ,
"kapacitors"
] ,
2016-11-18 21:35:35 +00:00
"parameters" : [
{
"name" : "id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the source" ,
"required" : true
} ,
{
"name" : "kapa_id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the kapacitor" ,
"required" : true
}
] ,
2017-01-05 20:47:44 +00:00
"summary" : "This specific kapacitor will be removed. All associated rule resources will also be removed from the store." ,
2016-11-03 06:59:09 +00:00
"responses" : {
"204" : {
"description" : "kapacitor has been removed."
} ,
"404" : {
"description" : "Unknown Data source or Kapacitor id" ,
"schema" : {
"$ref" : "#/definitions/Error"
}
} ,
"default" : {
"description" : "Unexpected internal service error" ,
"schema" : {
"$ref" : "#/definitions/Error"
}
}
}
}
} ,
2016-11-22 17:27:27 +00:00
"/sources/{id}/kapacitors/{kapa_id}/rules" : {
2016-11-03 06:59:09 +00:00
"get" : {
2016-11-29 21:04:54 +00:00
"tags" : [
"sources" ,
"kapacitors" ,
"rules"
] ,
2016-11-22 17:27:27 +00:00
"description" : "Get all defined alert rules." ,
2016-11-29 21:04:54 +00:00
"parameters" : [
{
"name" : "id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the source" ,
"required" : true
} ,
{
"name" : "kapa_id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the kapacitor backend." ,
"required" : true
}
] ,
2016-11-03 06:59:09 +00:00
"responses" : {
"200" : {
2016-11-22 17:27:27 +00:00
"description" : "All alert rules for this specific kapacitor are returned" ,
2016-11-03 06:59:09 +00:00
"schema" : {
2016-11-22 17:27:27 +00:00
"$ref" : "#/definitions/Rules"
2016-11-03 06:59:09 +00:00
}
} ,
"404" : {
"description" : "Data source or Kapacitor ID does not exist." ,
"schema" : {
"$ref" : "#/definitions/Error"
}
} ,
"default" : {
"description" : "Internal server error" ,
"schema" : {
"$ref" : "#/definitions/Error"
}
}
}
} ,
"post" : {
2016-11-29 21:04:54 +00:00
"tags" : [
"sources" ,
"kapacitors" ,
"rules"
] ,
2016-11-22 17:27:27 +00:00
"description" : "Create kapacitor alert rule" ,
2016-11-29 21:04:54 +00:00
"parameters" : [
{
"name" : "id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the source" ,
"required" : true
} ,
{
"name" : "kapa_id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the kapacitor backend." ,
"required" : true
2016-11-22 17:27:27 +00:00
} ,
2016-11-29 21:04:54 +00:00
{
"name" : "rule" ,
"in" : "body" ,
"description" : "Rule to generate alert rule" ,
"schema" : {
"$ref" : "#/definitions/Rule"
} ,
"required" : true
}
] ,
2016-11-03 06:59:09 +00:00
"responses" : {
"201" : {
2016-11-22 17:27:27 +00:00
"description" : "Successfully created new kapacitor alert rule" ,
2016-11-03 06:59:09 +00:00
"headers" : {
"Location" : {
"type" : "string" ,
"format" : "url" ,
2016-11-22 17:27:27 +00:00
"description" : "Location of the newly created kapacitor rule resource."
2016-11-03 06:59:09 +00:00
}
} ,
"schema" : {
2016-11-22 17:27:27 +00:00
"$ref" : "#/definitions/Rule"
2016-11-03 06:59:09 +00:00
}
} ,
"404" : {
2016-11-22 17:27:27 +00:00
"description" : "Source ID or Kapacitor ID does not exist." ,
"schema" : {
"$ref" : "#/definitions/Error"
}
} ,
2016-11-29 21:04:54 +00:00
"422" : {
2016-11-22 17:27:27 +00:00
"description" : "Source ID , Kapacitor ID or alert are unprocessable" ,
2016-11-03 06:59:09 +00:00
"schema" : {
"$ref" : "#/definitions/Error"
}
} ,
"default" : {
2016-11-22 17:27:27 +00:00
"description" : "Internal server error; generally a problem creating alert in kapacitor" ,
2016-11-03 06:59:09 +00:00
"schema" : {
"$ref" : "#/definitions/Error"
}
}
}
}
} ,
2016-11-22 17:27:27 +00:00
"/sources/{id}/kapacitors/{kapa_id}/rules/{rule_id}" : {
2016-11-03 06:59:09 +00:00
"get" : {
2016-11-29 21:04:54 +00:00
"tags" : [
"sources" ,
"kapacitors" ,
"rules"
] ,
"parameters" : [
{
"name" : "id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the source" ,
"required" : true
} ,
{
"name" : "kapa_id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the kapacitor" ,
"required" : true
} ,
{
"name" : "rule_id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the rule" ,
"required" : true
}
] ,
2016-11-22 17:27:27 +00:00
"summary" : "Specific kapacitor alert rule" ,
"description" : "Alerting rule for kapacitor" ,
2016-11-03 06:59:09 +00:00
"responses" : {
"200" : {
"description" : "Alert exists and has a specific TICKscript" ,
"schema" : {
2016-11-22 17:27:27 +00:00
"$ref" : "#/definitions/Rule"
2016-11-03 06:59:09 +00:00
}
} ,
"404" : {
2016-11-22 17:27:27 +00:00
"description" : "Unknown data source, kapacitor id, or rule id" ,
2016-11-03 06:59:09 +00:00
"schema" : {
"$ref" : "#/definitions/Error"
}
} ,
"default" : {
"description" : "Unexpected internal service error" ,
"schema" : {
"$ref" : "#/definitions/Error"
}
}
}
} ,
"put" : {
2016-11-29 21:04:54 +00:00
"tags" : [
"sources" ,
"kapacitors" ,
"rules"
] ,
2016-11-22 17:27:27 +00:00
"summary" : "Update rule alert rule configuration" ,
2016-11-29 21:04:54 +00:00
"parameters" : [
{
2016-10-25 15:20:06 +00:00
"name" : "id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the source" ,
"required" : true
2016-11-18 21:35:35 +00:00
} ,
{
2016-10-25 15:20:06 +00:00
"name" : "kapa_id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of a kapacitor backend" ,
"required" : true
2016-11-29 21:04:54 +00:00
} ,
{
2016-11-22 17:27:27 +00:00
"name" : "rule_id" ,
2016-11-03 06:59:09 +00:00
"in" : "path" ,
"type" : "string" ,
2016-11-22 17:27:27 +00:00
"description" : "ID of a rule" ,
2016-11-03 06:59:09 +00:00
"required" : true
2016-10-25 15:20:06 +00:00
} ,
{
2016-11-22 17:27:27 +00:00
"name" : "rule" ,
2016-10-25 15:20:06 +00:00
"in" : "body" ,
2016-11-22 17:27:27 +00:00
"description" : "Rule update" ,
2016-10-25 15:20:06 +00:00
"schema" : {
2016-11-22 17:27:27 +00:00
"$ref" : "#/definitions/Rule"
2016-10-25 15:20:06 +00:00
} ,
"required" : true
}
] ,
"responses" : {
"200" : {
2016-11-03 06:59:09 +00:00
"description" : "Alert configuration was changed" ,
2016-10-25 15:20:06 +00:00
"schema" : {
2016-11-22 17:27:27 +00:00
"$ref" : "#/definitions/Rule"
2016-10-25 15:20:06 +00:00
}
} ,
"404" : {
2016-11-22 17:27:27 +00:00
"description" : "Happens when trying to access a non-existent data source, kapacitor, or rule." ,
2016-10-25 15:20:06 +00:00
"schema" : {
"$ref" : "#/definitions/Error"
}
} ,
"default" : {
"description" : "A processing or an unexpected error." ,
"schema" : {
"$ref" : "#/definitions/Error"
}
}
}
} ,
"delete" : {
2016-11-29 21:04:54 +00:00
"tags" : [
"sources" ,
"kapacitors" ,
"rules"
] ,
2016-11-18 21:35:35 +00:00
"parameters" : [
{
2016-10-25 15:20:06 +00:00
"name" : "id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the source" ,
"required" : true
2016-11-18 21:35:35 +00:00
} ,
{
2016-10-25 15:20:06 +00:00
"name" : "kapa_id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the kapacitor" ,
"required" : true
2016-11-29 21:04:54 +00:00
} ,
{
2016-11-22 17:27:27 +00:00
"name" : "rule_id" ,
2016-11-03 06:59:09 +00:00
"in" : "path" ,
"type" : "string" ,
2016-11-22 17:27:27 +00:00
"description" : "ID of the rule" ,
2016-11-03 06:59:09 +00:00
"required" : true
2016-10-25 15:20:06 +00:00
}
] ,
2016-11-22 17:27:27 +00:00
"summary" : "This specific alert rule will be removed." ,
2016-10-25 15:20:06 +00:00
"responses" : {
"204" : {
2016-11-22 17:27:27 +00:00
"description" : "Alert rule has been removed."
2016-10-25 15:20:06 +00:00
} ,
"404" : {
2016-11-22 17:27:27 +00:00
"description" : "Unknown Data source, Kapacitor id, or alert rule" ,
2016-10-25 15:20:06 +00:00
"schema" : {
"$ref" : "#/definitions/Error"
}
} ,
"default" : {
"description" : "Unexpected internal service error" ,
"schema" : {
"$ref" : "#/definitions/Error"
}
}
}
}
} ,
"/sources/{id}/kapacitors/{kapa_id}/proxy" : {
"get" : {
2016-11-29 21:04:54 +00:00
"tags" : [
"sources" ,
"kapacitors" ,
"proxy"
] ,
2016-10-25 15:20:06 +00:00
"description" : "GET to `path` of kapacitor. The response and status code from kapacitor is directly returned." ,
2016-11-18 21:35:35 +00:00
"parameters" : [
{
"name" : "id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the source" ,
"required" : true
} ,
{
"name" : "kapa_id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the kapacitor backend." ,
"required" : true
} ,
{
"name" : "path" ,
"in" : "query" ,
"type" : "string" ,
"description" : "The kapacitor API path to use in the proxy redirect" ,
"required" : true
}
] ,
2016-10-25 15:20:06 +00:00
"responses" : {
"204" : {
"description" : "Kapacitor returned no content"
} ,
"404" : {
"description" : "Data source or Kapacitor ID does not exist." ,
"schema" : {
"$ref" : "#/definitions/Error"
}
} ,
"default" : {
"description" : "Response directly from kapacitor" ,
"schema" : {
"$ref" : "#/definitions/KapacitorProxyResponse"
}
}
}
} ,
"delete" : {
2016-11-29 21:04:54 +00:00
"tags" : [
"sources" ,
"kapacitors" ,
"proxy"
] ,
2016-10-25 15:20:06 +00:00
"description" : "DELETE to `path` of kapacitor. The response and status code from kapacitor is directly returned." ,
2016-11-18 21:35:35 +00:00
"parameters" : [
{
"name" : "id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the source" ,
"required" : true
} ,
{
"name" : "kapa_id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the kapacitor backend." ,
"required" : true
} ,
{
"name" : "path" ,
"in" : "query" ,
"type" : "string" ,
"description" : "The kapacitor API path to use in the proxy redirect" ,
"required" : true
}
] ,
2016-10-25 15:20:06 +00:00
"responses" : {
"204" : {
"description" : "Kapacitor returned no content"
} ,
"404" : {
"description" : "Data source or Kapacitor ID does not exist." ,
"schema" : {
"$ref" : "#/definitions/Error"
}
} ,
"default" : {
"description" : "Response directly from kapacitor" ,
"schema" : {
"$ref" : "#/definitions/KapacitorProxyResponse"
}
}
}
} ,
"patch" : {
2016-11-29 21:04:54 +00:00
"tags" : [
"sources" ,
"kapacitors" ,
"proxy"
] ,
2016-10-25 15:20:06 +00:00
"description" : "PATCH body directly to configured kapacitor. The response and status code from kapacitor is directly returned." ,
2016-11-18 21:35:35 +00:00
"parameters" : [
{
"name" : "id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the source" ,
"required" : true
} ,
{
"name" : "kapa_id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the kapacitor backend." ,
"required" : true
} ,
{
"name" : "path" ,
"in" : "query" ,
"type" : "string" ,
"description" : "The kapacitor API path to use in the proxy redirect" ,
"required" : true
} ,
{
"name" : "query" ,
"in" : "body" ,
"description" : "Kapacitor body" ,
"schema" : {
"$ref" : "#/definitions/KapacitorProxy"
} ,
"required" : true
}
] ,
2016-10-25 15:20:06 +00:00
"responses" : {
"204" : {
"description" : "Kapacitor returned no content"
} ,
"404" : {
"description" : "Data source or Kapacitor ID does not exist." ,
"schema" : {
"$ref" : "#/definitions/Error"
}
} ,
"default" : {
"description" : "Response directly from kapacitor" ,
"schema" : {
"$ref" : "#/definitions/KapacitorProxyResponse"
}
}
}
} ,
"post" : {
2016-11-29 21:04:54 +00:00
"tags" : [
"sources" ,
"kapacitors" ,
"proxy"
] ,
2016-10-25 15:20:06 +00:00
"description" : "POST body directly to configured kapacitor. The response and status code from kapacitor is directly returned." ,
2016-11-18 21:35:35 +00:00
"parameters" : [
{
"name" : "id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the source" ,
"required" : true
} ,
{
"name" : "kapa_id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the kapacitor backend." ,
"required" : true
} ,
{
"name" : "path" ,
"in" : "query" ,
"type" : "string" ,
"description" : "The kapacitor API path to use in the proxy redirect" ,
"required" : true
} ,
{
"name" : "query" ,
"in" : "body" ,
"description" : "Kapacitor body" ,
"schema" : {
"$ref" : "#/definitions/KapacitorProxy"
} ,
"required" : true
}
] ,
2016-10-25 15:20:06 +00:00
"responses" : {
"204" : {
"description" : "Kapacitor returned no content"
} ,
"404" : {
"description" : "Kapacitor ID does not exist." ,
"schema" : {
"$ref" : "#/definitions/Error"
}
} ,
"default" : {
"description" : "Response directly from kapacitor" ,
"schema" : {
"$ref" : "#/definitions/KapacitorProxyResponse"
}
}
}
}
} ,
"/mappings" : {
"get" : {
2016-11-29 21:04:54 +00:00
"tags" : [
"layouts" ,
"mappings"
] ,
2016-10-25 15:20:06 +00:00
"summary" : "Mappings between app names and measurements" ,
"description" : "Mappings provide a means to alias measurement names found within a telegraf database and application layouts found within Chronograf\n" ,
"responses" : {
"200" : {
"description" : "An array of mappings" ,
"schema" : {
"$ref" : "#/definitions/Mappings"
}
} ,
"default" : {
"description" : "Unexpected internal service error" ,
"schema" : {
"$ref" : "#/definitions/Error"
}
}
}
}
} ,
"/layouts" : {
"get" : {
2016-11-29 21:04:54 +00:00
"tags" : [
"layouts"
] ,
2016-10-25 15:20:06 +00:00
"summary" : "Pre-configured layouts" ,
2016-11-18 21:35:35 +00:00
"parameters" : [
{
"name" : "measurement" ,
"in" : "query" ,
"description" : "Returns layouts with this measurement" ,
"required" : false ,
"type" : "array" ,
"items" : {
"type" : "string"
} ,
"collectionFormat" : "multi"
2016-10-25 15:20:06 +00:00
} ,
2016-11-18 21:35:35 +00:00
{
"name" : "app" ,
"in" : "query" ,
"description" : "Returns layouts with this app" ,
"required" : false ,
"type" : "array" ,
"items" : {
"type" : "string"
} ,
"collectionFormat" : "multi"
}
] ,
2016-10-25 15:20:06 +00:00
"description" : "Layouts are a collection of `Cells` that visualize time-series data.\n" ,
"responses" : {
"200" : {
"description" : "An array of layouts" ,
"schema" : {
"$ref" : "#/definitions/Layouts"
}
} ,
"default" : {
"description" : "Unexpected internal service error" ,
"schema" : {
"$ref" : "#/definitions/Error"
}
}
}
} ,
"post" : {
2016-11-29 21:04:54 +00:00
"tags" : [
"layouts"
] ,
2016-10-25 15:20:06 +00:00
"summary" : "Create new layout" ,
2016-11-18 21:35:35 +00:00
"parameters" : [
{
"name" : "layout" ,
"in" : "body" ,
"description" : "Defines the layout and queries of the cells within the layout." ,
"schema" : {
"$ref" : "#/definitions/Layout"
}
2016-10-25 15:20:06 +00:00
}
2016-11-18 21:35:35 +00:00
] ,
2016-10-25 15:20:06 +00:00
"responses" : {
"201" : {
"description" : "Successfully created new layout" ,
"headers" : {
"Location" : {
"type" : "string" ,
"format" : "url" ,
"description" : "Location of the newly created layout"
}
} ,
"schema" : {
"$ref" : "#/definitions/Layout"
}
} ,
"default" : {
"description" : "A processing or an unexpected error." ,
"schema" : {
"$ref" : "#/definitions/Error"
}
}
}
}
} ,
"/layouts/{id}" : {
"get" : {
2016-11-29 21:04:54 +00:00
"tags" : [
"layouts"
] ,
2016-11-18 21:35:35 +00:00
"parameters" : [
{
"name" : "id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the layout" ,
"required" : true
}
] ,
2016-10-25 15:20:06 +00:00
"summary" : "Specific pre-configured layout containing cells and queries." ,
"description" : "layouts will hold information about how to layout the page of graphs.\n" ,
"responses" : {
"200" : {
"description" : "Returns the specified layout containing `cells`." ,
"schema" : {
"$ref" : "#/definitions/Layout"
}
} ,
"404" : {
"description" : "Unknown layout id" ,
"schema" : {
"$ref" : "#/definitions/Error"
}
} ,
"default" : {
"description" : "Unexpected internal service error" ,
"schema" : {
"$ref" : "#/definitions/Error"
}
}
}
} ,
"delete" : {
2016-11-29 21:04:54 +00:00
"tags" : [
"layouts"
] ,
2016-11-18 21:35:35 +00:00
"parameters" : [
{
"name" : "id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of the layout" ,
"required" : true
}
] ,
2016-10-25 15:20:06 +00:00
"summary" : "This specific layout will be removed from the data store" ,
"responses" : {
"204" : {
"description" : "Layout has been removed."
} ,
"404" : {
"description" : "Unknown layout id" ,
"schema" : {
"$ref" : "#/definitions/Error"
}
} ,
"default" : {
"description" : "Unexpected internal service error" ,
"schema" : {
"$ref" : "#/definitions/Error"
}
}
}
} ,
"put" : {
2016-11-29 21:04:54 +00:00
"tags" : [
"layouts"
] ,
2016-10-25 15:20:06 +00:00
"summary" : "Replace layout configuration." ,
2016-11-18 21:35:35 +00:00
"parameters" : [
{
"name" : "id" ,
"in" : "path" ,
"type" : "string" ,
"description" : "ID of a layout" ,
"required" : true
2016-11-03 06:59:09 +00:00
} ,
2016-11-18 21:35:35 +00:00
{
"name" : "config" ,
"in" : "body" ,
"description" : "layout configuration update parameters" ,
"schema" : {
"$ref" : "#/definitions/Layout"
} ,
"required" : true
}
] ,
2016-10-25 15:20:06 +00:00
"responses" : {
"200" : {
"description" : "Layout has been replaced and the new layout is returned." ,
"schema" : {
"$ref" : "#/definitions/Layout"
}
} ,
"404" : {
"description" : "Happens when trying to access a non-existent layout." ,
"schema" : {
"$ref" : "#/definitions/Error"
}
} ,
"default" : {
"description" : "A processing or an unexpected error." ,
"schema" : {
"$ref" : "#/definitions/Error"
}
}
}
}
2016-12-07 23:17:42 +00:00
} ,
"/dashboards" : {
"get" : {
"tags" : [
"dashboards"
] ,
"summary" : "List of all dashboards" ,
"responses" : {
"200" : {
"description" : "An array of dashboards" ,
"schema" : {
"$ref" : "#/definitions/Dashboards"
}
} ,
"default" : {
"description" : "Unexpected internal service error" ,
"schema" : {
"$ref" : "#/definitions/Error"
}
}
}
} ,
"post" : {
"tags" : [
"dashboards"
] ,
"summary" : "Create new dashboard" ,
"parameters" : [
{
"name" : "dashboard" ,
"in" : "body" ,
"description" : "Configuration options for new dashboard" ,
"schema" : {
"$ref" : "#/definitions/Dashboard"
}
}
] ,
"responses" : {
"201" : {
"description" : "Successfully created new dashboard" ,
"headers" : {
"Location" : {
"type" : "string" ,
"format" : "url" ,
"description" : "Location of the newly created dashboard resource."
}
} ,
"schema" : {
"$ref" : "#/definitions/Dashboard"
}
} ,
"default" : {
"description" : "A processing or an unexpected error." ,
"schema" : {
"$ref" : "#/definitions/Error"
}
}
}
}
} ,
"/dashboards/{id}" : {
"get" : {
"tags" : [
"dashboards"
] ,
"parameters" : [
{
"name" : "id" ,
"in" : "path" ,
"type" : "integer" ,
"description" : "ID of the dashboard" ,
"required" : true
}
] ,
"summary" : "Specific dashboard" ,
"description" : "Dashboards contain visual display information as well as links to queries" ,
"responses" : {
"200" : {
"description" : "Returns the specified dashboard with links to queries." ,
"schema" : {
"$ref" : "#/definitions/Dashboard"
}
} ,
"404" : {
"description" : "Unknown dashboard id" ,
"schema" : {
"$ref" : "#/definitions/Error"
}
} ,
"default" : {
"description" : "Unexpected internal service error" ,
"schema" : {
"$ref" : "#/definitions/Error"
}
}
}
} ,
"delete" : {
"tags" : [
"dashboards"
] ,
"parameters" : [
{
"name" : "id" ,
"in" : "path" ,
"type" : "integer" ,
"description" : "ID of the layout" ,
"required" : true
}
] ,
"summary" : "Deletes the specified dashboard" ,
"responses" : {
"204" : {
"description" : "Dashboard has been removed."
} ,
"404" : {
"description" : "Unknown dashboard id" ,
"schema" : {
"$ref" : "#/definitions/Error"
}
} ,
"default" : {
"description" : "Unexpected internal service error" ,
"schema" : {
"$ref" : "#/definitions/Error"
}
}
}
} ,
"put" : {
"tags" : [
2017-02-23 22:02:53 +00:00
"dashboards"
2016-12-07 23:17:42 +00:00
] ,
"summary" : "Replace dashboard information." ,
"parameters" : [
{
"name" : "id" ,
"in" : "path" ,
"type" : "integer" ,
"description" : "ID of a dashboard" ,
"required" : true
} ,
{
"name" : "config" ,
"in" : "body" ,
"description" : "dashboard configuration update parameters" ,
"schema" : {
"$ref" : "#/definitions/Dashboard"
} ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "Dashboard has been replaced and the new dashboard is returned." ,
"schema" : {
"$ref" : "#/definitions/Dashboard"
}
} ,
"404" : {
"description" : "Happens when trying to access a non-existent dashboard." ,
"schema" : {
"$ref" : "#/definitions/Error"
}
} ,
"default" : {
"description" : "A processing or an unexpected error." ,
"schema" : {
"$ref" : "#/definitions/Error"
}
}
}
2017-02-22 15:46:16 +00:00
} ,
"patch" : {
"tags" : [
"layouts"
] ,
"summary" : "Update dashboard information." ,
"description" : "Update either the dashboard name or the dashboard cells" ,
"parameters" : [
{
"name" : "id" ,
"in" : "path" ,
"type" : "integer" ,
"description" : "ID of a dashboard" ,
"required" : true
} ,
{
"name" : "config" ,
"in" : "body" ,
"description" : "dashboard configuration update parameters. Must be either name or cells" ,
"schema" : {
"$ref" : "#/definitions/Dashboard"
} ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "Dashboard has been updated and the new dashboard is returned." ,
"schema" : {
"$ref" : "#/definitions/Dashboard"
}
} ,
"404" : {
"description" : "Happens when trying to access a non-existent dashboard." ,
"schema" : {
"$ref" : "#/definitions/Error"
2016-12-07 23:17:42 +00:00
}
} ,
"default" : {
"description" : "A processing or an unexpected error." ,
"schema" : {
"$ref" : "#/definitions/Error"
}
}
}
}
2017-01-05 04:20:12 +00:00
}
2016-10-25 15:20:06 +00:00
} ,
"definitions" : {
2017-03-14 21:01:28 +00:00
"Databases" : {
"type" : "object" ,
"required" : [
"databases"
] ,
"properties" : {
"databases" : {
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/Database"
}
}
}
} ,
"Database" : {
"type" : "object" ,
"required" : [
"name"
] ,
"example" : {
2017-03-14 23:05:13 +00:00
"name" : "NOAA_water_database" ,
"duration" : "3d" ,
"replication" : 3 ,
2017-03-20 18:48:25 +00:00
"shardDuration" : "3h" ,
"links" : {
"self" : "/chronograf/v1/sources/1/dbs/NOAA_water_database"
}
2017-03-14 21:01:28 +00:00
} ,
"properties" : {
"name" : {
"type" : "string" ,
"description" : "The identifying name of the database" ,
} ,
"duration" : {
2017-03-14 23:05:13 +00:00
"type" : "string" ,
2017-03-14 21:01:28 +00:00
"description" : "the duration of the default retention policy"
} ,
"replication" : {
2017-03-14 23:05:13 +00:00
"type" : "integer" ,
"format" : "int32" ,
"description" : "how many copies of the data are stored in the cluster"
2017-03-14 21:01:28 +00:00
} ,
"shardDuration" : {
2017-03-14 23:05:13 +00:00
"type" : "string" ,
"description" : "the interval spanned by each shard group"
2017-03-20 18:48:25 +00:00
} ,
"links" : {
"type" : "object" ,
"properties" : {
"self" : {
"type" : "string" ,
"description" : "Self link mapping to this resource" ,
"format" : "url"
}
}
2017-03-14 21:01:28 +00:00
}
}
} ,
2016-10-25 15:20:06 +00:00
"Kapacitors" : {
"type" : "object" ,
"required" : [
"kapacitors"
] ,
"properties" : {
"kapacitors" : {
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/Kapacitor"
}
}
}
} ,
"Kapacitor" : {
"type" : "object" ,
"required" : [
"name" ,
"url"
] ,
2017-02-22 18:52:55 +00:00
"example" : {
"id" : "4" ,
"name" : "kapa" ,
"url" : "http://localhost:9092" ,
"links" : {
"proxy" : "/chronograf/v1/sources/4/kapacitors/4/proxy" ,
"self" : "/chronograf/v1/sources/4/kapacitors/4" ,
"rules" : "/chronograf/v1/sources/4/kapacitors/4/rules"
}
} ,
2016-10-25 15:20:06 +00:00
"properties" : {
"id" : {
"type" : "string" ,
"description" : "Unique identifier representing a kapacitor instance." ,
"readOnly" : true
} ,
"name" : {
"type" : "string" ,
"description" : "User facing name of kapacitor instance."
} ,
"username" : {
"type" : "string" ,
2016-11-10 18:09:14 +00:00
"description" : "Username for authentication to kapacitor."
2016-10-25 15:20:06 +00:00
} ,
"password" : {
"type" : "string" ,
2016-11-10 18:09:14 +00:00
"description" : "Password is in cleartext."
2016-10-25 15:20:06 +00:00
} ,
"url" : {
"type" : "string" ,
"format" : "url" ,
"description" : "URL for the kapacitor backend (e.g. http://localhost:9092)"
} ,
"links" : {
"type" : "object" ,
"properties" : {
"self" : {
"type" : "string" ,
"description" : "Self link mapping to this resource" ,
"format" : "url"
} ,
"proxy" : {
"type" : "string" ,
2016-11-03 06:59:09 +00:00
"description" : "URL location of proxy endpoint for this kapacitor" ,
"format" : "url"
} ,
2016-11-22 17:27:27 +00:00
"rules" : {
2016-11-03 06:59:09 +00:00
"type" : "string" ,
2016-11-22 17:27:27 +00:00
"description" : "URL location of rules endpoint for this kapacitor" ,
2016-10-25 15:20:06 +00:00
"format" : "url"
}
}
}
}
} ,
"KapacitorProxy" : {
"description" : "Entirely used as the body for the request to the kapacitor backend." ,
"type" : "object"
} ,
"KapacitorProxyResponse" : {
"description" : "Entire response from the kapacitor backend." ,
"type" : "object"
} ,
2016-11-29 21:04:54 +00:00
"Rules" : {
2016-11-22 17:27:27 +00:00
"type" : "object" ,
2016-11-29 21:04:54 +00:00
"required" : [
2016-11-22 17:27:27 +00:00
"rules"
] ,
"properties" : {
"rules" : {
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/Rule"
}
}
}
} ,
2017-01-05 04:20:12 +00:00
"QueryConfig" : {
"type" : "object" ,
2017-02-22 18:52:55 +00:00
"example" : {
"id" : "ce72917d-1ecb-45ea-a6cb-4c122deb93c7" ,
"database" : "telegraf" ,
"measurement" : "cpu" ,
"retentionPolicy" : "autogen" ,
"fields" : [
{
"field" : "usage_system" ,
"funcs" : [
"max"
]
}
] ,
"tags" : { } ,
"groupBy" : {
"time" : "10m" ,
"tags" : [ ]
} ,
"areTagsAccepted" : true
} ,
2017-01-05 04:20:12 +00:00
"properties" : {
"id" : {
"type" : "string"
} ,
"database" : {
"type" : "string"
} ,
"measurement" : {
"type" : "string"
} ,
"retentionPolicy" : {
"type" : "string"
} ,
"areTagsAccepted" : {
"type" : "boolean"
} ,
"rawText" : {
"type" : "string"
} ,
"tags" : {
"type" : "object"
} ,
"groupBy" : {
"type" : "object" ,
"properties" : {
"time" : {
"type" : "string"
} ,
"tags" : {
"type" : "array" ,
"items" : {
"type" : "string"
}
}
} ,
"required" : [
"time" ,
"tags"
]
} ,
"fields" : {
"type" : "array" ,
"items" : {
"type" : "object" ,
"properties" : {
"field" : {
"type" : "string"
} ,
"funcs" : {
"type" : "array" ,
"items" : {
"type" : "string"
}
}
} ,
"required" : [
"field" ,
"funcs"
]
}
}
} ,
"required" : [
"database" ,
"measurement" ,
"retentionPolicy" ,
"areTagsAccepted" ,
"tags" ,
"groupBy" ,
"fields"
]
} ,
2017-02-09 06:50:59 +00:00
"KapacitorNode" : {
"type" : "object" ,
"description" : "Represents a node in the kapacitor TICKscript graph" ,
"required" : [
"name"
] ,
"properties" : {
"name" : {
"type" : "string" ,
"description" : "Name of the kapacitor node e.g. slack"
} ,
"args" : {
"type" : "array" ,
"description" : "All arguments to the named node" ,
"items" : {
"type" : "string"
}
} ,
"properties" : {
"type" : "array" ,
"description" : "All properties attached to the kapacitor node" ,
"items" : {
"$ref" : "#/definitions/KapacitorProperty"
}
}
}
} ,
"KapacitorProperty" : {
"type" : "object" ,
"description" : "Represents a property attached to a node in the kapacitor TICKscript graph" ,
"required" : [
"name"
] ,
"properties" : {
"name" : {
"type" : "string" ,
"description" : "Name of the kapacitor property e.g. channel for a slack ndoe"
} ,
"args" : {
"type" : "array" ,
"description" : "All arguments to the named property" ,
"items" : {
"type" : "string"
}
}
}
} ,
2017-03-14 23:05:13 +00:00
"RetentionPolicies" : {
"type" : "object" ,
"required" : [
"retentionPolicies"
] ,
"properties" : {
"retentionPolicies" : {
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/RetentionPolicy"
}
}
}
} ,
"RetentionPolicy" : {
"type" : "object" ,
"required" : [
"name" ,
"duration" ,
"replication"
] ,
"example" : {
2017-03-14 23:53:41 +00:00
"name" : "weekly" ,
"duration" : "7d" ,
"replication" : 1 ,
"shardDuration" : "7d" ,
"default" : true
2017-03-14 23:05:13 +00:00
} ,
"properties" : {
"name" : {
"type" : "string" ,
"description" : "The identifying name of the retention policy" ,
} ,
"duration" : {
"type" : "string" ,
"description" : "the duration of the retention policy"
} ,
"replication" : {
"type" : "integer" ,
"format" : "int32" ,
"description" : "how many copies of the data are stored in the cluster"
} ,
"shardDuration" : {
"type" : "string" ,
"description" : "the interval spanned by each shard group"
} ,
"default" : {
"type" : "boolean" ,
"description" : "Indicates whether this retention policy should be the default"
}
}
} ,
2016-11-22 17:27:27 +00:00
"Rule" : {
"type" : "object" ,
2017-02-22 18:52:55 +00:00
"example" : {
"id" : "chronograf-v1-b2b065ea-79bd-4e4f-8c0d-d0ef68477d38" ,
"query" : {
"id" : "ce72917d-1ecb-45ea-a6cb-4c122deb93c7" ,
"database" : "telegraf" ,
"measurement" : "cpu" ,
"retentionPolicy" : "autogen" ,
"fields" : [
{
"field" : "usage_system" ,
"funcs" : [
"max"
]
}
] ,
"tags" : { } ,
"groupBy" : {
"time" : "10m" ,
"tags" : [ ]
} ,
"areTagsAccepted" : true
} ,
"every" : "30s" ,
"alerts" : [
"alerta"
] ,
"alertNodes" : [
{
"name" : "alerta" ,
"args" : [ ] ,
"properties" : [ ]
}
] ,
"message" : "too much spam" ,
"details" : "muh body" ,
"trigger" : "threshold" ,
"values" : {
"operator" : "greater than" ,
"value" : "10"
} ,
"name" : "Untitled Rule" ,
"tickscript" : "var db = 'telegraf'\n\nvar rp = 'autogen'\n\nvar measurement = 'cpu'\n\nvar groupBy = []\n\nvar whereFilter = lambda: TRUE\n\nvar period = 10m\n\nvar every = 30s\n\nvar name = 'Untitled Rule'\n\nvar idVar = name + ':{{.Group}}'\n\nvar message = 'too much spam'\n\nvar idTag = 'alertID'\n\nvar levelTag = 'level'\n\nvar messageField = 'message'\n\nvar durationField = 'duration'\n\nvar outputDB = 'chronograf'\n\nvar outputRP = 'autogen'\n\nvar outputMeasurement = 'alerts'\n\nvar triggerType = 'threshold'\n\nvar details = 'muh body'\n\nvar crit = 10\n\nvar data = stream\n |from()\n .database(db)\n .retentionPolicy(rp)\n .measurement(measurement)\n .groupBy(groupBy)\n .where(whereFilter)\n |window()\n .period(period)\n .every(every)\n .align()\n |max('usage_system')\n .as('value')\n\nvar trigger = data\n |alert()\n .crit(lambda: \"value\" > crit)\n .stateChangesOnly()\n .message(message)\n .id(idVar)\n .idTag(idTag)\n .levelTag(levelTag)\n .messageField(messageField)\n .durationField(durationField)\n .details(details)\n .alerta()\n\ntrigger\n |influxDBOut()\n .create()\n .database(outputDB)\n .retentionPolicy(outputRP)\n .measurement(outputMeasurement)\n .tag('alertName', name)\n .tag('triggerType', triggerType)\n\ntrigger\n |httpOut('output')\n" ,
"status" : "enabled" ,
"links" : {
"self" : "/chronograf/v1/sources/5/kapacitors/5/rules/chronograf-v1-b2b065ea-79bd-4e4f-8c0d-d0ef68477d38" ,
"kapacitor" : "/chronograf/v1/sources/5/kapacitors/5/proxy?path=%2Fkapacitor%2Fv1%2Ftasks%2Fchronograf-v1-b2b065ea-79bd-4e4f-8c0d-d0ef68477d38" ,
"output" : "/chronograf/v1/sources/5/kapacitors/5/proxy?path=%2Fkapacitor%2Fv1%2Ftasks%2Fchronograf-v1-b2b065ea-79bd-4e4f-8c0d-d0ef68477d38%2Foutput"
}
} ,
2016-11-22 17:27:27 +00:00
"required" : [
2017-01-05 04:20:12 +00:00
"query" ,
2016-11-22 17:27:27 +00:00
"every" ,
2016-11-29 21:04:54 +00:00
"trigger"
2016-11-22 17:27:27 +00:00
] ,
"properties" : {
2016-11-29 21:04:54 +00:00
"id" : {
"type" : "string" ,
"description" : "ID for this rule; the ID is shared with kapacitor"
} ,
2017-01-05 04:20:12 +00:00
"query" : {
"$ref" : "#/definitions/QueryConfig"
} ,
2016-11-29 21:04:54 +00:00
"name" : {
"type" : "string" ,
"description" : "User facing name of the alerting rule"
} ,
"every" : {
"type" : "string" ,
"description" : "Golang duration string specifying how often the alert condition is checked"
} ,
"alerts" : {
"type" : "array" ,
"description" : "Array of alerting services to warn if the alert is triggered" ,
"items" : {
2016-11-22 17:27:27 +00:00
"type" : "string" ,
2016-11-29 21:04:54 +00:00
"enum" : [
2017-02-09 06:50:59 +00:00
"alerta" ,
2017-02-09 04:18:23 +00:00
"post" ,
2017-02-09 06:50:59 +00:00
"http" ,
2016-11-29 21:04:54 +00:00
"hipchat" ,
"opsgenie" ,
"pagerduty" ,
"victorops" ,
"smtp" ,
"email" ,
2017-02-09 06:50:59 +00:00
"exec" ,
2016-11-29 21:04:54 +00:00
"sensu" ,
"slack" ,
"talk" ,
2017-02-09 06:50:59 +00:00
"telegram" ,
"tcp"
2016-11-29 21:04:54 +00:00
]
}
} ,
2017-02-09 06:50:59 +00:00
"alertNodes" : {
"type" : "array" ,
"description" : "Arguments and properties to add to alert" ,
"items" : {
"$ref" : "#/definitions/KapacitorNode"
}
} ,
2016-11-29 21:04:54 +00:00
"message" : {
"type" : "string" ,
"description" : "Message to send when alert occurs."
} ,
2017-02-07 23:09:14 +00:00
"details" : {
"type" : "string" ,
"description" : "Template for constructing a detailed HTML message for the alert. (Currently, only used for email/smtp"
} ,
2016-11-29 21:04:54 +00:00
"trigger" : {
"type" : "string" ,
"description" : "Trigger defines the alerting structure; deadman alert if no data are received for the specified time range; relative alert if the data change relative to the data in a different time range; threshold alert if the data cross a boundary" ,
"enum" : [
2016-11-22 17:27:27 +00:00
"deadman" ,
"relative" ,
2016-11-29 21:04:54 +00:00
"threshold"
2016-11-22 17:27:27 +00:00
]
2016-11-29 21:04:54 +00:00
} ,
2017-01-05 04:20:12 +00:00
"values" : {
"type" : "object" ,
"description" : "Alerting logic for trigger type" ,
"properties" : {
"change" : {
"description" : "Specifies if the change is percent or absolute" ,
"type" : "string" ,
"enum" : [
"% change" ,
"change"
]
} ,
"period" : {
"description" : "Length of time before deadman is alerted (golang duration)" ,
"type" : "string"
} ,
"shift" : {
"description" : "Amount of time to look into the past to compare to the present (golang duration)" ,
"type" : "string"
} ,
"operator" : {
"description" : "Operator for alert comparison" ,
"type" : "string" ,
"enum" : [
"greater than" ,
"less than" ,
"equal to or less than" ,
"equal to or greater" ,
"equal to" ,
"not equal to" ,
2017-01-06 17:45:54 +00:00
"inside range" ,
"outside range"
2017-01-05 04:20:12 +00:00
]
} ,
"value" : {
"description" : "Value is the boundary value when alert goes critical" ,
"type" : "string"
} ,
"rangeValue" : {
"description" : "Optional value for range comparisions" ,
"type" : "string"
}
}
} ,
2016-11-29 21:04:54 +00:00
"tickscript" : {
"type" : "string" ,
"description" : "TICKscript representing this rule"
} ,
2017-02-10 19:57:12 +00:00
"status" : {
"type" : "string" ,
"description" : "Represents if this rule is enabled or disabled in kapacitor" ,
"enum" : [
"enabled" ,
"disabled"
]
} ,
2016-11-22 17:27:27 +00:00
"links" : {
2016-11-29 21:04:54 +00:00
"type" : "object" ,
"required" : [
"self" ,
"kapacitor"
] ,
"properties" : {
"self" : {
"description" : "Self link pointing to this rule resource" ,
"type" : "string" ,
"format" : "uri"
} ,
"kapacitor" : {
"description" : "Link pointing to the kapacitor proxy for this rule including the path query parameter." ,
"type" : "string" ,
"format" : "uri"
} ,
"output" : {
"description" : "Link pointing to the kapacitor httpOut node of the tickscript; includes the path query argument" ,
"type" : "string" ,
"format" : "uri"
}
}
2016-11-22 17:27:27 +00:00
}
}
} ,
2016-10-25 15:20:06 +00:00
"Sources" : {
"type" : "object" ,
"required" : [
"sources"
] ,
"properties" : {
"sources" : {
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/Source"
}
}
}
} ,
"Source" : {
"type" : "object" ,
2017-02-22 18:52:55 +00:00
"example" : {
"id" : "4" ,
"name" : "Influx 1" ,
"url" : "http://localhost:8086" ,
"default" : false ,
"telegraf" : "telegraf" ,
"links" : {
"self" : "/chronograf/v1/sources/4" ,
"kapacitors" : "/chronograf/v1/sources/4/kapacitors" ,
"proxy" : "/chronograf/v1/sources/4/proxy" ,
"permissions" : "/chronograf/v1/sources/4/permissions" ,
2017-02-23 22:02:53 +00:00
"users" : "/chronograf/v1/sources/4/users" ,
"roles" : "/chronograf/v1/sources/4/roles"
2017-02-22 18:52:55 +00:00
}
} ,
2016-10-25 15:20:06 +00:00
"required" : [
"name" ,
"url"
] ,
"properties" : {
"id" : {
"type" : "string" ,
"description" : "Unique identifier representing a specific data source." ,
"readOnly" : true
} ,
"name" : {
"type" : "string" ,
"description" : "User facing name of data source"
} ,
"type" : {
"type" : "string" ,
"description" : "Format of the data source" ,
"enum" : [
"influx" ,
"influx-enterprise"
]
} ,
"username" : {
"type" : "string" ,
"description" : "Username for authentication to data source"
} ,
"password" : {
"type" : "string" ,
2016-11-10 18:09:14 +00:00
"description" : "Password is in cleartext."
2016-10-25 15:20:06 +00:00
} ,
"url" : {
"type" : "string" ,
"format" : "url" ,
"description" : "URL for the time series data source backend (e.g. http://localhost:8086)"
} ,
2017-02-07 22:42:28 +00:00
"metaUrl" : {
"type" : "string" ,
"format" : "url" ,
"description" : "URL for the influxdb meta node"
} ,
2017-01-05 21:59:46 +00:00
"insecureSkipVerify" : {
"type" : "boolean" ,
"description" : "True means any certificate presented by the source is accepted. Typically used for self-signed certs. Probably should only be used for testing."
} ,
2016-10-25 15:20:06 +00:00
"default" : {
"type" : "boolean" ,
"description" : "Indicates whether this source is the default source"
} ,
2016-11-18 19:27:44 +00:00
"telegraf" : {
"type" : "string" ,
"description" : "Database where telegraf information is stored for this source" ,
2016-11-18 21:35:35 +00:00
"default" : "telegraf"
2016-11-18 19:27:44 +00:00
} ,
2016-10-25 15:20:06 +00:00
"links" : {
"type" : "object" ,
"properties" : {
"self" : {
"type" : "string" ,
"description" : "Self link mapping to this resource" ,
"format" : "url"
} ,
"proxy" : {
"type" : "string" ,
"description" : "URL location of proxy endpoint for this source" ,
"format" : "url"
} ,
"kapacitors" : {
"type" : "string" ,
"description" : "URL location of the kapacitors endpoint for this source" ,
"format" : "url"
2017-02-22 17:35:19 +00:00
} ,
"users" : {
"type" : "string" ,
"description" : "URL location of the users endpoint for this source" ,
"format" : "url"
} ,
"permissions" : {
"type" : "string" ,
"description" : "URL location of the permissions endpoint for this source" ,
"format" : "url"
2017-02-23 22:02:53 +00:00
} ,
"roles" : {
"type" : "string" ,
"description" : "Optional path to the roles endpoint IFF it is supported on this source" ,
"format" : "url"
2016-10-25 15:20:06 +00:00
}
}
}
}
} ,
"Proxy" : {
"type" : "object" ,
2017-02-22 18:52:55 +00:00
"example" : {
"query" : "select * from cpu where time > now() - 10m" ,
"db" : "telegraf" ,
"rp" : "autogen" ,
"format" : "raw"
} ,
2016-10-25 15:20:06 +00:00
"required" : [
"query"
] ,
"properties" : {
"query" : {
"type" : "string"
} ,
"db" : {
"type" : "string"
} ,
"rp" : {
"type" : "string"
} ,
"format" : {
"type" : "string" ,
"enum" : [
"raw"
] ,
"default" : "raw"
}
}
} ,
"ProxyResponse" : {
"type" : "object" ,
2017-02-22 18:52:55 +00:00
"example" : {
"results" : [
{
"statement_id" : 0 ,
"series" : [
{
"name" : "cpu" ,
"columns" : [
"time" ,
"cpu" ,
"host" ,
"usage_guest" ,
"usage_guest_nice" ,
"usage_idle" ,
"usage_iowait" ,
"usage_irq" ,
"usage_nice" ,
"usage_softirq" ,
"usage_steal" ,
"usage_system" ,
"usage_user"
] ,
"values" : [
[
1487785510000 ,
"cpu-total" ,
"ChristohersMBP2.lan" ,
0 ,
0 ,
76.6916354556804 ,
0 ,
0 ,
0 ,
0 ,
0 ,
4.781523096129837 ,
18.526841448189764
]
]
}
]
}
]
} ,
2016-10-25 15:20:06 +00:00
"properties" : {
"results" : {
"description" : "results from influx" ,
"type" : "object"
}
}
} ,
2017-02-23 22:02:53 +00:00
"Roles" : {
"type" : "object" ,
"properties" : {
"roles" : {
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/Role"
}
}
2017-03-02 01:39:03 +00:00
} ,
"example" : {
"roles" : [
{
"users" : [
{
"name" : "admin" ,
"links" : {
"self" : "/chronograf/v1/sources/3/users/admin"
}
}
] ,
"name" : "timetravelers" ,
"permissions" : [
{
"scope" : "database" ,
"name" : "telegraf" ,
"allowed" : [
"ReadData" ,
"WriteData"
]
}
] ,
"links" : {
"self" : "/chronograf/v1/sources/3/roles/timetravelers"
}
}
]
2017-02-23 22:02:53 +00:00
}
} ,
"Role" : {
"type" : "object" ,
"required" : [
"name"
] ,
"properties" : {
"name" : {
"type" : "string" ,
"description" : "Unique name of the role" ,
"maxLength" : 254 ,
"minLength" : 1
} ,
"users" : {
"$ref" : "#/definitions/Users"
} ,
"permissions" : {
"$ref" : "#/definitions/Permissions"
} ,
"links" : {
"type" : "object" ,
"description" : "URL relations of this role" ,
"properties" : {
"self" : {
"type" : "string" ,
"format" : "url" ,
"description" : "URI of resource."
}
}
}
2017-03-02 01:39:03 +00:00
} ,
"example" : {
"users" : [
{
"name" : "admin" ,
"links" : {
"self" : "/chronograf/v1/sources/3/users/admin"
}
}
] ,
"name" : "timetravelers" ,
"permissions" : [
{
"scope" : "database" ,
"name" : "telegraf" ,
"allowed" : [
"ReadData" ,
"WriteData"
]
}
] ,
"links" : {
"self" : "/chronograf/v1/sources/3/roles/timetravelers"
}
2017-02-23 22:02:53 +00:00
}
} ,
2016-10-25 15:20:06 +00:00
"Users" : {
"type" : "object" ,
"properties" : {
"users" : {
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/User"
}
}
2017-02-22 17:35:19 +00:00
} ,
"example" : {
"users" : [
{
"name" : "docbrown" ,
"permissions" : [
{
"scope" : "all" ,
"allowed" : [
2017-03-02 01:39:03 +00:00
"ViewAdmin" ,
2017-02-22 17:35:19 +00:00
"ViewChronograf" ,
2017-03-02 01:39:03 +00:00
"CreateDatabase" ,
"CreateUserAndRole" ,
"DropDatabase" ,
"DropData" ,
"ReadData" ,
"WriteData" ,
"ManageShard" ,
"ManageContinuousQuery" ,
"ManageQuery" ,
"ManageSubscription" ,
"Monitor" ,
"KapacitorAPI"
2017-02-22 17:35:19 +00:00
]
2017-03-02 01:39:03 +00:00
}
] ,
"roles" : [
2017-02-22 17:35:19 +00:00
{
2017-03-02 01:39:03 +00:00
"name" : "timetravelers" ,
"permissions" : [
{
"scope" : "database" ,
"name" : "telegraf" ,
"allowed" : [
"ReadData" ,
"WriteData"
]
}
] ,
"links" : {
"self" : "/chronograf/v1/sources/3/roles/timetravelers"
}
2017-02-22 17:35:19 +00:00
}
] ,
"links" : {
2017-03-02 01:39:03 +00:00
"self" : "/chronograf/v1/sources/3/users/docbrown"
2017-02-22 17:35:19 +00:00
}
}
]
2016-10-25 15:20:06 +00:00
}
} ,
"User" : {
2017-02-22 17:35:19 +00:00
"type" : "object" ,
"properties" : {
"name" : {
"type" : "string" ,
"description" : "Unique name of the user" ,
"maxLength" : 254 ,
"minLength" : 1
} ,
"password" : {
"type" : "string"
} ,
"permissions" : {
"$ref" : "#/definitions/Permissions"
} ,
"links" : {
"type" : "object" ,
"description" : "URL relations of this user" ,
"properties" : {
"self" : {
"type" : "string" ,
"format" : "url" ,
"description" : "URI of resource."
}
}
}
} ,
"example" : {
"name" : "docbrown" ,
"permissions" : [
{
"scope" : "all" ,
"allowed" : [
2017-03-02 01:39:03 +00:00
"ViewAdmin" ,
2017-02-22 17:35:19 +00:00
"ViewChronograf" ,
2017-03-02 01:39:03 +00:00
"CreateDatabase" ,
"CreateUserAndRole" ,
"DropDatabase" ,
"DropData" ,
"ReadData" ,
"WriteData" ,
"ManageShard" ,
"ManageContinuousQuery" ,
"ManageQuery" ,
"ManageSubscription" ,
"Monitor" ,
"KapacitorAPI"
2017-02-22 17:35:19 +00:00
]
2017-03-02 01:39:03 +00:00
}
] ,
"roles" : [
2017-02-22 17:35:19 +00:00
{
2017-03-02 01:39:03 +00:00
"name" : "timetravelers" ,
"permissions" : [
{
"scope" : "database" ,
"name" : "telegraf" ,
"allowed" : [
"ReadData" ,
"WriteData"
]
}
] ,
"links" : {
"self" : "/chronograf/v1/sources/3/roles/timetravelers"
}
2017-02-22 17:35:19 +00:00
}
] ,
"links" : {
2017-03-02 01:39:03 +00:00
"self" : "/chronograf/v1/sources/3/users/docbrown"
2017-02-22 17:35:19 +00:00
}
}
} ,
"Permissions" : {
"description" : "Permissions represent the entire set of permissions a User or Role may have" ,
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/Permission"
}
} ,
"Permission" : {
"description" : "Permission is a specific allowance for User or Role bound to a scope of the data source" ,
2016-10-25 15:20:06 +00:00
"type" : "object" ,
"required" : [
2017-02-22 17:35:19 +00:00
"scope" ,
"allowed"
2016-10-25 15:20:06 +00:00
] ,
"properties" : {
2017-02-22 17:35:19 +00:00
"scope" : {
2016-10-25 15:20:06 +00:00
"type" : "string" ,
2017-02-22 17:35:19 +00:00
"description" : "Describes if the permission is for all databases or restricted to one database" ,
"enum" : [
"all" ,
"database"
]
2016-10-25 15:20:06 +00:00
} ,
2017-02-22 17:35:19 +00:00
"name" : {
"type" : "string" ,
"description" : "If the scope is database this identifies the name of the database"
} ,
"allowed" : {
"$ref" : "#/definitions/Allowances"
2016-10-25 15:20:06 +00:00
}
2017-02-22 17:35:19 +00:00
} ,
"example" : {
"scope" : "database" ,
"name" : "telegraf" ,
"allowed" : [
"READ" ,
"WRITE"
]
}
} ,
"AllPermissions" : {
"description" : "All possible permissions for this particular datasource. Used as a static list" ,
"type" : "object" ,
"properties" : {
"permissions" : {
2017-02-27 19:31:38 +00:00
"$ref" : "#/definitions/Permissions"
2017-02-22 17:35:19 +00:00
} ,
"links" : {
"type" : "object" ,
"properties" : {
"self" : {
"description" : "Relative link back to the permissions endpoint" ,
"type" : "string" ,
"format" : "uri"
} ,
"source" : {
"description" : "Relative link to host with these permissiosn" ,
"type" : "string" ,
"format" : "uri"
}
}
}
}
} ,
"Allowances" : {
"description" : "Allowances defines what actions a user can have on a scoped permission" ,
"type" : "array" ,
"items" : {
"type" : "string" ,
"description" : "OSS InfluxDB is READ and WRITE. Enterprise is all others" ,
"enum" : [
"READ" ,
"WRITE" ,
"NoPermissions" ,
"ViewAdmin" ,
"ViewChronograf" ,
"CreateDatabase" ,
"CreateUserAndRole" ,
"AddRemoveNode" ,
"DropDatabase" ,
"DropData" ,
"ReadData" ,
"WriteData" ,
"Rebalance" ,
"ManageShard" ,
"ManageContinuousQuery" ,
"ManageQuery" ,
"ManageSubscription" ,
"Monitor" ,
"CopyShard" ,
"KapacitorAPI" ,
"KapacitorConfigAPI"
]
2016-10-25 15:20:06 +00:00
}
} ,
"Layouts" : {
"required" : [
"layouts"
] ,
"type" : "object" ,
"properties" : {
"layouts" : {
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/Layout"
}
}
}
} ,
"Layout" : {
"type" : "object" ,
"required" : [
"cells" ,
"app" ,
"measurement"
] ,
"properties" : {
"id" : {
"type" : "string" ,
"description" : "ID is an opaque string that uniquely identifies this layout."
} ,
"app" : {
"type" : "string" ,
"description" : "App is the user facing name of this Layout"
} ,
"measurement" : {
"type" : "string" ,
"description" : "Measurement is the descriptive name of the time series data."
} ,
"cells" : {
"type" : "array" ,
"description" : "Cells are the individual visualization elements." ,
"items" : {
"$ref" : "#/definitions/Cell"
}
} ,
"link" : {
"$ref" : "#/definitions/Link"
}
2017-02-22 18:52:55 +00:00
} ,
"example" : {
"id" : "0e980b97-c162-487b-a815-3f955df62430" ,
"app" : "docker" ,
"measurement" : "docker_container_net" ,
"autoflow" : true ,
"cells" : [
{
"x" : 0 ,
"y" : 0 ,
"w" : 4 ,
"h" : 4 ,
"i" : "4c79cefb-5152-410c-9b88-74f9bff7ef23" ,
"name" : "Docker - Container Network" ,
"queries" : [
{
"query" : "SELECT derivative(mean(\"tx_bytes\"), 10s) AS \"net_tx_bytes\" FROM \"docker_container_net\"" ,
"groupbys" : [
"\"container_name\""
]
} ,
{
"query" : "SELECT derivative(mean(\"rx_bytes\"), 10s) AS \"net_rx_bytes\" FROM \"docker_container_net\"" ,
"groupbys" : [
"\"container_name\""
]
}
] ,
"type" : ""
}
] ,
"link" : {
"href" : "/chronograf/v1/layouts/0e980b97-c162-487b-a815-3f955df62430" ,
"rel" : "self"
}
2016-10-25 15:20:06 +00:00
}
} ,
"Mappings" : {
"type" : "object" ,
"required" : [
"mappings"
] ,
"properties" : {
"mappings" : {
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/Mapping"
}
}
}
} ,
"Mapping" : {
"type" : "object" ,
"required" : [
"measurement" ,
"name"
] ,
"properties" : {
"measurement" : {
"description" : "The measurement where data for this mapping is found" ,
"type" : "string"
} ,
"name" : {
"description" : "The application name which will be assigned to the corresponding measurement" ,
"type" : "string"
}
2017-02-22 18:52:55 +00:00
} ,
"example" : {
"measurement" : "riak" ,
"name" : "riak"
2016-10-25 15:20:06 +00:00
}
} ,
"Cell" : {
"type" : "object" ,
"required" : [
2016-11-29 21:04:54 +00:00
"i" ,
2016-10-25 15:20:06 +00:00
"x" ,
"y" ,
"w" ,
"h"
] ,
"properties" : {
2016-11-29 21:04:54 +00:00
"i" : {
"description" : "Unique ID of Cell" ,
"type" : "string" ,
"format" : "uuid4"
} ,
2016-10-25 15:20:06 +00:00
"x" : {
"description" : "X-coordinate of Cell in the Layout" ,
"type" : "integer" ,
"format" : "int32"
} ,
"y" : {
"description" : "Y-coordinate of Cell in the Layout" ,
"type" : "integer" ,
"format" : "int32"
} ,
"w" : {
"description" : "Width of Cell in the Layout" ,
"type" : "integer" ,
"format" : "int32"
} ,
"h" : {
"description" : "Height of Cell in the Layout" ,
"type" : "integer" ,
"format" : "int32"
} ,
"queries" : {
"description" : "Time-series data queries for Cell." ,
"type" : "array" ,
"items" : {
2016-11-18 21:35:35 +00:00
"$ref" : "#/definitions/LayoutQuery"
}
2016-12-06 06:03:14 +00:00
} ,
"type" : {
"description" : "Cell visualization type" ,
"type" : "string" ,
"format" : "uuid4"
2016-11-29 21:04:54 +00:00
}
2017-02-22 18:52:55 +00:00
} ,
"example" : {
"x" : 5 ,
"y" : 5 ,
"w" : 4 ,
"h" : 4 ,
"name" : "usage_user" ,
"queries" : [
{
"query" : "SELECT mean(\"usage_user\") AS \"usage_user\" FROM \"cpu\"" ,
"label" : "%"
}
] ,
"type" : "line"
2016-11-18 21:35:35 +00:00
}
} ,
"LayoutQuery" : {
"type" : "object" ,
"required" : [
"query"
] ,
"properties" : {
2016-11-29 21:04:54 +00:00
"label" : {
"description" : "Optional Y-axis user-facing label for this query" ,
"type" : "string"
} ,
"range" : {
"description" : "Optional default range of the Y-axis" ,
"type" : "object" ,
"required" : [
"upper" ,
"lower"
] ,
"properties" : {
"upper" : {
"description" : "Upper bound of the display range of the Y-axis" ,
"type" : "integer" ,
"format" : "int64"
} ,
"lower" : {
"description" : "Lower bound of the display range of the Y-axis" ,
"type" : "integer" ,
"format" : "int64"
}
}
} ,
2016-11-18 21:35:35 +00:00
"query" : {
"type" : "string"
} ,
"wheres" : {
"description" : "Defines the condition clauses for influxdb" ,
"type" : "array" ,
"items" : {
"type" : "string"
}
} ,
"groupbys" : {
"description" : "Defines the group by clauses for influxdb" ,
"type" : "array" ,
"items" : {
"type" : "string"
2016-10-25 15:20:06 +00:00
}
}
2017-02-22 18:52:55 +00:00
} ,
"example" : {
"label" : "# warnings" ,
"query" : "SELECT count(\"check_id\") as \"Number Warning\" FROM consul_health_checks" ,
"wheres" : [
"\"status\" = 'warning'"
] ,
"groupbys" : [
"\"service_name\""
]
2016-10-25 15:20:06 +00:00
}
} ,
2016-12-07 23:17:42 +00:00
"Dashboards" : {
"description" : "a list of dashboards" ,
"type" : "object" ,
"properties" : {
"dashboards" : {
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/Dashboard"
}
}
}
} ,
"Dashboard" : {
"type" : "object" ,
"properties" : {
"id" : {
"description" : "the unique dashboard id" ,
"type" : "integer" ,
"format" : "int64"
} ,
"cells" : {
"description" : "a list of dashboard visualizations" ,
"type" : "array" ,
"items" : {
"description" : "cell visualization information" ,
"type" : "object" ,
"required" : [
"queries"
] ,
"properties" : {
"x" : {
"description" : "X-coordinate of Cell in the Dashboard" ,
"type" : "integer" ,
"format" : "int32"
} ,
"y" : {
"description" : "Y-coordinate of Cell in the Dashboard" ,
"type" : "integer" ,
"format" : "int32"
} ,
"w" : {
"description" : "Width of Cell in the Dashboard" ,
"type" : "integer" ,
2017-02-21 16:34:25 +00:00
"format" : "int32" ,
"minimum" : 1 ,
"default" : 4
2016-12-07 23:17:42 +00:00
} ,
"h" : {
"description" : "Height of Cell in the Dashboard" ,
"type" : "integer" ,
2017-02-21 16:34:25 +00:00
"format" : "int32" ,
"minimum" : 1 ,
"default" : 4
2016-12-07 23:17:42 +00:00
} ,
"queries" : {
"description" : "Time-series data queries for Cell." ,
"type" : "array" ,
"items" : {
2017-01-28 01:08:40 +00:00
"$ref" : "#/definitions/LayoutQuery"
2016-12-07 23:17:42 +00:00
}
} ,
"type" : {
"description" : "Cell visualization type" ,
"type" : "string" ,
"enum" : [
"single-stat" ,
"line" ,
2017-02-23 22:08:45 +00:00
"line-plus-single-stat" ,
"line-stacked" ,
"line-stepplot"
2016-12-07 23:17:42 +00:00
] ,
"default" : "line"
}
}
}
} ,
"name" : {
"description" : "the user-facing name of the dashboard" ,
"type" : "string"
} ,
"links" : {
"type" : "object" ,
"properties" : {
"self" : {
"type" : "string" ,
"description" : "Self link mapping to this resource" ,
"format" : "url"
}
}
}
2017-02-22 18:52:55 +00:00
} ,
"example" : {
"id" : 4 ,
"cells" : [
{
"x" : 5 ,
"y" : 5 ,
"w" : 4 ,
"h" : 4 ,
"name" : "usage_user" ,
"queries" : [
{
"query" : "SELECT mean(\"usage_user\") AS \"usage_user\" FROM \"cpu\"" ,
"label" : "%"
}
] ,
"type" : "line"
} ,
{
"x" : 0 ,
"y" : 0 ,
"w" : 4 ,
"h" : 4 ,
"name" : "usage_system" ,
"queries" : [
{
"query" : "SELECT mean(\"usage_system\") AS \"usage_system\" FROM \"cpu\"" ,
"label" : "%"
}
] ,
"type" : "line"
}
] ,
"name" : "lalalalala" ,
"links" : {
"self" : "/chronograf/v1/dashboards/4"
}
2016-12-07 23:17:42 +00:00
}
} ,
2016-10-25 15:20:06 +00:00
"Routes" : {
"type" : "object" ,
"properties" : {
2016-11-29 21:04:54 +00:00
"me" : {
2016-11-22 17:27:27 +00:00
"description" : "Location of the me endpoint." ,
"type" : "string" ,
"format" : "url"
} ,
2016-10-25 15:20:06 +00:00
"layouts" : {
"description" : "Location of the layouts endpoint" ,
"type" : "string" ,
"format" : "url"
} ,
"sources" : {
"description" : "Location of the sources endpoint" ,
"type" : "string" ,
"format" : "url"
} ,
"mappings" : {
"description" : "Location of the application mappings endpoint" ,
"type" : "string" ,
"format" : "url"
2016-12-07 23:17:42 +00:00
} ,
"dashboards" : {
"description" : "location of the dashboards endpoint" ,
"type" : "string" ,
"format" : "url"
2016-10-25 15:20:06 +00:00
}
2017-02-22 18:52:55 +00:00
} ,
"example" : {
"layouts" : "/chronograf/v1/layouts" ,
"mappings" : "/chronograf/v1/mappings" ,
"sources" : "/chronograf/v1/sources" ,
"me" : "/chronograf/v1/me" ,
"dashboards" : "/chronograf/v1/dashboards"
2016-10-25 15:20:06 +00:00
}
} ,
"Link" : {
"type" : "object" ,
"required" : [
"rel" ,
"href"
] ,
"readOnly" : true ,
"description" : "URI of resource." ,
"properties" : {
"rel" : {
"type" : "string"
} ,
"href" : {
"type" : "string" ,
"format" : "url"
}
}
} ,
"Error" : {
"type" : "object" ,
"properties" : {
"code" : {
"type" : "integer" ,
"format" : "int32"
} ,
"message" : {
"type" : "string"
}
}
}
}
2017-03-14 21:01:28 +00:00
}