Update swagger to remove rp/db for layouts

pull/587/head
Chris Goller 2016-11-18 15:35:35 -06:00
parent 6ab01e1cfe
commit f002fd774a
1 changed files with 545 additions and 424 deletions

View File

@ -57,14 +57,16 @@
},
"post": {
"summary": "Create new data source",
"parameters": [{
"parameters": [
{
"name": "source",
"in": "body",
"description": "Configuration options for data source",
"schema": {
"$ref": "#/definitions/Source"
}
}],
}
],
"responses": {
"201": {
"description": "Successfully create data source",
@ -90,13 +92,15 @@
},
"/sources/{id}": {
"get": {
"parameters": [{
"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": {
@ -122,13 +126,15 @@
},
"patch": {
"summary": "Update data source configuration",
"parameters": [{
"parameters": [
{
"name": "id",
"in": "path",
"type": "string",
"description": "ID of a data source",
"required": true
}, {
},
{
"name": "config",
"in": "body",
"description": "data source configuration",
@ -136,7 +142,8 @@
"$ref": "#/definitions/Source"
},
"required": true
}],
}
],
"responses": {
"200": {
"description": "Data source's configuration was changed",
@ -159,13 +166,15 @@
}
},
"delete": {
"parameters": [{
"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": {
@ -189,13 +198,15 @@
"/sources/{id}/proxy": {
"post": {
"description": "Query the backend time series data source and return the response according to `format`",
"parameters": [{
"parameters": [
{
"name": "id",
"in": "path",
"type": "string",
"description": "ID of the data source",
"required": true
}, {
},
{
"name": "query",
"in": "body",
"description": "Query Parameters",
@ -203,7 +214,8 @@
"$ref": "#/definitions/Proxy"
},
"required": true
}],
}
],
"responses": {
"200": {
"description": "Result of the query from the backend time series data source.",
@ -258,14 +270,16 @@
},
"post": {
"summary": "Create new user for this data source",
"parameters": [{
"parameters": [
{
"name": "user",
"in": "body",
"description": "Configuration options for new user",
"schema": {
"$ref": "#/definitions/User"
}
}],
}
],
"responses": {
"201": {
"description": "Successfully created new user",
@ -291,13 +305,15 @@
},
"/users/{user_id}": {
"get": {
"parameters": [{
"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": {
@ -323,13 +339,15 @@
},
"patch": {
"summary": "Update user configuration",
"parameters": [{
"parameters": [
{
"name": "user_id",
"in": "path",
"type": "string",
"description": "ID of the specific user",
"required": true
}, {
},
{
"name": "config",
"in": "body",
"description": "user configuration",
@ -337,7 +355,8 @@
"$ref": "#/definitions/User"
},
"required": true
}],
}
],
"responses": {
"200": {
"description": "Users's configuration was changed",
@ -360,13 +379,15 @@
}
},
"delete": {
"parameters": [{
"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": {
@ -389,13 +410,15 @@
},
"/users/{user_id}/explorations": {
"get": {
"parameters": [{
"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.",
@ -419,20 +442,23 @@
},
"post": {
"summary": "Create new named exploration for this user",
"parameters": [{
"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",
@ -464,19 +490,22 @@
},
"/users/{user_id}/explorations/{exploration_id}": {
"get": {
"parameters": [{
"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": {
@ -502,19 +531,22 @@
},
"patch": {
"summary": "Update exploration configuration",
"parameters": [{
"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.",
@ -522,7 +554,8 @@
"schema": {
"$ref": "#/definitions/Exploration"
}
}],
}
],
"responses": {
"200": {
"description": "Exploration's configuration was changed",
@ -545,19 +578,22 @@
}
},
"delete": {
"parameters": [{
"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": {
@ -580,13 +616,15 @@
},
"/sources/{id}/kapacitors": {
"get": {
"parameters": [{
"parameters": [
{
"name": "id",
"in": "path",
"type": "string",
"description": "ID of the source",
"required": true
}],
}
],
"summary": "Configured kapacitors",
"responses": {
"200": {
@ -605,20 +643,23 @@
},
"post": {
"summary": "Create new kapacitor backend",
"parameters": [{
"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",
@ -644,19 +685,22 @@
},
"/sources/{id}/kapacitors/{kapa_id}": {
"get": {
"parameters": [{
"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": {
@ -682,19 +726,22 @@
},
"patch": {
"summary": "Update kapacitor configuration",
"parameters": [{
"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",
@ -702,7 +749,8 @@
"$ref": "#/definitions/Kapacitor"
},
"required": true
}],
}
],
"responses": {
"200": {
"description": "Kapacitor's configuration was changed",
@ -725,19 +773,22 @@
}
},
"delete": {
"parameters": [{
"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": {
@ -761,19 +812,22 @@
"/sources/{id}/kapacitors/{kapa_id}/tasks": {
"get": {
"description": "Get all defined alert tasks.",
"parameters": [{
"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 tasks for this specific kapacitor are returned",
@ -797,19 +851,22 @@
},
"post": {
"description": "Create kapacitor alert task",
"parameters": [{
"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": "task",
"in": "body",
"description": "Rule to generate alert task",
@ -817,7 +874,8 @@
"$ref": "#/definitions/Task"
},
"required": true
}],
}
],
"responses": {
"201": {
"description": "Successfully created new kapacitor alert task",
@ -849,25 +907,29 @@
},
"/sources/{id}/kapacitors/{kapa_id}/tasks/{task_id}": {
"get": {
"parameters": [{
"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": "task_id",
"in": "path",
"type": "string",
"description": "ID of the task",
"required": true
}],
}
],
"summary": "Specific kapacitor alert task",
"description": "Alerting task for kapacitor",
"responses": {
@ -893,26 +955,28 @@
},
"put": {
"summary": "Update rule alert task configuration",
"parameters": [{
"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": "task_id",
"in": "path",
"type": "string",
"description": "ID of a task",
"required": true
},
{
"name": "task",
"in": "body",
@ -945,26 +1009,28 @@
}
},
"delete": {
"parameters": [{
"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": "task_id",
"in": "path",
"type": "string",
"description": "ID of the task",
"required": true
}
],
"summary": "This specific alert task will be removed.",
"responses": {
@ -989,25 +1055,29 @@
"/sources/{id}/kapacitors/{kapa_id}/proxy": {
"get": {
"description": "GET to `path` of kapacitor. The response and status code from kapacitor is directly returned.",
"parameters": [{
"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"
@ -1028,25 +1098,29 @@
},
"delete": {
"description": "DELETE to `path` of kapacitor. The response and status code from kapacitor is directly returned.",
"parameters": [{
"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"
@ -1067,25 +1141,29 @@
},
"patch": {
"description": "PATCH body directly to configured kapacitor. The response and status code from kapacitor is directly returned.",
"parameters": [{
"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",
@ -1093,7 +1171,8 @@
"$ref": "#/definitions/KapacitorProxy"
},
"required": true
}],
}
],
"responses": {
"204": {
"description": "Kapacitor returned no content"
@ -1114,25 +1193,29 @@
},
"post": {
"description": "POST body directly to configured kapacitor. The response and status code from kapacitor is directly returned.",
"parameters": [{
"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",
@ -1140,7 +1223,8 @@
"$ref": "#/definitions/KapacitorProxy"
},
"required": true
}],
}
],
"responses": {
"204": {
"description": "Kapacitor returned no content"
@ -1183,7 +1267,8 @@
"/layouts": {
"get": {
"summary": "Pre-configured layouts",
"parameters": [{
"parameters": [
{
"name": "measurement",
"in": "query",
"description": "Returns layouts with this measurement",
@ -1193,7 +1278,8 @@
"type": "string"
},
"collectionFormat": "multi"
}, {
},
{
"name": "app",
"in": "query",
"description": "Returns layouts with this app",
@ -1203,7 +1289,8 @@
"type": "string"
},
"collectionFormat": "multi"
}],
}
],
"description": "Layouts are a collection of `Cells` that visualize time-series data.\n",
"responses": {
"200": {
@ -1222,14 +1309,16 @@
},
"post": {
"summary": "Create new layout",
"parameters": [{
"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",
@ -1255,13 +1344,15 @@
},
"/layouts/{id}": {
"get": {
"parameters": [{
"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": {
@ -1286,13 +1377,15 @@
}
},
"delete": {
"parameters": [{
"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": {
@ -1314,13 +1407,15 @@
},
"put": {
"summary": "Replace layout configuration.",
"parameters": [{
"parameters": [
{
"name": "id",
"in": "path",
"type": "string",
"description": "ID of a layout",
"required": true
}, {
},
{
"name": "config",
"in": "body",
"description": "layout configuration update parameters",
@ -1328,7 +1423,8 @@
"$ref": "#/definitions/Layout"
},
"required": true
}],
}
],
"responses": {
"200": {
"description": "Layout has been replaced and the new layout is returned.",
@ -1716,7 +1812,32 @@
"description": "Time-series data queries for Cell.",
"type": "array",
"items": {
"$ref": "#/definitions/Proxy"
"$ref": "#/definitions/LayoutQuery"
}
}
}
},
"LayoutQuery": {
"type": "object",
"required": [
"query"
],
"properties": {
"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"
}
}
}