diff --git a/api-docs/cloud-dedicated/v1-compatibility/swaggerV1Compat.yml b/api-docs/cloud-dedicated/v1-compatibility/swaggerV1Compat.yml index 2305869b8..091885223 100644 --- a/api-docs/cloud-dedicated/v1-compatibility/swaggerV1Compat.yml +++ b/api-docs/cloud-dedicated/v1-compatibility/swaggerV1Compat.yml @@ -135,7 +135,7 @@ paths: operationId: PostQueryV1 tags: - Query - summary: Query InfluxDB in a V1 compatible format + summary: Query using the InfluxDB v1 HTTP API requestBody: description: InfluxQL query to execute. content: @@ -217,6 +217,11 @@ paths: application/json: schema: $ref: '#/components/schemas/InfluxQLResponse' + examples: + influxql-chunk_size_2: + value: | + {"results":[{"statement_id":0,"series":[{"name":"mymeas","columns":["time","myfield","mytag"],"values":[["2016-05-19T18:37:55Z",90,"1"],["2016-05-19T18:37:56Z",90,"1"]],"partial":true}],"partial":true}]} + {"results":[{"statement_id":0,"series":[{"name":"mymeas","columns":["time","myfield","mytag"],"values":[["2016-05-19T18:37:57Z",90,"1"],["2016-05-19T18:37:58Z",90,"1"]]}]}]} application/x-msgpack: schema: type: string @@ -265,45 +270,75 @@ components: description: User token. schemas: InfluxQLResponse: + description: | + The JSON response for an InfluxQL query. + + A response contains the collection of results for a query. + `results` is an array of resultset objects. + + If the response is chunked, the `transfer-encoding` response header is set to `chunked` and each resultset object is sent in a separate JSON object. properties: results: - type: array - oneOf: - - required: - - statement_id - - error - - required: - - statement_id - - series + description: | + A resultset object that contains the `statement_id` and the `series` array. + + Except for `statement_id`, all properties are optional and omitted if empty. If a property is not present, it is assumed to be `null`. items: - type: object properties: - statement_id: - type: integer error: type: string + partial: + description: | + True if the resultset is not complete--the response data is chunked; otherwise, false or omitted. + type: boolean series: - type: array + description: | + An array of series objects--the results of the query. A series of rows shares the same group key returned from the execution of a statement. + + If a property is not present, it is assumed to be `null`. items: - type: object properties: + columns: + description: An array of column names + items: + type: string + type: array name: + description: The name of the series type: string + partial: + description: | + True if the series is not complete--the response data is chunked; otherwise, false or omitted. + type: boolean tags: - type: object additionalProperties: type: string - partial: - type: boolean - columns: - type: array - items: - type: string + description: | + A map of tag key-value pairs. If a tag key is not present, it is assumed to be `null`. + type: object values: - type: array + description: | + An array of rows, where each row is an array of values. items: - type: array items: {} + type: array + type: array + type: object + type: array + statement_id: + description: | + An integer that represents the statement's position in the query. If statement results are buffered in memory, `statement_id` is used to combine statement results. + type: integer + type: object + oneOf: + - required: + - statement_id + - error + - required: + - statement_id + - series + type: array + type: object InfluxQLCSVResponse: type: string example: | diff --git a/api-docs/cloud-dedicated/v2/ref.yml b/api-docs/cloud-dedicated/v2/ref.yml index c35485c15..78a898920 100644 --- a/api-docs/cloud-dedicated/v2/ref.yml +++ b/api-docs/cloud-dedicated/v2/ref.yml @@ -517,6 +517,11 @@ paths: application/json: schema: $ref: '#/components/schemas/InfluxqlJsonResponse' + examples: + influxql-chunk_size_2: + value: | + {"results":[{"statement_id":0,"series":[{"name":"mymeas","columns":["time","myfield","mytag"],"values":[["2016-05-19T18:37:55Z",90,"1"],["2016-05-19T18:37:56Z",90,"1"]],"partial":true}],"partial":true}]} + {"results":[{"statement_id":0,"series":[{"name":"mymeas","columns":["time","myfield","mytag"],"values":[["2016-05-19T18:37:57Z",90,"1"],["2016-05-19T18:37:58Z",90,"1"]]}]}]} application/x-msgpack: schema: format: binary @@ -1220,29 +1225,55 @@ components: name,tags,time,test_field,test_tag test_measurement,,1603740794286107366,1,tag_value test_measurement,,1603740870053205649,2,tag_value test_measurement,,1603741221085428881,3,tag_value type: string InfluxqlJsonResponse: - description: JSON Response to InfluxQL Query + description: | + The JSON response for an InfluxQL query. + + A response contains the collection of results for a query. + `results` is an array of resultset objects. + + If the response is chunked, the `transfer-encoding` response header is set to `chunked` and each resultset object is sent in a separate JSON object. properties: results: + description: | + A resultset object that contains the `statement_id` and the `series` array. + + Except for `statement_id`, all properties are optional and omitted if empty. If a property is not present, it is assumed to be `null`. items: properties: error: type: string + partial: + description: | + True if the resultset is not complete--the response data is chunked; otherwise, false or omitted. + type: boolean series: + description: | + An array of series objects--the results of the query. A series of rows shares the same group key returned from the execution of a statement. + + If a property is not present, it is assumed to be `null`. items: properties: columns: + description: An array of column names items: type: string type: array name: + description: The name of the series type: string partial: + description: | + True if the series is not complete--the response data is chunked; otherwise, false or omitted. type: boolean tags: additionalProperties: type: string + description: | + A map of tag key-value pairs. If a tag key is not present, it is assumed to be `null`. type: object values: + description: | + An array of rows, where each row is an array of values. items: items: {} type: array @@ -1250,8 +1281,17 @@ components: type: object type: array statement_id: + description: | + An integer that represents the statement's position in the query. If statement results are buffered in memory, `statement_id` is used to combine statement results. type: integer type: object + oneOf: + - required: + - statement_id + - error + - required: + - statement_id + - series type: array type: object IntegerLiteral: diff --git a/api-docs/cloud-serverless/v1-compatibility/swaggerV1Compat.yml b/api-docs/cloud-serverless/v1-compatibility/swaggerV1Compat.yml index 152d47bdc..44880f9f3 100644 --- a/api-docs/cloud-serverless/v1-compatibility/swaggerV1Compat.yml +++ b/api-docs/cloud-serverless/v1-compatibility/swaggerV1Compat.yml @@ -135,7 +135,7 @@ paths: operationId: PostQueryV1 tags: - Query - summary: Query InfluxDB in a V1 compatible format + summary: Query using the InfluxDB v1 HTTP API requestBody: description: InfluxQL query to execute. content: @@ -217,6 +217,11 @@ paths: application/json: schema: $ref: '#/components/schemas/InfluxQLResponse' + examples: + influxql-chunk_size_2: + value: | + {"results":[{"statement_id":0,"series":[{"name":"mymeas","columns":["time","myfield","mytag"],"values":[["2016-05-19T18:37:55Z",90,"1"],["2016-05-19T18:37:56Z",90,"1"]],"partial":true}],"partial":true}]} + {"results":[{"statement_id":0,"series":[{"name":"mymeas","columns":["time","myfield","mytag"],"values":[["2016-05-19T18:37:57Z",90,"1"],["2016-05-19T18:37:58Z",90,"1"]]}]}]} application/x-msgpack: schema: type: string @@ -265,45 +270,75 @@ components: description: User token. schemas: InfluxQLResponse: + description: | + The JSON response for an InfluxQL query. + + A response contains the collection of results for a query. + `results` is an array of resultset objects. + + If the response is chunked, the `transfer-encoding` response header is set to `chunked` and each resultset object is sent in a separate JSON object. properties: results: - type: array - oneOf: - - required: - - statement_id - - error - - required: - - statement_id - - series + description: | + A resultset object that contains the `statement_id` and the `series` array. + + Except for `statement_id`, all properties are optional and omitted if empty. If a property is not present, it is assumed to be `null`. items: - type: object properties: - statement_id: - type: integer error: type: string + partial: + description: | + True if the resultset is not complete--the response data is chunked; otherwise, false or omitted. + type: boolean series: - type: array + description: | + An array of series objects--the results of the query. A series of rows shares the same group key returned from the execution of a statement. + + If a property is not present, it is assumed to be `null`. items: - type: object properties: + columns: + description: An array of column names + items: + type: string + type: array name: + description: The name of the series type: string + partial: + description: | + True if the series is not complete--the response data is chunked; otherwise, false or omitted. + type: boolean tags: - type: object additionalProperties: type: string - partial: - type: boolean - columns: - type: array - items: - type: string + description: | + A map of tag key-value pairs. If a tag key is not present, it is assumed to be `null`. + type: object values: - type: array + description: | + An array of rows, where each row is an array of values. items: - type: array items: {} + type: array + type: array + type: object + type: array + statement_id: + description: | + An integer that represents the statement's position in the query. If statement results are buffered in memory, `statement_id` is used to combine statement results. + type: integer + type: object + oneOf: + - required: + - statement_id + - error + - required: + - statement_id + - series + type: array + type: object InfluxQLCSVResponse: type: string example: | diff --git a/api-docs/cloud-serverless/v2/ref.yml b/api-docs/cloud-serverless/v2/ref.yml index 2f9a17190..17148b502 100644 --- a/api-docs/cloud-serverless/v2/ref.yml +++ b/api-docs/cloud-serverless/v2/ref.yml @@ -7852,6 +7852,11 @@ paths: application/json: schema: $ref: '#/components/schemas/InfluxqlJsonResponse' + examples: + influxql-chunk_size_2: + value: | + {"results":[{"statement_id":0,"series":[{"name":"mymeas","columns":["time","myfield","mytag"],"values":[["2016-05-19T18:37:55Z",90,"1"],["2016-05-19T18:37:56Z",90,"1"]],"partial":true}],"partial":true}]} + {"results":[{"statement_id":0,"series":[{"name":"mymeas","columns":["time","myfield","mytag"],"values":[["2016-05-19T18:37:57Z",90,"1"],["2016-05-19T18:37:58Z",90,"1"]]}]}]} application/x-msgpack: schema: format: binary @@ -10269,29 +10274,55 @@ components: name,tags,time,test_field,test_tag test_measurement,,1603740794286107366,1,tag_value test_measurement,,1603740870053205649,2,tag_value test_measurement,,1603741221085428881,3,tag_value type: string InfluxqlJsonResponse: - description: JSON Response to InfluxQL Query + description: | + The JSON response for an InfluxQL query. + + A response contains the collection of results for a query. + `results` is an array of resultset objects. + + If the response is chunked, the `transfer-encoding` response header is set to `chunked` and each resultset object is sent in a separate JSON object. properties: results: + description: | + A resultset object that contains the `statement_id` and the `series` array. + + Except for `statement_id`, all properties are optional and omitted if empty. If a property is not present, it is assumed to be `null`. items: properties: error: type: string + partial: + description: | + True if the resultset is not complete--the response data is chunked; otherwise, false or omitted. + type: boolean series: + description: | + An array of series objects--the results of the query. A series of rows shares the same group key returned from the execution of a statement. + + If a property is not present, it is assumed to be `null`. items: properties: columns: + description: An array of column names items: type: string type: array name: + description: The name of the series type: string partial: + description: | + True if the series is not complete--the response data is chunked; otherwise, false or omitted. type: boolean tags: additionalProperties: type: string + description: | + A map of tag key-value pairs. If a tag key is not present, it is assumed to be `null`. type: object values: + description: | + An array of rows, where each row is an array of values. items: items: {} type: array @@ -10299,8 +10330,17 @@ components: type: object type: array statement_id: + description: | + An integer that represents the statement's position in the query. If statement results are buffered in memory, `statement_id` is used to combine statement results. type: integer type: object + oneOf: + - required: + - statement_id + - error + - required: + - statement_id + - series type: array type: object IntegerLiteral: diff --git a/api-docs/cloud/v1-compatibility/swaggerV1Compat.yml b/api-docs/cloud/v1-compatibility/swaggerV1Compat.yml index 4f61b3946..56853fefa 100644 --- a/api-docs/cloud/v1-compatibility/swaggerV1Compat.yml +++ b/api-docs/cloud/v1-compatibility/swaggerV1Compat.yml @@ -131,7 +131,7 @@ paths: operationId: PostQueryV1 tags: - Query - summary: Query InfluxDB in a V1 compatible format + summary: Query using the InfluxDB v1 HTTP API requestBody: description: InfluxQL query to execute. content: @@ -213,6 +213,11 @@ paths: application/json: schema: $ref: '#/components/schemas/InfluxQLResponse' + examples: + influxql-chunk_size_2: + value: | + {"results":[{"statement_id":0,"series":[{"name":"mymeas","columns":["time","myfield","mytag"],"values":[["2016-05-19T18:37:55Z",90,"1"],["2016-05-19T18:37:56Z",90,"1"]],"partial":true}],"partial":true}]} + {"results":[{"statement_id":0,"series":[{"name":"mymeas","columns":["time","myfield","mytag"],"values":[["2016-05-19T18:37:57Z",90,"1"],["2016-05-19T18:37:58Z",90,"1"]]}]}]} application/x-msgpack: schema: type: string @@ -261,45 +266,75 @@ components: description: User token. schemas: InfluxQLResponse: + description: | + The JSON response for an InfluxQL query. + + A response contains the collection of results for a query. + `results` is an array of resultset objects. + + If the response is chunked, the `transfer-encoding` response header is set to `chunked` and each resultset object is sent in a separate JSON object. properties: results: - type: array - oneOf: - - required: - - statement_id - - error - - required: - - statement_id - - series + description: | + A resultset object that contains the `statement_id` and the `series` array. + + Except for `statement_id`, all properties are optional and omitted if empty. If a property is not present, it is assumed to be `null`. items: - type: object properties: - statement_id: - type: integer error: type: string + partial: + description: | + True if the resultset is not complete--the response data is chunked; otherwise, false or omitted. + type: boolean series: - type: array + description: | + An array of series objects--the results of the query. A series of rows shares the same group key returned from the execution of a statement. + + If a property is not present, it is assumed to be `null`. items: - type: object properties: + columns: + description: An array of column names + items: + type: string + type: array name: + description: The name of the series type: string + partial: + description: | + True if the series is not complete--the response data is chunked; otherwise, false or omitted. + type: boolean tags: - type: object additionalProperties: type: string - partial: - type: boolean - columns: - type: array - items: - type: string + description: | + A map of tag key-value pairs. If a tag key is not present, it is assumed to be `null`. + type: object values: - type: array + description: | + An array of rows, where each row is an array of values. items: - type: array items: {} + type: array + type: array + type: object + type: array + statement_id: + description: | + An integer that represents the statement's position in the query. If statement results are buffered in memory, `statement_id` is used to combine statement results. + type: integer + type: object + oneOf: + - required: + - statement_id + - error + - required: + - statement_id + - series + type: array + type: object InfluxQLCSVResponse: type: string example: | diff --git a/api-docs/cloud/v2/ref.yml b/api-docs/cloud/v2/ref.yml index 2cee4fcb2..df84bf180 100644 --- a/api-docs/cloud/v2/ref.yml +++ b/api-docs/cloud/v2/ref.yml @@ -12231,6 +12231,11 @@ paths: application/json: schema: $ref: '#/components/schemas/InfluxqlJsonResponse' + examples: + influxql-chunk_size_2: + value: | + {"results":[{"statement_id":0,"series":[{"name":"mymeas","columns":["time","myfield","mytag"],"values":[["2016-05-19T18:37:55Z",90,"1"],["2016-05-19T18:37:56Z",90,"1"]],"partial":true}],"partial":true}]} + {"results":[{"statement_id":0,"series":[{"name":"mymeas","columns":["time","myfield","mytag"],"values":[["2016-05-19T18:37:57Z",90,"1"],["2016-05-19T18:37:58Z",90,"1"]]}]}]} application/x-msgpack: schema: format: binary @@ -14585,29 +14590,55 @@ components: name,tags,time,test_field,test_tag test_measurement,,1603740794286107366,1,tag_value test_measurement,,1603740870053205649,2,tag_value test_measurement,,1603741221085428881,3,tag_value type: string InfluxqlJsonResponse: - description: JSON Response to InfluxQL Query + description: | + The JSON response for an InfluxQL query. + + A response contains the collection of results for a query. + `results` is an array of resultset objects. + + If the response is chunked, the `transfer-encoding` response header is set to `chunked` and each resultset object is sent in a separate JSON object. properties: results: + description: | + A resultset object that contains the `statement_id` and the `series` array. + + Except for `statement_id`, all properties are optional and omitted if empty. If a property is not present, it is assumed to be `null`. items: properties: error: type: string + partial: + description: | + True if the resultset is not complete--the response data is chunked; otherwise, false or omitted. + type: boolean series: + description: | + An array of series objects--the results of the query. A series of rows shares the same group key returned from the execution of a statement. + + If a property is not present, it is assumed to be `null`. items: properties: columns: + description: An array of column names items: type: string type: array name: + description: The name of the series type: string partial: + description: | + True if the series is not complete--the response data is chunked; otherwise, false or omitted. type: boolean tags: additionalProperties: type: string + description: | + A map of tag key-value pairs. If a tag key is not present, it is assumed to be `null`. type: object values: + description: | + An array of rows, where each row is an array of values. items: items: {} type: array @@ -14615,8 +14646,17 @@ components: type: object type: array statement_id: + description: | + An integer that represents the statement's position in the query. If statement results are buffered in memory, `statement_id` is used to combine statement results. type: integer type: object + oneOf: + - required: + - statement_id + - error + - required: + - statement_id + - series type: array type: object IntegerLiteral: diff --git a/api-docs/clustered/v1-compatibility/swaggerV1Compat.yml b/api-docs/clustered/v1-compatibility/swaggerV1Compat.yml index 2fa21d8dc..8f3a1373a 100644 --- a/api-docs/clustered/v1-compatibility/swaggerV1Compat.yml +++ b/api-docs/clustered/v1-compatibility/swaggerV1Compat.yml @@ -135,7 +135,7 @@ paths: operationId: PostQueryV1 tags: - Query - summary: Query InfluxDB in a V1 compatible format + summary: Query using the InfluxDB v1 HTTP API requestBody: description: InfluxQL query to execute. content: @@ -217,6 +217,11 @@ paths: application/json: schema: $ref: '#/components/schemas/InfluxQLResponse' + examples: + influxql-chunk_size_2: + value: | + {"results":[{"statement_id":0,"series":[{"name":"mymeas","columns":["time","myfield","mytag"],"values":[["2016-05-19T18:37:55Z",90,"1"],["2016-05-19T18:37:56Z",90,"1"]],"partial":true}],"partial":true}]} + {"results":[{"statement_id":0,"series":[{"name":"mymeas","columns":["time","myfield","mytag"],"values":[["2016-05-19T18:37:57Z",90,"1"],["2016-05-19T18:37:58Z",90,"1"]]}]}]} application/x-msgpack: schema: type: string @@ -265,45 +270,75 @@ components: description: User token. schemas: InfluxQLResponse: + description: | + The JSON response for an InfluxQL query. + + A response contains the collection of results for a query. + `results` is an array of resultset objects. + + If the response is chunked, the `transfer-encoding` response header is set to `chunked` and each resultset object is sent in a separate JSON object. properties: results: - type: array - oneOf: - - required: - - statement_id - - error - - required: - - statement_id - - series + description: | + A resultset object that contains the `statement_id` and the `series` array. + + Except for `statement_id`, all properties are optional and omitted if empty. If a property is not present, it is assumed to be `null`. items: - type: object properties: - statement_id: - type: integer error: type: string + partial: + description: | + True if the resultset is not complete--the response data is chunked; otherwise, false or omitted. + type: boolean series: - type: array + description: | + An array of series objects--the results of the query. A series of rows shares the same group key returned from the execution of a statement. + + If a property is not present, it is assumed to be `null`. items: - type: object properties: + columns: + description: An array of column names + items: + type: string + type: array name: + description: The name of the series type: string + partial: + description: | + True if the series is not complete--the response data is chunked; otherwise, false or omitted. + type: boolean tags: - type: object additionalProperties: type: string - partial: - type: boolean - columns: - type: array - items: - type: string + description: | + A map of tag key-value pairs. If a tag key is not present, it is assumed to be `null`. + type: object values: - type: array + description: | + An array of rows, where each row is an array of values. items: - type: array items: {} + type: array + type: array + type: object + type: array + statement_id: + description: | + An integer that represents the statement's position in the query. If statement results are buffered in memory, `statement_id` is used to combine statement results. + type: integer + type: object + oneOf: + - required: + - statement_id + - error + - required: + - statement_id + - series + type: array + type: object InfluxQLCSVResponse: type: string example: | diff --git a/api-docs/clustered/v2/ref.yml b/api-docs/clustered/v2/ref.yml index 4bf98d99b..f8e505b43 100644 --- a/api-docs/clustered/v2/ref.yml +++ b/api-docs/clustered/v2/ref.yml @@ -540,6 +540,11 @@ paths: application/json: schema: $ref: '#/components/schemas/InfluxqlJsonResponse' + examples: + influxql-chunk_size_2: + value: | + {"results":[{"statement_id":0,"series":[{"name":"mymeas","columns":["time","myfield","mytag"],"values":[["2016-05-19T18:37:55Z",90,"1"],["2016-05-19T18:37:56Z",90,"1"]],"partial":true}],"partial":true}]} + {"results":[{"statement_id":0,"series":[{"name":"mymeas","columns":["time","myfield","mytag"],"values":[["2016-05-19T18:37:57Z",90,"1"],["2016-05-19T18:37:58Z",90,"1"]]}]}]} application/x-msgpack: schema: format: binary @@ -1204,29 +1209,55 @@ components: name,tags,time,test_field,test_tag test_measurement,,1603740794286107366,1,tag_value test_measurement,,1603740870053205649,2,tag_value test_measurement,,1603741221085428881,3,tag_value type: string InfluxqlJsonResponse: - description: JSON Response to InfluxQL Query + description: | + The JSON response for an InfluxQL query. + + A response contains the collection of results for a query. + `results` is an array of resultset objects. + + If the response is chunked, the `transfer-encoding` response header is set to `chunked` and each resultset object is sent in a separate JSON object. properties: results: + description: | + A resultset object that contains the `statement_id` and the `series` array. + + Except for `statement_id`, all properties are optional and omitted if empty. If a property is not present, it is assumed to be `null`. items: properties: error: type: string + partial: + description: | + True if the resultset is not complete--the response data is chunked; otherwise, false or omitted. + type: boolean series: + description: | + An array of series objects--the results of the query. A series of rows shares the same group key returned from the execution of a statement. + + If a property is not present, it is assumed to be `null`. items: properties: columns: + description: An array of column names items: type: string type: array name: + description: The name of the series type: string partial: + description: | + True if the series is not complete--the response data is chunked; otherwise, false or omitted. type: boolean tags: additionalProperties: type: string + description: | + A map of tag key-value pairs. If a tag key is not present, it is assumed to be `null`. type: object values: + description: | + An array of rows, where each row is an array of values. items: items: {} type: array @@ -1234,8 +1265,17 @@ components: type: object type: array statement_id: + description: | + An integer that represents the statement's position in the query. If statement results are buffered in memory, `statement_id` is used to combine statement results. type: integer type: object + oneOf: + - required: + - statement_id + - error + - required: + - statement_id + - series type: array type: object IntegerLiteral: diff --git a/api-docs/v2/ref.yml b/api-docs/v2/ref.yml index 687c6ed68..28fbe371e 100644 --- a/api-docs/v2/ref.yml +++ b/api-docs/v2/ref.yml @@ -13126,6 +13126,11 @@ paths: application/json: schema: $ref: '#/components/schemas/InfluxqlJsonResponse' + examples: + influxql-chunk_size_2: + value: | + {"results":[{"statement_id":0,"series":[{"name":"mymeas","columns":["time","myfield","mytag"],"values":[["2016-05-19T18:37:55Z",90,"1"],["2016-05-19T18:37:56Z",90,"1"]],"partial":true}],"partial":true}]} + {"results":[{"statement_id":0,"series":[{"name":"mymeas","columns":["time","myfield","mytag"],"values":[["2016-05-19T18:37:57Z",90,"1"],["2016-05-19T18:37:58Z",90,"1"]]}]}]} application/x-msgpack: schema: format: binary @@ -15500,29 +15505,55 @@ components: name,tags,time,test_field,test_tag test_measurement,,1603740794286107366,1,tag_value test_measurement,,1603740870053205649,2,tag_value test_measurement,,1603741221085428881,3,tag_value type: string InfluxqlJsonResponse: - description: JSON Response to InfluxQL Query + description: | + The JSON response for an InfluxQL query. + + A response contains the collection of results for a query. + `results` is an array of resultset objects. + + If the response is chunked, the `transfer-encoding` response header is set to `chunked` and each resultset object is sent in a separate JSON object. properties: results: + description: | + A resultset object that contains the `statement_id` and the `series` array. + + Except for `statement_id`, all properties are optional and omitted if empty. If a property is not present, it is assumed to be `null`. items: properties: error: type: string + partial: + description: | + True if the resultset is not complete--the response data is chunked; otherwise, false or omitted. + type: boolean series: + description: | + An array of series objects--the results of the query. A series of rows shares the same group key returned from the execution of a statement. + + If a property is not present, it is assumed to be `null`. items: properties: columns: + description: An array of column names items: type: string type: array name: + description: The name of the series type: string partial: + description: | + True if the series is not complete--the response data is chunked; otherwise, false or omitted. type: boolean tags: additionalProperties: type: string + description: | + A map of tag key-value pairs. If a tag key is not present, it is assumed to be `null`. type: object values: + description: | + An array of rows, where each row is an array of values. items: items: {} type: array @@ -15530,8 +15561,17 @@ components: type: object type: array statement_id: + description: | + An integer that represents the statement's position in the query. If statement results are buffered in memory, `statement_id` is used to combine statement results. type: integer type: object + oneOf: + - required: + - statement_id + - error + - required: + - statement_id + - series type: array type: object IntegerLiteral: diff --git a/api-docs/v2/v1-compatibility/swaggerV1Compat.yml b/api-docs/v2/v1-compatibility/swaggerV1Compat.yml index 19b9b5c49..b008e0315 100644 --- a/api-docs/v2/v1-compatibility/swaggerV1Compat.yml +++ b/api-docs/v2/v1-compatibility/swaggerV1Compat.yml @@ -131,7 +131,7 @@ paths: operationId: PostQueryV1 tags: - Query - summary: Query InfluxDB in a V1 compatible format + summary: Query using the InfluxDB v1 HTTP API requestBody: description: InfluxQL query to execute. content: @@ -213,6 +213,11 @@ paths: application/json: schema: $ref: '#/components/schemas/InfluxQLResponse' + examples: + influxql-chunk_size_2: + value: | + {"results":[{"statement_id":0,"series":[{"name":"mymeas","columns":["time","myfield","mytag"],"values":[["2016-05-19T18:37:55Z",90,"1"],["2016-05-19T18:37:56Z",90,"1"]],"partial":true}],"partial":true}]} + {"results":[{"statement_id":0,"series":[{"name":"mymeas","columns":["time","myfield","mytag"],"values":[["2016-05-19T18:37:57Z",90,"1"],["2016-05-19T18:37:58Z",90,"1"]]}]}]} application/x-msgpack: schema: type: string @@ -261,45 +266,75 @@ components: description: User token. schemas: InfluxQLResponse: + description: | + The JSON response for an InfluxQL query. + + A response contains the collection of results for a query. + `results` is an array of resultset objects. + + If the response is chunked, the `transfer-encoding` response header is set to `chunked` and each resultset object is sent in a separate JSON object. properties: results: - type: array - oneOf: - - required: - - statement_id - - error - - required: - - statement_id - - series + description: | + A resultset object that contains the `statement_id` and the `series` array. + + Except for `statement_id`, all properties are optional and omitted if empty. If a property is not present, it is assumed to be `null`. items: - type: object properties: - statement_id: - type: integer error: type: string + partial: + description: | + True if the resultset is not complete--the response data is chunked; otherwise, false or omitted. + type: boolean series: - type: array + description: | + An array of series objects--the results of the query. A series of rows shares the same group key returned from the execution of a statement. + + If a property is not present, it is assumed to be `null`. items: - type: object properties: + columns: + description: An array of column names + items: + type: string + type: array name: + description: The name of the series type: string + partial: + description: | + True if the series is not complete--the response data is chunked; otherwise, false or omitted. + type: boolean tags: - type: object additionalProperties: type: string - partial: - type: boolean - columns: - type: array - items: - type: string + description: | + A map of tag key-value pairs. If a tag key is not present, it is assumed to be `null`. + type: object values: - type: array + description: | + An array of rows, where each row is an array of values. items: - type: array items: {} + type: array + type: array + type: object + type: array + statement_id: + description: | + An integer that represents the statement's position in the query. If statement results are buffered in memory, `statement_id` is used to combine statement results. + type: integer + type: object + oneOf: + - required: + - statement_id + - error + - required: + - statement_id + - series + type: array + type: object InfluxQLCSVResponse: type: string example: |