2176 lines
46 KiB
JSON
2176 lines
46 KiB
JSON
{
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"title": "Chronograf",
|
|
"description": "API endpoints for Chronograf",
|
|
"version": "1.1.0"
|
|
},
|
|
"schemes": [
|
|
"http"
|
|
],
|
|
"basePath": "/chronograf/v1",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"paths": {
|
|
"/": {
|
|
"get": {
|
|
"tags": [
|
|
"routes"
|
|
],
|
|
"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": {
|
|
"tags": [
|
|
"sources"
|
|
],
|
|
"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": {
|
|
"tags": [
|
|
"sources"
|
|
],
|
|
"summary": "Create new data source",
|
|
"parameters": [
|
|
{
|
|
"name": "source",
|
|
"in": "body",
|
|
"description": "Configuration options for data source",
|
|
"schema": {
|
|
"$ref": "#/definitions/Source"
|
|
}
|
|
}
|
|
],
|
|
"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": {
|
|
"tags": [
|
|
"sources"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"type": "string",
|
|
"description": "ID of the data source",
|
|
"required": true
|
|
}
|
|
],
|
|
"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": {
|
|
"tags": [
|
|
"sources"
|
|
],
|
|
"summary": "Update data source configuration",
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"type": "string",
|
|
"description": "ID of a data source",
|
|
"required": true
|
|
},
|
|
{
|
|
"name": "config",
|
|
"in": "body",
|
|
"description": "data source configuration",
|
|
"schema": {
|
|
"$ref": "#/definitions/Source"
|
|
},
|
|
"required": true
|
|
}
|
|
],
|
|
"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": {
|
|
"tags": [
|
|
"sources"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"type": "string",
|
|
"description": "ID of the source",
|
|
"required": true
|
|
}
|
|
],
|
|
"summary": "This specific data source will be removed from the data store",
|
|
"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": {
|
|
"tags": [
|
|
"sources",
|
|
"proxy"
|
|
],
|
|
"description": "Query the backend time series data source and return the response according to `format`",
|
|
"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
|
|
}
|
|
],
|
|
"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"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/users": {
|
|
"post": {
|
|
"tags": [
|
|
"users"
|
|
],
|
|
"summary": "Create new user for this data source",
|
|
"parameters": [
|
|
{
|
|
"name": "user",
|
|
"in": "body",
|
|
"description": "Configuration options for new user",
|
|
"schema": {
|
|
"$ref": "#/definitions/User"
|
|
}
|
|
}
|
|
],
|
|
"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"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "A processing or an unexpected error.",
|
|
"schema": {
|
|
"$ref": "#/definitions/Error"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/users/{user_id}": {
|
|
"get": {
|
|
"tags": [
|
|
"users"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "user_id",
|
|
"in": "path",
|
|
"type": "string",
|
|
"description": "ID of the specific user",
|
|
"required": true
|
|
}
|
|
],
|
|
"summary": "Returns information about a specific user",
|
|
"description": "Specific User.\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Information relating to the user",
|
|
"schema": {
|
|
"$ref": "#/definitions/User"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Unknown user",
|
|
"schema": {
|
|
"$ref": "#/definitions/Error"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "Unexpected internal service error",
|
|
"schema": {
|
|
"$ref": "#/definitions/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"tags": [
|
|
"users"
|
|
],
|
|
"summary": "Update user configuration",
|
|
"parameters": [
|
|
{
|
|
"name": "user_id",
|
|
"in": "path",
|
|
"type": "string",
|
|
"description": "ID of the specific user",
|
|
"required": true
|
|
},
|
|
{
|
|
"name": "config",
|
|
"in": "body",
|
|
"description": "user configuration",
|
|
"schema": {
|
|
"$ref": "#/definitions/User"
|
|
},
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Users's configuration was changed",
|
|
"schema": {
|
|
"$ref": "#/definitions/User"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Happens when trying to access a non-existent user.",
|
|
"schema": {
|
|
"$ref": "#/definitions/Error"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "A processing or an unexpected error.",
|
|
"schema": {
|
|
"$ref": "#/definitions/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"users"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "user_id",
|
|
"in": "path",
|
|
"type": "string",
|
|
"description": "ID of the specific user",
|
|
"required": true
|
|
}
|
|
],
|
|
"summary": "This specific user will be removed from the data store",
|
|
"responses": {
|
|
"204": {
|
|
"description": "User has been removed"
|
|
},
|
|
"404": {
|
|
"description": "Unknown user id",
|
|
"schema": {
|
|
"$ref": "#/definitions/Error"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "Unexpected internal service error",
|
|
"schema": {
|
|
"$ref": "#/definitions/Error"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/users/{user_id}/explorations": {
|
|
"get": {
|
|
"tags": [
|
|
"users",
|
|
"explorations"
|
|
],
|
|
"summary": "Returns all explorations for specified user",
|
|
"parameters": [
|
|
{
|
|
"name": "user_id",
|
|
"in": "path",
|
|
"type": "string",
|
|
"description": "All Data Explorations returned only for this user.",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Data Explorations saved sessions for user are returned.",
|
|
"schema": {
|
|
"$ref": "#/definitions/Explorations"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "User does not exist.",
|
|
"schema": {
|
|
"$ref": "#/definitions/Error"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "Unexpected internal service error",
|
|
"schema": {
|
|
"$ref": "#/definitions/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"users",
|
|
"explorations"
|
|
],
|
|
"summary": "Create new named exploration for this user",
|
|
"parameters": [
|
|
{
|
|
"name": "user_id",
|
|
"in": "path",
|
|
"type": "string",
|
|
"description": "ID of user to associate this exploration with.",
|
|
"required": true
|
|
},
|
|
{
|
|
"name": "exploration",
|
|
"in": "body",
|
|
"description": "Exploration session to save",
|
|
"schema": {
|
|
"$ref": "#/definitions/Exploration"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Successfully created new Exploration session",
|
|
"headers": {
|
|
"Location": {
|
|
"type": "string",
|
|
"format": "url",
|
|
"description": "Location of the newly created exploration resource."
|
|
}
|
|
},
|
|
"schema": {
|
|
"$ref": "#/definitions/Exploration"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "User does not exist.",
|
|
"schema": {
|
|
"$ref": "#/definitions/Error"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "A processing or an unexpected error.",
|
|
"schema": {
|
|
"$ref": "#/definitions/Error"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/users/{user_id}/explorations/{exploration_id}": {
|
|
"get": {
|
|
"tags": [
|
|
"users",
|
|
"explorations"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "user_id",
|
|
"in": "path",
|
|
"type": "string",
|
|
"description": "ID of user to associate this exploration with.",
|
|
"required": true
|
|
},
|
|
{
|
|
"name": "exploration_id",
|
|
"in": "path",
|
|
"type": "string",
|
|
"description": "ID of the specific exploration.",
|
|
"required": true
|
|
}
|
|
],
|
|
"summary": "Returns the specified data exploration session",
|
|
"description": "A data exploration session specifies query information.\n",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Information relating to the exploration",
|
|
"schema": {
|
|
"$ref": "#/definitions/Exploration"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "User or exploration does not exist.",
|
|
"schema": {
|
|
"$ref": "#/definitions/Error"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "Unexpected internal service error",
|
|
"schema": {
|
|
"$ref": "#/definitions/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"tags": [
|
|
"users",
|
|
"explorations"
|
|
],
|
|
"summary": "Update exploration configuration",
|
|
"parameters": [
|
|
{
|
|
"name": "user_id",
|
|
"in": "path",
|
|
"type": "string",
|
|
"description": "ID of user",
|
|
"required": true
|
|
},
|
|
{
|
|
"name": "exploration_id",
|
|
"in": "path",
|
|
"type": "string",
|
|
"description": "ID of the specific exploration.",
|
|
"required": true
|
|
},
|
|
{
|
|
"name": "exploration",
|
|
"in": "body",
|
|
"description": "Update the exploration information to this.",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/Exploration"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Exploration's configuration was changed",
|
|
"schema": {
|
|
"$ref": "#/definitions/Exploration"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Data source id, user, or exploration does not exist.",
|
|
"schema": {
|
|
"$ref": "#/definitions/Error"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "A processing or an unexpected error.",
|
|
"schema": {
|
|
"$ref": "#/definitions/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"users",
|
|
"explorations"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "user_id",
|
|
"in": "path",
|
|
"type": "string",
|
|
"description": "ID of user to associate this exploration with.",
|
|
"required": true
|
|
},
|
|
{
|
|
"name": "exploration_id",
|
|
"in": "path",
|
|
"type": "string",
|
|
"description": "ID of the specific exploration.",
|
|
"required": true
|
|
}
|
|
],
|
|
"summary": "This specific exporer session will be removed.",
|
|
"responses": {
|
|
"204": {
|
|
"description": "Exploration session has been removed"
|
|
},
|
|
"404": {
|
|
"description": "Data source id, user, or exploration does not exist.",
|
|
"schema": {
|
|
"$ref": "#/definitions/Error"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "Unexpected internal service error",
|
|
"schema": {
|
|
"$ref": "#/definitions/Error"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/sources/{id}/kapacitors": {
|
|
"get": {
|
|
"tags": [
|
|
"sources",
|
|
"kapacitors"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"type": "string",
|
|
"description": "ID of the source",
|
|
"required": true
|
|
}
|
|
],
|
|
"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": {
|
|
"tags": [
|
|
"sources",
|
|
"kapacitors"
|
|
],
|
|
"summary": "Create new kapacitor backend",
|
|
"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"
|
|
}
|
|
}
|
|
],
|
|
"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": {
|
|
"tags": [
|
|
"sources",
|
|
"kapacitors"
|
|
],
|
|
"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
|
|
}
|
|
],
|
|
"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": {
|
|
"tags": [
|
|
"sources",
|
|
"kapacitors"
|
|
],
|
|
"summary": "Update kapacitor configuration",
|
|
"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
|
|
},
|
|
{
|
|
"name": "config",
|
|
"in": "body",
|
|
"description": "kapacitor configuration",
|
|
"schema": {
|
|
"$ref": "#/definitions/Kapacitor"
|
|
},
|
|
"required": true
|
|
}
|
|
],
|
|
"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": {
|
|
"tags": [
|
|
"sources",
|
|
"kapacitors"
|
|
],
|
|
"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
|
|
}
|
|
],
|
|
"summary": "This specific kapacitor will be removed.",
|
|
"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"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/sources/{id}/kapacitors/{kapa_id}/rules": {
|
|
"get": {
|
|
"tags": [
|
|
"sources",
|
|
"kapacitors",
|
|
"rules"
|
|
],
|
|
"description": "Get all defined alert 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 backend.",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "All alert rules for this specific kapacitor are returned",
|
|
"schema": {
|
|
"$ref": "#/definitions/Rules"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Data source or Kapacitor ID does not exist.",
|
|
"schema": {
|
|
"$ref": "#/definitions/Error"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "Internal server error",
|
|
"schema": {
|
|
"$ref": "#/definitions/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"sources",
|
|
"kapacitors",
|
|
"rules"
|
|
],
|
|
"description": "Create kapacitor alert rule",
|
|
"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": "rule",
|
|
"in": "body",
|
|
"description": "Rule to generate alert rule",
|
|
"schema": {
|
|
"$ref": "#/definitions/Rule"
|
|
},
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Successfully created new kapacitor alert rule",
|
|
"headers": {
|
|
"Location": {
|
|
"type": "string",
|
|
"format": "url",
|
|
"description": "Location of the newly created kapacitor rule resource."
|
|
}
|
|
},
|
|
"schema": {
|
|
"$ref": "#/definitions/Rule"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Source ID or Kapacitor ID does not exist.",
|
|
"schema": {
|
|
"$ref": "#/definitions/Error"
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Source ID , Kapacitor ID or alert are unprocessable",
|
|
"schema": {
|
|
"$ref": "#/definitions/Error"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "Internal server error; generally a problem creating alert in kapacitor",
|
|
"schema": {
|
|
"$ref": "#/definitions/Error"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/sources/{id}/kapacitors/{kapa_id}/rules/{rule_id}": {
|
|
"get": {
|
|
"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
|
|
}
|
|
],
|
|
"summary": "Specific kapacitor alert rule",
|
|
"description": "Alerting rule for kapacitor",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Alert exists and has a specific TICKscript",
|
|
"schema": {
|
|
"$ref": "#/definitions/Rule"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Unknown data source, kapacitor id, or rule id",
|
|
"schema": {
|
|
"$ref": "#/definitions/Error"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "Unexpected internal service error",
|
|
"schema": {
|
|
"$ref": "#/definitions/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"sources",
|
|
"kapacitors",
|
|
"rules"
|
|
],
|
|
"summary": "Update rule alert rule configuration",
|
|
"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
|
|
},
|
|
{
|
|
"name": "rule_id",
|
|
"in": "path",
|
|
"type": "string",
|
|
"description": "ID of a rule",
|
|
"required": true
|
|
},
|
|
{
|
|
"name": "rule",
|
|
"in": "body",
|
|
"description": "Rule update",
|
|
"schema": {
|
|
"$ref": "#/definitions/Rule"
|
|
},
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Alert configuration was changed",
|
|
"schema": {
|
|
"$ref": "#/definitions/Rule"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Happens when trying to access a non-existent data source, kapacitor, or rule.",
|
|
"schema": {
|
|
"$ref": "#/definitions/Error"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "A processing or an unexpected error.",
|
|
"schema": {
|
|
"$ref": "#/definitions/Error"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"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
|
|
}
|
|
],
|
|
"summary": "This specific alert rule will be removed.",
|
|
"responses": {
|
|
"204": {
|
|
"description": "Alert rule has been removed."
|
|
},
|
|
"404": {
|
|
"description": "Unknown Data source, Kapacitor id, or alert rule",
|
|
"schema": {
|
|
"$ref": "#/definitions/Error"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "Unexpected internal service error",
|
|
"schema": {
|
|
"$ref": "#/definitions/Error"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/sources/{id}/kapacitors/{kapa_id}/proxy": {
|
|
"get": {
|
|
"tags": [
|
|
"sources",
|
|
"kapacitors",
|
|
"proxy"
|
|
],
|
|
"description": "GET to `path` of kapacitor. The response and status code from kapacitor is directly returned.",
|
|
"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
|
|
}
|
|
],
|
|
"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": {
|
|
"tags": [
|
|
"sources",
|
|
"kapacitors",
|
|
"proxy"
|
|
],
|
|
"description": "DELETE to `path` of kapacitor. The response and status code from kapacitor is directly returned.",
|
|
"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
|
|
}
|
|
],
|
|
"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": {
|
|
"tags": [
|
|
"sources",
|
|
"kapacitors",
|
|
"proxy"
|
|
],
|
|
"description": "PATCH body directly to configured kapacitor. The response and status code from kapacitor is directly returned.",
|
|
"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
|
|
}
|
|
],
|
|
"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": {
|
|
"tags": [
|
|
"sources",
|
|
"kapacitors",
|
|
"proxy"
|
|
],
|
|
"description": "POST body directly to configured kapacitor. The response and status code from kapacitor is directly returned.",
|
|
"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
|
|
}
|
|
],
|
|
"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": {
|
|
"tags": [
|
|
"layouts",
|
|
"mappings"
|
|
],
|
|
"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": {
|
|
"tags": [
|
|
"layouts"
|
|
],
|
|
"summary": "Pre-configured layouts",
|
|
"parameters": [
|
|
{
|
|
"name": "measurement",
|
|
"in": "query",
|
|
"description": "Returns layouts with this measurement",
|
|
"required": false,
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"collectionFormat": "multi"
|
|
},
|
|
{
|
|
"name": "app",
|
|
"in": "query",
|
|
"description": "Returns layouts with this app",
|
|
"required": false,
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"collectionFormat": "multi"
|
|
}
|
|
],
|
|
"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": {
|
|
"tags": [
|
|
"layouts"
|
|
],
|
|
"summary": "Create new layout",
|
|
"parameters": [
|
|
{
|
|
"name": "layout",
|
|
"in": "body",
|
|
"description": "Defines the layout and queries of the cells within the layout.",
|
|
"schema": {
|
|
"$ref": "#/definitions/Layout"
|
|
}
|
|
}
|
|
],
|
|
"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": {
|
|
"tags": [
|
|
"layouts"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"type": "string",
|
|
"description": "ID of the layout",
|
|
"required": true
|
|
}
|
|
],
|
|
"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": {
|
|
"tags": [
|
|
"layouts"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"type": "string",
|
|
"description": "ID of the layout",
|
|
"required": true
|
|
}
|
|
],
|
|
"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": {
|
|
"tags": [
|
|
"layouts"
|
|
],
|
|
"summary": "Replace layout configuration.",
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"type": "string",
|
|
"description": "ID of a layout",
|
|
"required": true
|
|
},
|
|
{
|
|
"name": "config",
|
|
"in": "body",
|
|
"description": "layout configuration update parameters",
|
|
"schema": {
|
|
"$ref": "#/definitions/Layout"
|
|
},
|
|
"required": true
|
|
}
|
|
],
|
|
"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"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"Kapacitors": {
|
|
"type": "object",
|
|
"required": [
|
|
"kapacitors"
|
|
],
|
|
"properties": {
|
|
"kapacitors": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/Kapacitor"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"Kapacitor": {
|
|
"type": "object",
|
|
"required": [
|
|
"name",
|
|
"url"
|
|
],
|
|
"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",
|
|
"description": "Username for authentication to kapacitor."
|
|
},
|
|
"password": {
|
|
"type": "string",
|
|
"description": "Password is in cleartext."
|
|
},
|
|
"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",
|
|
"description": "URL location of proxy endpoint for this kapacitor",
|
|
"format": "url"
|
|
},
|
|
"rules": {
|
|
"type": "string",
|
|
"description": "URL location of rules endpoint for this kapacitor",
|
|
"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"
|
|
},
|
|
"Rules": {
|
|
"type": "object",
|
|
"required": [
|
|
"rules"
|
|
],
|
|
"properties": {
|
|
"rules": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/Rule"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"Rule": {
|
|
"type": "object",
|
|
"required": [
|
|
"every",
|
|
"trigger"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"description": "ID for this rule; the ID is shared with kapacitor"
|
|
},
|
|
"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": {
|
|
"type": "string",
|
|
"enum": [
|
|
"hipchat",
|
|
"opsgenie",
|
|
"pagerduty",
|
|
"victorops",
|
|
"smtp",
|
|
"email",
|
|
"sensu",
|
|
"slack",
|
|
"talk",
|
|
"telegram"
|
|
]
|
|
}
|
|
},
|
|
"message": {
|
|
"type": "string",
|
|
"description": "Message to send when alert occurs."
|
|
},
|
|
"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": [
|
|
"deadman",
|
|
"relative",
|
|
"threshold"
|
|
]
|
|
},
|
|
"tickscript": {
|
|
"type": "string",
|
|
"description": "TICKscript representing this rule"
|
|
},
|
|
"links": {
|
|
"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"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"Sources": {
|
|
"type": "object",
|
|
"required": [
|
|
"sources"
|
|
],
|
|
"properties": {
|
|
"sources": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/Source"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"Source": {
|
|
"type": "object",
|
|
"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",
|
|
"description": "Password is in cleartext."
|
|
},
|
|
"url": {
|
|
"type": "string",
|
|
"format": "url",
|
|
"description": "URL for the time series data source backend (e.g. http://localhost:8086)"
|
|
},
|
|
"default": {
|
|
"type": "boolean",
|
|
"description": "Indicates whether this source is the default source"
|
|
},
|
|
"telegraf": {
|
|
"type": "string",
|
|
"description": "Database where telegraf information is stored for this source",
|
|
"default": "telegraf"
|
|
},
|
|
"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"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"Proxy": {
|
|
"type": "object",
|
|
"required": [
|
|
"query"
|
|
],
|
|
"properties": {
|
|
"query": {
|
|
"type": "string"
|
|
},
|
|
"db": {
|
|
"type": "string"
|
|
},
|
|
"rp": {
|
|
"type": "string"
|
|
},
|
|
"format": {
|
|
"type": "string",
|
|
"enum": [
|
|
"raw"
|
|
],
|
|
"default": "raw"
|
|
}
|
|
}
|
|
},
|
|
"ProxyResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"results": {
|
|
"description": "results from influx",
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"Explorations": {
|
|
"type": "object",
|
|
"required": [
|
|
"explorations"
|
|
],
|
|
"properties": {
|
|
"explorations": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/Exploration"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"Exploration": {
|
|
"type": "object",
|
|
"properties": {
|
|
"created_at": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"updated_at": {
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"description": "Latest time the exploration was updated."
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"description": "Exploration name given by user."
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"description": "Serialization of the exploration query configuration."
|
|
},
|
|
"link": {
|
|
"$ref": "#/definitions/Link"
|
|
}
|
|
}
|
|
},
|
|
"Users": {
|
|
"type": "object",
|
|
"properties": {
|
|
"users": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/User"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"User": {
|
|
"type": "object",
|
|
"required": [
|
|
"email"
|
|
],
|
|
"properties": {
|
|
"email": {
|
|
"type": "string",
|
|
"maxLength": 254
|
|
},
|
|
"link": {
|
|
"$ref": "#/definitions/Link"
|
|
}
|
|
}
|
|
},
|
|
"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"
|
|
}
|
|
}
|
|
},
|
|
"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"
|
|
}
|
|
}
|
|
},
|
|
"Cell": {
|
|
"type": "object",
|
|
"required": [
|
|
"i",
|
|
"x",
|
|
"y",
|
|
"w",
|
|
"h"
|
|
],
|
|
"properties": {
|
|
"i": {
|
|
"description": "Unique ID of Cell",
|
|
"type": "string",
|
|
"format": "uuid4"
|
|
},
|
|
"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": {
|
|
"$ref": "#/definitions/LayoutQuery"
|
|
}
|
|
},
|
|
"type": {
|
|
"description": "Cell visualization type",
|
|
"type": "string",
|
|
"format": "uuid4"
|
|
}
|
|
}
|
|
},
|
|
"LayoutQuery": {
|
|
"type": "object",
|
|
"required": [
|
|
"query"
|
|
],
|
|
"properties": {
|
|
"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"
|
|
}
|
|
}
|
|
},
|
|
"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"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"Routes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"users": {
|
|
"description": "Location of the users endpoint",
|
|
"type": "string",
|
|
"format": "url"
|
|
},
|
|
"me": {
|
|
"description": "Location of the me endpoint.",
|
|
"type": "string",
|
|
"format": "url"
|
|
},
|
|
"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"
|
|
}
|
|
}
|
|
},
|
|
"Links": {
|
|
"type": "object",
|
|
"properties": {
|
|
"links": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/Link"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"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"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|