"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. All associated kapacitor resources and kapacitor rules resources are also removed.",
"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}/queries":{
"post":{
"tags":["sources","queries"],
"description":"Used to analyze queries for structure`",
"parameters":[
{
"name":"id",
"in":"path",
"type":"string",
"description":"ID of the data source",
"required":true
},
{
"name":"queries",
"in":"body",
"description":"Query Parameters",
"schema":{
"$ref":"#/definitions/Queries"
},
"required":true
}
],
"responses":{
"200":{
"description":"Result of the analysis of the query.",
"schema":{
"$ref":"#/definitions/QueriesResponse"
}
},
"404":{
"description":"Data source id does not exist.",
"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"
}
}
}
}
},
"/sources/{id}/write":{
"post":{
"tags":["sources","write"],
"description":"Write points to the backend time series data source",
"parameters":[
{
"name":"id",
"in":"path",
"type":"string",
"description":"ID of the data source",
"required":true
},
{
"name":"query",
"in":"body",
"description":"Write Parameters",
"schema":{
"type":"string",
"format":"byte"
},
"required":true
},
{
"name":"db",
"in":"query",
"description":"Sets the target database for the write.",
"type":"string",
"required":true
},
{
"name":"rp",
"in":"query",
"description":"Sets the target retention policy for the write. InfluxDB writes to the DEFAULT retention policy if you do not specify a retention policy.",
"type":"string"
},
{
"name":"precision",
"in":"query",
"description":"Sets the precision for the supplied Unix time values. InfluxDB assumes that timestamps are in nanoseconds if you do not specify precision.",
"type":"string",
"enum":["ns","u","ms","s","m","h"]
},
{
"name":"consistency",
"in":"query",
"description":"Sets the write consistency for the point. InfluxDB assumes that the write consistency is one if you do not specify consistency. See the InfluxEnterprise documentation for detailed descriptions of each consistency option.",
"type":"string",
"enum":["any","one","quorum","all"]
}
],
"responses":{
"204":{
"description":"Points written successfuly to database."
},
"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"
}
}
}
}
},
"/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"
}
}
}
},
"post":{
"tags":["sources","users"],
"summary":"Create new user for this data source",
"parameters":[
{
"name":"id",
"in":"path",
"type":"string",
"description":"ID of the data source",
"required":true
},
{
"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"
}
},
"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/{user_id}":{
"get":{
"tags":["sources","users"],
"parameters":[
{
"name":"id",
"in":"path",
"type":"string",
"description":"ID of the data source",
"required":true
},
{
"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 within a data source",
"responses":{
"200":{
"description":"Information relating to the user",
"schema":{
"$ref":"#/definitions/User"
}
},
"404":{
"description":"Unknown user or unknown source",
"schema":{
"$ref":"#/definitions/Error"
}
},
"default":{
"description":"Unexpected internal service error",
"schema":{
"$ref":"#/definitions/Error"
}
}
}
},
"patch":{
"tags":["sources","users"],
"summary":"Update user configuration",
"parameters":[
{
"name":"id",
"in":"path",
"type":"string",
"description":"ID of the data source",
"required":true
},
{
"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 or source.",
"schema":{
"$ref":"#/definitions/Error"
}
},
"default":{
"description":"A processing or an unexpected error.",
"schema":{
"$ref":"#/definitions/Error"
}
}
}
},
"delete":{
"tags":["sources","users"],
"parameters":[
{
"name":"id",
"in":"path",
"type":"string",
"description":"ID of the data source",
"required":true
},
{
"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 source",
"responses":{
"204":{
"description":"User has been removed"
},
"404":{
"description":"Unknown user id or data source",
"schema":{
"$ref":"#/definitions/Error"
}
},
"default":{
"description":"Unexpected internal service error",
"schema":{
"$ref":"#/definitions/Error"
}
}
}
}
},
"/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"
}
}
}
}
},
"/sources/{id}/dbs/":{
"get":{
"tags":["databases"],
"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":{
"tags":["databases"],
"summary":"Create new database for a source",
"parameters":[
{
"name":"id",
"in":"path",
"type":"string",
"description":"ID of the data source",
"required":true
},
{
"name":"database",
"in":"body",
"description":"Configuration options for a database",
"schema":{
"$ref":"#/definitions/Database"
},
"required":true
}
],
"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":{
"tags":["databases"],
"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"
}
}
}
}
},
"/sources/{id}/dbs/{db_id}/rps":{
"get":{
"tags":["retention policies"],
"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":{
"tags":["retention policies"],
"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
},
{
"name":"rp",
"in":"body",
"description":"Configuration options for the retention policy",
"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",
"description":"Arguments and properties to add to alert",
"items":{
"$ref":"#/definitions/KapacitorNode"
}
},
"message":{
"type":"string",
"description":"Message to send when alert occurs."
},
"details":{
"type":"string",
"description":"Template for constructing a detailed HTML message for the alert. (Currently, only used for email/smtp"
},
"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"]
},
"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",
"inside range",
"outside range"
]
},
"value":{
"description":"Value is the boundary value when alert goes critical",
"type":"string"
},
"rangeValue":{
"description":"Optional value for range comparisions",
"type":"string"
}
}
},
"tickscript":{
"type":"string",
"description":"TICKscript representing this rule"
},
"status":{
"type":"string",
"description":"Represents if this rule is enabled or disabled in kapacitor",
"enum":["enabled","disabled"]
},
"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",
"description":"Username for authentication to data source"
},
"password":{
"type":"string",
"description":"Password is in cleartext."
},
"sharedSecret":{
"type":"string",
"description":"JWT signing secret for optional Authorization: Bearer to InfluxDB"
},
"url":{
"type":"string",
"format":"url",
"description":"URL for the time series data source backend (e.g. http://localhost:8086)"
},
"metaUrl":{
"type":"string",
"format":"url",
"description":"URL for the influxdb meta node"
},
"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."
},
"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"
},
"write":{
"type":"string",
"description":"URL location of write endpoint for this source",
"format":"url"
},
"queries":{
"type":"string",
"description":"URL location of the queries endpoint for this source",
"format":"url"
},
"kapacitors":{
"type":"string",
"description":"URL location of the kapacitors endpoint for this source",
"format":"url"
},
"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"
},
"roles":{
"type":"string",
"description":"Optional path to the roles endpoint IFF it is supported on this source",
"format":"url"
}
}
}
}
},
"Proxy":{
"type":"object",
"example":{
"query":"select $myfield from cpu where time > now() - 10m",
"db":"telegraf",
"rp":"autogen",
"tempVars":[
{
"tempVar":"$myfield",
"values":[
{
"type":"fieldKey",
"value":"usage_user"
}
]
}
]
},
"required":["query"],
"properties":{
"query":{
"type":"string"
},
"db":{
"type":"string"
},
"rp":{
"type":"string"
},
"tempVars":{
"type":"array",
"description":"Template variables to replace within an InfluxQL query",
"items":{
"$ref":"#/definitions/TemplateVariable"
}
}
}
},
"TemplateVariable":{
"type":"object",
"description":"Named variable within an InfluxQL query to be replaced with values",
"properties":{
"tempVar":{
"type":"string",
"description":"String to replace within an InfluxQL statement"
},
"values":{
"type":"array",
"description":"Values used to replace tempVar.",
"items":{
"$ref":"#/definitions/TemplateValue"
}
}
}
},
"TemplateValue":{
"type":"object",
"description":"Value use to replace a template in an InfluxQL query. The type governs the output format",
"properties":{
"value":{
"type":"string",
"description":"Specific value that will be encoded based on type"
"description":"The type will change the format of the output value. tagKey/fieldKey are double quoted; tagValue are single quoted; csv and timeStamp are not quoted."