Merge branch 'master' into ga-new-download-links
commit
2f78809d86
|
@ -2,7 +2,7 @@ version: 2
|
|||
jobs:
|
||||
build:
|
||||
docker:
|
||||
- image: cimg/node:20.11.1
|
||||
- image: cimg/node:20.12.1
|
||||
environment:
|
||||
S3DEPLOY_VERSION: "2.11.0"
|
||||
# From https://github.com/bep/s3deploy/releases
|
||||
|
@ -49,7 +49,7 @@ jobs:
|
|||
|
||||
deploy:
|
||||
docker:
|
||||
- image: cimg/go:1.22.1
|
||||
- image: cimg/go:1.22.2
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
|
|
|
@ -6,7 +6,7 @@ node_modules
|
|||
*.log
|
||||
/resources
|
||||
.hugo_build.lock
|
||||
/content/influxdb/*/api/*.html
|
||||
/content/influxdb/*/api/**/*.html
|
||||
/api-docs/redoc-static.html*
|
||||
.vscode/*
|
||||
.idea
|
||||
|
|
|
@ -1195,7 +1195,7 @@ the content of the banner.
|
|||
<!-- Default banner -->
|
||||
{{< influxdbu >}}
|
||||
|
||||
<!-- Predfined course banner -->
|
||||
<!-- Predefined course banner -->
|
||||
{{< influxdbu "influxdb-101" >}}
|
||||
|
||||
<!-- Custom banner -->
|
||||
|
|
13
README.md
13
README.md
|
@ -52,3 +52,16 @@ including our GPG key, can be found at https://www.influxdata.com/how-to-report-
|
|||
npx hugo server
|
||||
```
|
||||
5. View the docs at [localhost:1313](http://localhost:1313).
|
||||
|
||||
### Alternative: Use docker compose
|
||||
|
||||
1. Clone this repository to your local machine. See how to [clone a repository](https://help.github.com/articles/cloning-a-repository/).
|
||||
|
||||
2. Follow the instructions to [install Docker Desktop](https://docs.docker.com/desktop/) and [Docker Compose](https://docs.docker.com/compose/) to your local machine.
|
||||
|
||||
3. Use Docker Compose to start the Hugo server in development mode--for example, enter the following command in your terminal:
|
||||
|
||||
```sh
|
||||
docker compose up local-dev
|
||||
```
|
||||
4. View the docs at [localhost:1313](http://localhost:1313).
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
plugins:
|
||||
- '../openapi/plugins/docs-plugin.js'
|
||||
extends:
|
||||
- recommended
|
||||
- docs/all
|
||||
x-influxdata-product-name: InfluxDB v3 Cloud Dedicated
|
||||
|
||||
apis:
|
||||
management@0:
|
||||
root: management/openapi.yml
|
||||
v2@2:
|
||||
root: v2/ref.yml
|
||||
x-influxdata-default: true
|
||||
v1-compatibility@2:
|
||||
root: v1-compatibility/swaggerV1Compat.yml
|
|
@ -1,7 +0,0 @@
|
|||
title: InfluxDB Cloud Dedicated API Service
|
||||
description: |
|
||||
The InfluxDB HTTP API provides a programmatic interface for interacting with InfluxDB.
|
||||
version: InfluxDB v3.0
|
||||
license:
|
||||
name: MIT
|
||||
url: 'https://opensource.org/licenses/MIT'
|
|
@ -0,0 +1,11 @@
|
|||
title: InfluxDB Cloud Dedicated Management API
|
||||
summary: |
|
||||
The Management API for InfluxDB Cloud Dedicated provides a programmatic interface for managing an InfluxDB Cloud Dedicated instance.
|
||||
description: |
|
||||
The InfluxDB v3 Management API lets you manage an InfluxDB Cloud Dedicated instance and integrate functions such as creating and managing databases, permissions, and tokens into your workflow or application.
|
||||
|
||||
This documentation is generated from the
|
||||
InfluxDB OpenAPI specification.
|
||||
license:
|
||||
name: MIT
|
||||
url: 'https://opensource.org/licenses/MIT'
|
|
@ -0,0 +1,8 @@
|
|||
- url: 'https://{baseurl}/api/v0'
|
||||
description: InfluxDB Cloud Dedicated Management API URL
|
||||
variables:
|
||||
baseurl:
|
||||
enum:
|
||||
- 'console.influxdata.com'
|
||||
default: 'console.influxdata.com'
|
||||
description: InfluxDB Cloud Dedicated Console URL
|
|
@ -0,0 +1,6 @@
|
|||
- name: Using the Management API
|
||||
tags:
|
||||
- Authentication
|
||||
- Examples
|
||||
- name: All endpoints
|
||||
tags: []
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,14 @@
|
|||
title: InfluxDB v1 HTTP API for InfluxDB Cloud Dedicated
|
||||
summary: The InfluxDB v1 HTTP API provides v1 compatibility for writing and querying data in an InfluxDB v3 Cloud Dedicated database.
|
||||
description: |
|
||||
The InfluxDB 1.x `/write` and `/query` endpoints work with InfluxDB 1.x client libraries and third-party integrations like Grafana and others.
|
||||
|
||||
This documentation is generated from the
|
||||
[InfluxDB OpenAPI specification](https://raw.githubusercontent.com/influxdata/openapi/master/contracts/swaggerV1Compat.yml).
|
||||
|
||||
#### Related
|
||||
|
||||
[InfluxDB `/api/v2` API for InfluxDB Cloud Dedicated](/influxdb/cloud-dedicated/api/v2/)
|
||||
license:
|
||||
name: MIT
|
||||
url: 'https://opensource.org/licenses/MIT'
|
|
@ -0,0 +1,434 @@
|
|||
openapi: 3.0.0
|
||||
info:
|
||||
title: InfluxDB v1 HTTP API for InfluxDB Cloud Dedicated
|
||||
version: ''
|
||||
description: |
|
||||
The InfluxDB 1.x `/write` and `/query` endpoints work with InfluxDB 1.x client libraries and third-party integrations like Grafana and others.
|
||||
|
||||
This documentation is generated from the
|
||||
[InfluxDB OpenAPI specification](https://raw.githubusercontent.com/influxdata/openapi/master/contracts/swaggerV1Compat.yml).
|
||||
|
||||
#### Related
|
||||
|
||||
[InfluxDB `/api/v2` API for InfluxDB Cloud Dedicated](/influxdb/cloud-dedicated/api/v2/)
|
||||
license:
|
||||
name: MIT
|
||||
url: https://opensource.org/licenses/MIT
|
||||
summary: The InfluxDB v1 HTTP API provides v1 compatibility for writing and querying data in an InfluxDB v3 Cloud Dedicated database.
|
||||
servers:
|
||||
- url: /
|
||||
security:
|
||||
- TokenAuthentication: []
|
||||
- BasicAuthentication: []
|
||||
- QuerystringAuthentication: []
|
||||
tags:
|
||||
- name: Authentication
|
||||
description: |
|
||||
The InfluxDB 1.x API requires authentication for all requests.
|
||||
InfluxDB Cloud uses InfluxDB API tokens to authenticate requests.
|
||||
|
||||
|
||||
For more information, see the following:
|
||||
- [Token authentication](#section/Authentication/TokenAuthentication)
|
||||
- [Basic authentication](#section/Authentication/BasicAuthentication)
|
||||
- [Querystring authentication](#section/Authentication/QuerystringAuthentication)
|
||||
|
||||
<!-- ReDoc-Inject: <security-definitions> -->
|
||||
x-traitTag: true
|
||||
- name: Query
|
||||
- name: Write
|
||||
paths:
|
||||
/write:
|
||||
post:
|
||||
operationId: PostWriteV1
|
||||
tags:
|
||||
- Write
|
||||
summary: Write time series data into InfluxDB in a V1-compatible format
|
||||
requestBody:
|
||||
description: Line protocol body
|
||||
required: true
|
||||
content:
|
||||
text/plain:
|
||||
schema:
|
||||
type: string
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/TraceSpan'
|
||||
- $ref: '#/components/parameters/AuthUserV1'
|
||||
- $ref: '#/components/parameters/AuthPassV1'
|
||||
- in: query
|
||||
name: db
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
description: Bucket to write to. If none exists, InfluxDB creates a bucket with a default 3-day retention policy.
|
||||
- in: query
|
||||
name: rp
|
||||
schema:
|
||||
type: string
|
||||
description: Retention policy name.
|
||||
- in: query
|
||||
name: precision
|
||||
schema:
|
||||
type: string
|
||||
description: Write precision.
|
||||
- in: header
|
||||
name: Content-Encoding
|
||||
description: When present, its value indicates to the database that compression is applied to the line protocol body.
|
||||
schema:
|
||||
type: string
|
||||
description: Specifies that the line protocol in the body is encoded with gzip or not encoded with identity.
|
||||
default: identity
|
||||
enum:
|
||||
- gzip
|
||||
- identity
|
||||
responses:
|
||||
'204':
|
||||
description: Write data is correctly formatted and accepted for writing to the bucket.
|
||||
'400':
|
||||
description: Line protocol poorly formed and no points were written. Response can be used to determine the first malformed line in the body line-protocol. All data in body was rejected and not written.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/LineProtocolError'
|
||||
'401':
|
||||
description: Token does not have sufficient permissions to write to this organization and bucket or the organization and bucket do not exist.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
'403':
|
||||
description: No token was sent and they are required.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
'413':
|
||||
description: Write has been rejected because the payload is too large. Error message returns max size supported. All data in body was rejected and not written.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/LineProtocolLengthError'
|
||||
'429':
|
||||
description: Token is temporarily over quota. The Retry-After header describes when to try the write again.
|
||||
headers:
|
||||
Retry-After:
|
||||
description: A non-negative decimal integer indicating the seconds to delay after the response is received.
|
||||
schema:
|
||||
type: integer
|
||||
format: int32
|
||||
'503':
|
||||
description: Server is temporarily unavailable to accept writes. The Retry-After header describes when to try the write again.
|
||||
headers:
|
||||
Retry-After:
|
||||
description: A non-negative decimal integer indicating the seconds to delay after the response is received.
|
||||
schema:
|
||||
type: integer
|
||||
format: int32
|
||||
default:
|
||||
description: Internal server error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
/query:
|
||||
post:
|
||||
operationId: PostQueryV1
|
||||
tags:
|
||||
- Query
|
||||
summary: Query InfluxDB in a V1 compatible format
|
||||
requestBody:
|
||||
description: InfluxQL query to execute.
|
||||
content:
|
||||
text/plain:
|
||||
schema:
|
||||
type: string
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/TraceSpan'
|
||||
- $ref: '#/components/parameters/AuthUserV1'
|
||||
- $ref: '#/components/parameters/AuthPassV1'
|
||||
- in: header
|
||||
name: Accept
|
||||
schema:
|
||||
type: string
|
||||
description: Specifies how query results should be encoded in the response. **Note:** With `application/csv`, query results include epoch timestamps instead of RFC3339 timestamps.
|
||||
default: application/json
|
||||
enum:
|
||||
- application/json
|
||||
- application/csv
|
||||
- text/csv
|
||||
- application/x-msgpack
|
||||
- in: header
|
||||
name: Accept-Encoding
|
||||
description: The Accept-Encoding request HTTP header advertises which content encoding, usually a compression algorithm, the client is able to understand.
|
||||
schema:
|
||||
type: string
|
||||
description: Specifies that the query response in the body should be encoded with gzip or not encoded with identity.
|
||||
default: identity
|
||||
enum:
|
||||
- gzip
|
||||
- identity
|
||||
- in: header
|
||||
name: Content-Type
|
||||
schema:
|
||||
type: string
|
||||
enum:
|
||||
- application/vnd.influxql
|
||||
- in: query
|
||||
name: db
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
description: Bucket to query.
|
||||
- in: query
|
||||
name: rp
|
||||
schema:
|
||||
type: string
|
||||
description: Retention policy name.
|
||||
- in: query
|
||||
name: q
|
||||
description: Defines the influxql query to run.
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: Query results
|
||||
headers:
|
||||
Content-Encoding:
|
||||
description: The Content-Encoding entity header is used to compress the media-type. When present, its value indicates which encodings were applied to the entity-body
|
||||
schema:
|
||||
type: string
|
||||
description: Specifies that the response in the body is encoded with gzip or not encoded with identity.
|
||||
default: identity
|
||||
enum:
|
||||
- gzip
|
||||
- identity
|
||||
Trace-Id:
|
||||
description: The Trace-Id header reports the request's trace ID, if one was generated.
|
||||
schema:
|
||||
type: string
|
||||
description: Specifies the request's trace ID.
|
||||
content:
|
||||
application/csv:
|
||||
schema:
|
||||
$ref: '#/components/schemas/InfluxQLCSVResponse'
|
||||
text/csv:
|
||||
schema:
|
||||
$ref: '#/components/schemas/InfluxQLCSVResponse'
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/InfluxQLResponse'
|
||||
application/x-msgpack:
|
||||
schema:
|
||||
type: string
|
||||
format: binary
|
||||
'429':
|
||||
description: Token is temporarily over quota. The Retry-After header describes when to try the read again.
|
||||
headers:
|
||||
Retry-After:
|
||||
description: A non-negative decimal integer indicating the seconds to delay after the response is received.
|
||||
schema:
|
||||
type: integer
|
||||
format: int32
|
||||
default:
|
||||
description: Error processing query
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
components:
|
||||
parameters:
|
||||
TraceSpan:
|
||||
in: header
|
||||
name: Zap-Trace-Span
|
||||
description: OpenTracing span context
|
||||
example:
|
||||
trace_id: '1'
|
||||
span_id: '1'
|
||||
baggage:
|
||||
key: value
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
AuthUserV1:
|
||||
in: query
|
||||
name: u
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
description: Username.
|
||||
AuthPassV1:
|
||||
in: query
|
||||
name: p
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
description: User token.
|
||||
schemas:
|
||||
InfluxQLResponse:
|
||||
properties:
|
||||
results:
|
||||
type: array
|
||||
oneOf:
|
||||
- required:
|
||||
- statement_id
|
||||
- error
|
||||
- required:
|
||||
- statement_id
|
||||
- series
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
statement_id:
|
||||
type: integer
|
||||
error:
|
||||
type: string
|
||||
series:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
tags:
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: string
|
||||
partial:
|
||||
type: boolean
|
||||
columns:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
values:
|
||||
type: array
|
||||
items:
|
||||
type: array
|
||||
items: {}
|
||||
InfluxQLCSVResponse:
|
||||
type: string
|
||||
example: |
|
||||
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
|
||||
Error:
|
||||
properties:
|
||||
code:
|
||||
description: Code is the machine-readable error code.
|
||||
readOnly: true
|
||||
type: string
|
||||
enum:
|
||||
- internal error
|
||||
- not found
|
||||
- conflict
|
||||
- invalid
|
||||
- unprocessable entity
|
||||
- empty value
|
||||
- unavailable
|
||||
- forbidden
|
||||
- too many requests
|
||||
- unauthorized
|
||||
- method not allowed
|
||||
message:
|
||||
readOnly: true
|
||||
description: Message is a human-readable message.
|
||||
type: string
|
||||
required:
|
||||
- code
|
||||
- message
|
||||
LineProtocolError:
|
||||
properties:
|
||||
code:
|
||||
description: Code is the machine-readable error code.
|
||||
readOnly: true
|
||||
type: string
|
||||
enum:
|
||||
- internal error
|
||||
- not found
|
||||
- conflict
|
||||
- invalid
|
||||
- empty value
|
||||
- unavailable
|
||||
message:
|
||||
readOnly: true
|
||||
description: Message is a human-readable message.
|
||||
type: string
|
||||
op:
|
||||
readOnly: true
|
||||
description: Op describes the logical code operation during error. Useful for debugging.
|
||||
type: string
|
||||
err:
|
||||
readOnly: true
|
||||
description: Err is a stack of errors that occurred during processing of the request. Useful for debugging.
|
||||
type: string
|
||||
line:
|
||||
readOnly: true
|
||||
description: First line within sent body containing malformed data
|
||||
type: integer
|
||||
format: int32
|
||||
required:
|
||||
- code
|
||||
- message
|
||||
- op
|
||||
- err
|
||||
LineProtocolLengthError:
|
||||
properties:
|
||||
code:
|
||||
description: Code is the machine-readable error code.
|
||||
readOnly: true
|
||||
type: string
|
||||
enum:
|
||||
- invalid
|
||||
message:
|
||||
readOnly: true
|
||||
description: Message is a human-readable message.
|
||||
type: string
|
||||
maxLength:
|
||||
readOnly: true
|
||||
description: Max length in bytes for a body of line-protocol.
|
||||
type: integer
|
||||
format: int32
|
||||
required:
|
||||
- code
|
||||
- message
|
||||
- maxLength
|
||||
securitySchemes:
|
||||
TokenAuthentication:
|
||||
type: apiKey
|
||||
name: Authorization
|
||||
in: header
|
||||
description: |
|
||||
Use the [Token authentication](#section/Authentication/TokenAuthentication)
|
||||
scheme to authenticate to the InfluxDB API.
|
||||
|
||||
|
||||
In your API requests, send an `Authorization` header.
|
||||
For the header value, provide the word `Token` followed by a space and an InfluxDB API token.
|
||||
The word `Token` is case-sensitive.
|
||||
|
||||
|
||||
### Syntax
|
||||
|
||||
`Authorization: Token YOUR_INFLUX_TOKEN`
|
||||
|
||||
|
||||
For examples and more information, see the following:
|
||||
- [`/authorizations`](#tag/Authorizations) endpoint.
|
||||
- [Authorize API requests](/influxdb/cloud/api-guide/api_intro/#authentication).
|
||||
- [Manage API tokens](/influxdb/cloud/security/tokens/).
|
||||
BasicAuthentication:
|
||||
type: http
|
||||
scheme: basic
|
||||
description: |
|
||||
Use the HTTP [Basic authentication](#section/Authentication/BasicAuthentication)
|
||||
scheme with clients that support the InfluxDB 1.x convention of username and password (that don't support the `Authorization: Token` scheme):
|
||||
|
||||
|
||||
For examples and more information, see how to [authenticate with a username and password](/influxdb/cloud/reference/api/influxdb-1x/).
|
||||
QuerystringAuthentication:
|
||||
type: apiKey
|
||||
in: query
|
||||
name: u=&p=
|
||||
description: |
|
||||
Use the [Querystring authentication](#section/Authentication/QuerystringAuthentication)
|
||||
scheme with InfluxDB 1.x API parameters to provide credentials through the query string.
|
||||
|
||||
|
||||
For examples and more information, see how to [authenticate with a username and password](/influxdb/cloud/reference/api/influxdb-1x/).
|
|
@ -0,0 +1,11 @@
|
|||
title: InfluxDB v2 HTTP API for InfluxDB Cloud Dedicated
|
||||
summary: The InfluxDB v2 HTTP API for InfluxDB Cloud Dedicated provides a v2-compatible programmatic interface for writing data stored in an InfluxDB Cloud Dedicated database.
|
||||
|
||||
description: |
|
||||
The InfluxDB v2 HTTP API lets you use `/api/v2` endpoints for managing retention policy mappings and writing data stored in an InfluxDB v3 instance.
|
||||
|
||||
This documentation is generated from the
|
||||
[InfluxDB OpenAPI specification](https://raw.githubusercontent.com/influxdata/openapi/master/contracts/ref/cloud.yml).
|
||||
license:
|
||||
name: MIT
|
||||
url: 'https://opensource.org/licenses/MIT'
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,13 @@
|
|||
plugins:
|
||||
- '../openapi/plugins/docs-plugin.js'
|
||||
extends:
|
||||
- recommended
|
||||
- docs/all
|
||||
x-influxdata-product-name: InfluxDB v3 Serverless
|
||||
|
||||
apis:
|
||||
v2@2:
|
||||
root: v2/ref.yml
|
||||
x-influxdata-default: true
|
||||
v1-compatibility@2:
|
||||
root: v1-compatibility/swaggerV1Compat.yml
|
|
@ -1,7 +0,0 @@
|
|||
title: InfluxDB Cloud Serverless API Service
|
||||
description: |
|
||||
The InfluxDB HTTP API provides a programmatic interface for interacting with InfluxDB.
|
||||
version: InfluxDB v3.0
|
||||
license:
|
||||
name: MIT
|
||||
url: 'https://opensource.org/licenses/MIT'
|
|
@ -0,0 +1,14 @@
|
|||
title: InfluxDB v1 HTTP API for InfluxDB Cloud Serverless
|
||||
summary: The InfluxDB v1 HTTP API provides v1 compatibility for writing and querying data in an InfluxDB v3 Cloud Serverless bucket.
|
||||
description: |
|
||||
The InfluxDB 1.x `/write` and `/query` endpoints work with InfluxDB 1.x client libraries and third-party integrations like Grafana and others.
|
||||
|
||||
This documentation is generated from the
|
||||
[InfluxDB OpenAPI specification](https://raw.githubusercontent.com/influxdata/openapi/master/contracts/swaggerV1Compat.yml).
|
||||
|
||||
#### Related
|
||||
|
||||
[InfluxDB `/api/v2` API for InfluxDB Cloud Serverless](/influxdb/cloud-serverless/api/v2/)
|
||||
license:
|
||||
name: MIT
|
||||
url: 'https://opensource.org/licenses/MIT'
|
|
@ -0,0 +1,434 @@
|
|||
openapi: 3.0.0
|
||||
info:
|
||||
title: InfluxDB v1 HTTP API for InfluxDB Cloud Serverless
|
||||
version: ''
|
||||
description: |
|
||||
The InfluxDB 1.x `/write` and `/query` endpoints work with InfluxDB 1.x client libraries and third-party integrations like Grafana and others.
|
||||
|
||||
This documentation is generated from the
|
||||
[InfluxDB OpenAPI specification](https://raw.githubusercontent.com/influxdata/openapi/master/contracts/swaggerV1Compat.yml).
|
||||
|
||||
#### Related
|
||||
|
||||
[InfluxDB `/api/v2` API for InfluxDB Cloud Serverless](/influxdb/cloud-serverless/api/v2/)
|
||||
license:
|
||||
name: MIT
|
||||
url: https://opensource.org/licenses/MIT
|
||||
summary: The InfluxDB v1 HTTP API provides v1 compatibility for writing and querying data in an InfluxDB v3 Cloud Serverless bucket.
|
||||
servers:
|
||||
- url: /
|
||||
security:
|
||||
- TokenAuthentication: []
|
||||
- BasicAuthentication: []
|
||||
- QuerystringAuthentication: []
|
||||
tags:
|
||||
- name: Authentication
|
||||
description: |
|
||||
The InfluxDB 1.x API requires authentication for all requests.
|
||||
InfluxDB Cloud uses InfluxDB API tokens to authenticate requests.
|
||||
|
||||
|
||||
For more information, see the following:
|
||||
- [Token authentication](#section/Authentication/TokenAuthentication)
|
||||
- [Basic authentication](#section/Authentication/BasicAuthentication)
|
||||
- [Querystring authentication](#section/Authentication/QuerystringAuthentication)
|
||||
|
||||
<!-- ReDoc-Inject: <security-definitions> -->
|
||||
x-traitTag: true
|
||||
- name: Query
|
||||
- name: Write
|
||||
paths:
|
||||
/write:
|
||||
post:
|
||||
operationId: PostWriteV1
|
||||
tags:
|
||||
- Write
|
||||
summary: Write time series data into InfluxDB in a V1-compatible format
|
||||
requestBody:
|
||||
description: Line protocol body
|
||||
required: true
|
||||
content:
|
||||
text/plain:
|
||||
schema:
|
||||
type: string
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/TraceSpan'
|
||||
- $ref: '#/components/parameters/AuthUserV1'
|
||||
- $ref: '#/components/parameters/AuthPassV1'
|
||||
- in: query
|
||||
name: db
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
description: Bucket to write to. If none exists, InfluxDB creates a bucket with a default 3-day retention policy.
|
||||
- in: query
|
||||
name: rp
|
||||
schema:
|
||||
type: string
|
||||
description: Retention policy name.
|
||||
- in: query
|
||||
name: precision
|
||||
schema:
|
||||
type: string
|
||||
description: Write precision.
|
||||
- in: header
|
||||
name: Content-Encoding
|
||||
description: When present, its value indicates to the database that compression is applied to the line protocol body.
|
||||
schema:
|
||||
type: string
|
||||
description: Specifies that the line protocol in the body is encoded with gzip or not encoded with identity.
|
||||
default: identity
|
||||
enum:
|
||||
- gzip
|
||||
- identity
|
||||
responses:
|
||||
'204':
|
||||
description: Write data is correctly formatted and accepted for writing to the bucket.
|
||||
'400':
|
||||
description: Line protocol poorly formed and no points were written. Response can be used to determine the first malformed line in the body line-protocol. All data in body was rejected and not written.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/LineProtocolError'
|
||||
'401':
|
||||
description: Token does not have sufficient permissions to write to this organization and bucket or the organization and bucket do not exist.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
'403':
|
||||
description: No token was sent and they are required.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
'413':
|
||||
description: Write has been rejected because the payload is too large. Error message returns max size supported. All data in body was rejected and not written.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/LineProtocolLengthError'
|
||||
'429':
|
||||
description: Token is temporarily over quota. The Retry-After header describes when to try the write again.
|
||||
headers:
|
||||
Retry-After:
|
||||
description: A non-negative decimal integer indicating the seconds to delay after the response is received.
|
||||
schema:
|
||||
type: integer
|
||||
format: int32
|
||||
'503':
|
||||
description: Server is temporarily unavailable to accept writes. The Retry-After header describes when to try the write again.
|
||||
headers:
|
||||
Retry-After:
|
||||
description: A non-negative decimal integer indicating the seconds to delay after the response is received.
|
||||
schema:
|
||||
type: integer
|
||||
format: int32
|
||||
default:
|
||||
description: Internal server error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
/query:
|
||||
post:
|
||||
operationId: PostQueryV1
|
||||
tags:
|
||||
- Query
|
||||
summary: Query InfluxDB in a V1 compatible format
|
||||
requestBody:
|
||||
description: InfluxQL query to execute.
|
||||
content:
|
||||
text/plain:
|
||||
schema:
|
||||
type: string
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/TraceSpan'
|
||||
- $ref: '#/components/parameters/AuthUserV1'
|
||||
- $ref: '#/components/parameters/AuthPassV1'
|
||||
- in: header
|
||||
name: Accept
|
||||
schema:
|
||||
type: string
|
||||
description: Specifies how query results should be encoded in the response. **Note:** With `application/csv`, query results include epoch timestamps instead of RFC3339 timestamps.
|
||||
default: application/json
|
||||
enum:
|
||||
- application/json
|
||||
- application/csv
|
||||
- text/csv
|
||||
- application/x-msgpack
|
||||
- in: header
|
||||
name: Accept-Encoding
|
||||
description: The Accept-Encoding request HTTP header advertises which content encoding, usually a compression algorithm, the client is able to understand.
|
||||
schema:
|
||||
type: string
|
||||
description: Specifies that the query response in the body should be encoded with gzip or not encoded with identity.
|
||||
default: identity
|
||||
enum:
|
||||
- gzip
|
||||
- identity
|
||||
- in: header
|
||||
name: Content-Type
|
||||
schema:
|
||||
type: string
|
||||
enum:
|
||||
- application/vnd.influxql
|
||||
- in: query
|
||||
name: db
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
description: Bucket to query.
|
||||
- in: query
|
||||
name: rp
|
||||
schema:
|
||||
type: string
|
||||
description: Retention policy name.
|
||||
- in: query
|
||||
name: q
|
||||
description: Defines the influxql query to run.
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: Query results
|
||||
headers:
|
||||
Content-Encoding:
|
||||
description: The Content-Encoding entity header is used to compress the media-type. When present, its value indicates which encodings were applied to the entity-body
|
||||
schema:
|
||||
type: string
|
||||
description: Specifies that the response in the body is encoded with gzip or not encoded with identity.
|
||||
default: identity
|
||||
enum:
|
||||
- gzip
|
||||
- identity
|
||||
Trace-Id:
|
||||
description: The Trace-Id header reports the request's trace ID, if one was generated.
|
||||
schema:
|
||||
type: string
|
||||
description: Specifies the request's trace ID.
|
||||
content:
|
||||
application/csv:
|
||||
schema:
|
||||
$ref: '#/components/schemas/InfluxQLCSVResponse'
|
||||
text/csv:
|
||||
schema:
|
||||
$ref: '#/components/schemas/InfluxQLCSVResponse'
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/InfluxQLResponse'
|
||||
application/x-msgpack:
|
||||
schema:
|
||||
type: string
|
||||
format: binary
|
||||
'429':
|
||||
description: Token is temporarily over quota. The Retry-After header describes when to try the read again.
|
||||
headers:
|
||||
Retry-After:
|
||||
description: A non-negative decimal integer indicating the seconds to delay after the response is received.
|
||||
schema:
|
||||
type: integer
|
||||
format: int32
|
||||
default:
|
||||
description: Error processing query
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
components:
|
||||
parameters:
|
||||
TraceSpan:
|
||||
in: header
|
||||
name: Zap-Trace-Span
|
||||
description: OpenTracing span context
|
||||
example:
|
||||
trace_id: '1'
|
||||
span_id: '1'
|
||||
baggage:
|
||||
key: value
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
AuthUserV1:
|
||||
in: query
|
||||
name: u
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
description: Username.
|
||||
AuthPassV1:
|
||||
in: query
|
||||
name: p
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
description: User token.
|
||||
schemas:
|
||||
InfluxQLResponse:
|
||||
properties:
|
||||
results:
|
||||
type: array
|
||||
oneOf:
|
||||
- required:
|
||||
- statement_id
|
||||
- error
|
||||
- required:
|
||||
- statement_id
|
||||
- series
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
statement_id:
|
||||
type: integer
|
||||
error:
|
||||
type: string
|
||||
series:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
tags:
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: string
|
||||
partial:
|
||||
type: boolean
|
||||
columns:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
values:
|
||||
type: array
|
||||
items:
|
||||
type: array
|
||||
items: {}
|
||||
InfluxQLCSVResponse:
|
||||
type: string
|
||||
example: |
|
||||
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
|
||||
Error:
|
||||
properties:
|
||||
code:
|
||||
description: Code is the machine-readable error code.
|
||||
readOnly: true
|
||||
type: string
|
||||
enum:
|
||||
- internal error
|
||||
- not found
|
||||
- conflict
|
||||
- invalid
|
||||
- unprocessable entity
|
||||
- empty value
|
||||
- unavailable
|
||||
- forbidden
|
||||
- too many requests
|
||||
- unauthorized
|
||||
- method not allowed
|
||||
message:
|
||||
readOnly: true
|
||||
description: Message is a human-readable message.
|
||||
type: string
|
||||
required:
|
||||
- code
|
||||
- message
|
||||
LineProtocolError:
|
||||
properties:
|
||||
code:
|
||||
description: Code is the machine-readable error code.
|
||||
readOnly: true
|
||||
type: string
|
||||
enum:
|
||||
- internal error
|
||||
- not found
|
||||
- conflict
|
||||
- invalid
|
||||
- empty value
|
||||
- unavailable
|
||||
message:
|
||||
readOnly: true
|
||||
description: Message is a human-readable message.
|
||||
type: string
|
||||
op:
|
||||
readOnly: true
|
||||
description: Op describes the logical code operation during error. Useful for debugging.
|
||||
type: string
|
||||
err:
|
||||
readOnly: true
|
||||
description: Err is a stack of errors that occurred during processing of the request. Useful for debugging.
|
||||
type: string
|
||||
line:
|
||||
readOnly: true
|
||||
description: First line within sent body containing malformed data
|
||||
type: integer
|
||||
format: int32
|
||||
required:
|
||||
- code
|
||||
- message
|
||||
- op
|
||||
- err
|
||||
LineProtocolLengthError:
|
||||
properties:
|
||||
code:
|
||||
description: Code is the machine-readable error code.
|
||||
readOnly: true
|
||||
type: string
|
||||
enum:
|
||||
- invalid
|
||||
message:
|
||||
readOnly: true
|
||||
description: Message is a human-readable message.
|
||||
type: string
|
||||
maxLength:
|
||||
readOnly: true
|
||||
description: Max length in bytes for a body of line-protocol.
|
||||
type: integer
|
||||
format: int32
|
||||
required:
|
||||
- code
|
||||
- message
|
||||
- maxLength
|
||||
securitySchemes:
|
||||
TokenAuthentication:
|
||||
type: apiKey
|
||||
name: Authorization
|
||||
in: header
|
||||
description: |
|
||||
Use the [Token authentication](#section/Authentication/TokenAuthentication)
|
||||
scheme to authenticate to the InfluxDB API.
|
||||
|
||||
|
||||
In your API requests, send an `Authorization` header.
|
||||
For the header value, provide the word `Token` followed by a space and an InfluxDB API token.
|
||||
The word `Token` is case-sensitive.
|
||||
|
||||
|
||||
### Syntax
|
||||
|
||||
`Authorization: Token YOUR_INFLUX_TOKEN`
|
||||
|
||||
|
||||
For examples and more information, see the following:
|
||||
- [`/authorizations`](#tag/Authorizations) endpoint.
|
||||
- [Authorize API requests](/influxdb/cloud/api-guide/api_intro/#authentication).
|
||||
- [Manage API tokens](/influxdb/cloud/security/tokens/).
|
||||
BasicAuthentication:
|
||||
type: http
|
||||
scheme: basic
|
||||
description: |
|
||||
Use the HTTP [Basic authentication](#section/Authentication/BasicAuthentication)
|
||||
scheme with clients that support the InfluxDB 1.x convention of username and password (that don't support the `Authorization: Token` scheme):
|
||||
|
||||
|
||||
For examples and more information, see how to [authenticate with a username and password](/influxdb/cloud/reference/api/influxdb-1x/).
|
||||
QuerystringAuthentication:
|
||||
type: apiKey
|
||||
in: query
|
||||
name: u=&p=
|
||||
description: |
|
||||
Use the [Querystring authentication](#section/Authentication/QuerystringAuthentication)
|
||||
scheme with InfluxDB 1.x API parameters to provide credentials through the query string.
|
||||
|
||||
|
||||
For examples and more information, see how to [authenticate with a username and password](/influxdb/cloud/reference/api/influxdb-1x/).
|
|
@ -0,0 +1,11 @@
|
|||
title: InfluxDB Cloud Serverless API Service
|
||||
summary: |
|
||||
The InfluxDB v2 HTTP API for InfluxDB Cloud Serverless provides a programmatic interface for writing data stored in an InfluxDB Cloud Serverless bucket.
|
||||
description: |
|
||||
The InfluxDB v2 HTTP API lets you use `/api/v2` endpoints for managing retention policy mappings and writing data stored in an InfluxDB v3 instance.
|
||||
|
||||
This documentation is generated from the
|
||||
[InfluxDB OpenAPI specification](https://raw.githubusercontent.com/influxdata/openapi/master/contracts/ref/cloud.yml).
|
||||
license:
|
||||
name: MIT
|
||||
url: 'https://opensource.org/licenses/MIT'
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,13 @@
|
|||
plugins:
|
||||
- '../openapi/plugins/docs-plugin.js'
|
||||
extends:
|
||||
- recommended
|
||||
- docs/all
|
||||
x-influxdata-product-name: InfluxDB v2 Cloud
|
||||
|
||||
apis:
|
||||
v2@2:
|
||||
root: v2/ref.yml
|
||||
x-influxdata-default: true
|
||||
v1-compatibility@2:
|
||||
root: v1-compatibility/swaggerV1Compat.yml
|
|
@ -1,11 +0,0 @@
|
|||
title: InfluxDB Cloud API Service
|
||||
description: |
|
||||
The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB.
|
||||
Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
|
||||
This documentation is generated from the
|
||||
[InfluxDB OpenAPI specification](https://raw.githubusercontent.com/influxdata/openapi/master/contracts/ref/cloud.yml).
|
||||
version: Cloud 2.x
|
||||
license:
|
||||
name: MIT
|
||||
url: 'https://opensource.org/licenses/MIT'
|
|
@ -0,0 +1,10 @@
|
|||
title: InfluxDB v1 HTTP API for InfluxDB Cloud
|
||||
summary: The InfluxDB v1 compatibility API provides a programmatic interface for interactions with InfluxDB Cloud using InfluxDB v1-compatible endpoints.
|
||||
description: |
|
||||
The InfluxDB 1.x compatibility /write and /query endpoints work with InfluxDB 1.x client libraries and third-party integrations like Grafana and others.
|
||||
|
||||
This documentation is generated from the
|
||||
[InfluxDB OpenAPI specification](https://raw.githubusercontent.com/influxdata/openapi/master/contracts/swaggerV1Compat.yml).
|
||||
license:
|
||||
name: MIT
|
||||
url: 'https://opensource.org/licenses/MIT'
|
|
@ -1,19 +1,38 @@
|
|||
openapi: 3.0.0
|
||||
info:
|
||||
title: InfluxDB Cloud v1 compatibility API documentation
|
||||
version: 0.1.0
|
||||
title: InfluxDB v1 HTTP API for InfluxDB Cloud
|
||||
version: ''
|
||||
description: |
|
||||
The InfluxDB 1.x compatibility /write and /query endpoints work with InfluxDB 1.x client libraries and third-party integrations like Grafana and others.
|
||||
|
||||
If you want to use the latest InfluxDB /api/v2 API instead, see the [InfluxDB v2 API documentation](/influxdb/cloud/api/).
|
||||
|
||||
This documentation is generated from the
|
||||
[InfluxDB OpenAPI specification](https://raw.githubusercontent.com/influxdata/openapi/master/contracts/swaggerV1Compat.yml).
|
||||
license:
|
||||
name: MIT
|
||||
url: https://opensource.org/licenses/MIT
|
||||
summary: The InfluxDB v1 compatibility API provides a programmatic interface for interactions with InfluxDB Cloud using InfluxDB v1-compatible endpoints.
|
||||
servers:
|
||||
- url: /
|
||||
security:
|
||||
- TokenAuthentication: []
|
||||
- BasicAuthentication: []
|
||||
- QuerystringAuthentication: []
|
||||
tags:
|
||||
- name: Authentication
|
||||
description: |
|
||||
The InfluxDB 1.x API requires authentication for all requests.
|
||||
InfluxDB Cloud uses InfluxDB API tokens to authenticate requests.
|
||||
|
||||
|
||||
For more information, see the following:
|
||||
- [Token authentication](#section/Authentication/TokenAuthentication)
|
||||
- [Basic authentication](#section/Authentication/BasicAuthentication)
|
||||
- [Querystring authentication](#section/Authentication/QuerystringAuthentication)
|
||||
|
||||
<!-- ReDoc-Inject: <security-definitions> -->
|
||||
x-traitTag: true
|
||||
- name: Query
|
||||
- name: Write
|
||||
paths:
|
||||
/write:
|
||||
post:
|
||||
|
@ -409,23 +428,3 @@ components:
|
|||
|
||||
|
||||
For examples and more information, see how to [authenticate with a username and password](/influxdb/cloud/reference/api/influxdb-1x/).
|
||||
security:
|
||||
- TokenAuthentication: []
|
||||
- BasicAuthentication: []
|
||||
- QuerystringAuthentication: []
|
||||
tags:
|
||||
- name: Authentication
|
||||
description: |
|
||||
The InfluxDB 1.x API requires authentication for all requests.
|
||||
InfluxDB Cloud uses InfluxDB API tokens to authenticate requests.
|
||||
|
||||
|
||||
For more information, see the following:
|
||||
- [Token authentication](#section/Authentication/TokenAuthentication)
|
||||
- [Basic authentication](#section/Authentication/BasicAuthentication)
|
||||
- [Querystring authentication](#section/Authentication/QuerystringAuthentication)
|
||||
|
||||
<!-- ReDoc-Inject: <security-definitions> -->
|
||||
x-traitTag: true
|
||||
- name: Query
|
||||
- name: Write
|
|
@ -0,0 +1,11 @@
|
|||
title: InfluxDB Cloud API Service
|
||||
summary: The InfluxDB v2 HTTP API provides a programmatic interface for all interactions with InfluxDB v2.
|
||||
description: |
|
||||
The InfluxDB v2 HTTP API provides a programmatic interface for all interactions with InfluxDB v2. Access the InfluxDB API using `/api/v2/` and InfluxDB v1-compatible endpoints.
|
||||
|
||||
This documentation is generated from the
|
||||
[InfluxDB OpenAPI specification](https://raw.githubusercontent.com/influxdata/openapi/master/contracts/ref/cloud.yml).
|
||||
version: 2.x
|
||||
license:
|
||||
name: MIT
|
||||
url: 'https://opensource.org/licenses/MIT'
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,13 @@
|
|||
plugins:
|
||||
- '../openapi/plugins/docs-plugin.js'
|
||||
extends:
|
||||
- recommended
|
||||
- docs/all
|
||||
x-influxdata-product-name: InfluxDB v3 Clustered
|
||||
|
||||
apis:
|
||||
v2@2:
|
||||
root: v2/ref.yml
|
||||
x-influxdata-default: true
|
||||
v1-compatibility@2:
|
||||
root: v1-compatibility/swaggerV1Compat.yml
|
|
@ -1,7 +0,0 @@
|
|||
title: InfluxDB Clustered API Service
|
||||
description: |
|
||||
The InfluxDB HTTP API provides a programmatic interface for interacting with InfluxDB.
|
||||
version: InfluxDB v3.0
|
||||
license:
|
||||
name: MIT
|
||||
url: 'https://opensource.org/licenses/MIT'
|
|
@ -0,0 +1,14 @@
|
|||
title: InfluxDB v1 HTTP API for InfluxDB Clustered
|
||||
summary: The InfluxDB v1 HTTP API provides v1 compatibility for writing and querying data in an InfluxDB v3 Clustered database.
|
||||
description: |
|
||||
The InfluxDB 1.x `/write` and `/query` endpoints work with InfluxDB 1.x client libraries and third-party integrations like Grafana and others.
|
||||
|
||||
This documentation is generated from the
|
||||
[InfluxDB OpenAPI specification](https://raw.githubusercontent.com/influxdata/openapi/master/contracts/swaggerV1Compat.yml).
|
||||
|
||||
#### Related
|
||||
|
||||
[InfluxDB `/api/v2` API for InfluxDB Clustered](/influxdb/clustered/api/v2/)
|
||||
license:
|
||||
name: MIT
|
||||
url: 'https://opensource.org/licenses/MIT'
|
|
@ -1,19 +1,42 @@
|
|||
openapi: 3.0.0
|
||||
info:
|
||||
title: InfluxDB OSS v1 compatibility API documentation
|
||||
version: 2.6.0 v1 compatibility
|
||||
title: InfluxDB v1 HTTP API for InfluxDB Clustered
|
||||
version: ''
|
||||
description: |
|
||||
The InfluxDB 1.x compatibility /write and /query endpoints work with InfluxDB 1.x client libraries and third-party integrations like Grafana and others.
|
||||
|
||||
If you want to use the latest InfluxDB /api/v2 API instead, see the [InfluxDB v2 API documentation](/influxdb/latest/api/).
|
||||
The InfluxDB 1.x `/write` and `/query` endpoints work with InfluxDB 1.x client libraries and third-party integrations like Grafana and others.
|
||||
|
||||
This documentation is generated from the
|
||||
[InfluxDB OpenAPI specification](https://github.com/influxdata/openapi/blob/influxdb-oss-v2.7.0/contracts/swaggerV1Compat.yml).
|
||||
[InfluxDB OpenAPI specification](https://raw.githubusercontent.com/influxdata/openapi/master/contracts/swaggerV1Compat.yml).
|
||||
|
||||
#### Related
|
||||
|
||||
[InfluxDB `/api/v2` API for InfluxDB Clustered](/influxdb/clustered/api/v2/)
|
||||
license:
|
||||
name: MIT
|
||||
url: https://opensource.org/licenses/MIT
|
||||
summary: The InfluxDB v1 HTTP API provides v1 compatibility for writing and querying data in an InfluxDB v3 Clustered database.
|
||||
servers:
|
||||
- url: /
|
||||
security:
|
||||
- TokenAuthentication: []
|
||||
- BasicAuthentication: []
|
||||
- QuerystringAuthentication: []
|
||||
tags:
|
||||
- name: Authentication
|
||||
description: |
|
||||
The InfluxDB 1.x API requires authentication for all requests.
|
||||
InfluxDB Cloud uses InfluxDB API tokens to authenticate requests.
|
||||
|
||||
|
||||
For more information, see the following:
|
||||
- [Token authentication](#section/Authentication/TokenAuthentication)
|
||||
- [Basic authentication](#section/Authentication/BasicAuthentication)
|
||||
- [Querystring authentication](#section/Authentication/QuerystringAuthentication)
|
||||
|
||||
<!-- ReDoc-Inject: <security-definitions> -->
|
||||
x-traitTag: true
|
||||
- name: Query
|
||||
- name: Write
|
||||
paths:
|
||||
/write:
|
||||
post:
|
||||
|
@ -409,23 +432,3 @@ components:
|
|||
|
||||
|
||||
For examples and more information, see how to [authenticate with a username and password](/influxdb/cloud/reference/api/influxdb-1x/).
|
||||
security:
|
||||
- TokenAuthentication: []
|
||||
- BasicAuthentication: []
|
||||
- QuerystringAuthentication: []
|
||||
tags:
|
||||
- name: Authentication
|
||||
description: |
|
||||
The InfluxDB 1.x API requires authentication for all requests.
|
||||
InfluxDB Cloud uses InfluxDB API tokens to authenticate requests.
|
||||
|
||||
|
||||
For more information, see the following:
|
||||
- [Token authentication](#section/Authentication/TokenAuthentication)
|
||||
- [Basic authentication](#section/Authentication/BasicAuthentication)
|
||||
- [Querystring authentication](#section/Authentication/QuerystringAuthentication)
|
||||
|
||||
<!-- ReDoc-Inject: <security-definitions> -->
|
||||
x-traitTag: true
|
||||
- name: Query
|
||||
- name: Write
|
|
@ -0,0 +1,10 @@
|
|||
title: InfluxDB Clustered API Service
|
||||
summary: The InfluxDB v2 HTTP API for InfluxDB Clustered provides a v2-compatible programmatic interface for writing data stored in an InfluxDB Clustered database.
|
||||
description: |
|
||||
The InfluxDB v2 HTTP API lets you use `/api/v2` endpoints for managing retention policy mappings and writing data stored in an InfluxDB v3 instance.
|
||||
|
||||
This documentation is generated from the
|
||||
[InfluxDB OpenAPI specification](https://raw.githubusercontent.com/influxdata/openapi/master/contracts/ref/cloud.yml).
|
||||
license:
|
||||
name: MIT
|
||||
url: 'https://opensource.org/licenses/MIT'
|
File diff suppressed because it is too large
Load Diff
|
@ -2,53 +2,6 @@
|
|||
|
||||
set -e
|
||||
|
||||
function buildHugoTemplate {
|
||||
version=$1
|
||||
apiVersion=$2
|
||||
outFilename=$3
|
||||
|
||||
V_LEN_INIT=$(wc -c $version$outFilename.tmp | awk '{print $1}')
|
||||
cat "redoc-static${outFilename}.html" >> $version$outFilename.tmp
|
||||
V_LEN=$(wc -c $version$outFilename.tmp | awk '{print $1}')
|
||||
|
||||
if ! [[ $V_LEN -gt $V_LEN_INIT ]]
|
||||
then
|
||||
echo "Error: bundle was not appended to $version$outFilename.tmp"
|
||||
exit $?
|
||||
fi
|
||||
|
||||
rm -f "redoc-static${outFilename}.html"
|
||||
mkdir -p ../content/influxdb/$version/api
|
||||
mv $version$outFilename.tmp ../content/influxdb/$version/api/$outFilename.html
|
||||
}
|
||||
|
||||
function generateHtml {
|
||||
filePath=$1
|
||||
outFilename=$2
|
||||
titleVersion=$3
|
||||
titleSubmodule=$4
|
||||
|
||||
echo "Bundling $filePath"
|
||||
|
||||
npx --version
|
||||
|
||||
# Use npx to install and run the specified version of redoc-cli.
|
||||
# npm_config_yes=true npx overrides the prompt
|
||||
# and (vs. npx --yes) is compatible with npm@6 and npm@7.
|
||||
npm_config_yes=true npx redoc-cli@0.12.3 bundle $filePath \
|
||||
-t template.hbs \
|
||||
--title="InfluxDB $titleVersion$titleSubmodule API documentation" \
|
||||
--options.sortPropsAlphabetically \
|
||||
--options.menuToggle \
|
||||
--options.hideDownloadButton \
|
||||
--options.hideHostname \
|
||||
--options.noAutoAuth \
|
||||
--templateOptions.version="$version" \
|
||||
--templateOptions.titleVersion="$titleVersion" \
|
||||
--templateOptions.titleSubmodule="$titleSubmodule" \
|
||||
--output="redoc-static$outFilename.html"
|
||||
}
|
||||
|
||||
function showHelp {
|
||||
echo "Usage: generate.sh <options>"
|
||||
echo "Commands:"
|
||||
|
@ -82,119 +35,179 @@ while getopts "hc" opt; do
|
|||
esac
|
||||
done
|
||||
|
||||
# Get list of versions from directory names
|
||||
versions="$(ls -d -- */ | grep -v 'node_modules' | grep -v 'openapi')"
|
||||
function generateHtml {
|
||||
specPath="$1"
|
||||
product="$2"
|
||||
productName="$3"
|
||||
api="$4"
|
||||
configPath="$5"
|
||||
isDefault=$6
|
||||
|
||||
for version in $versions
|
||||
do
|
||||
# Trim the trailing slash off the directory name
|
||||
version="${version%/}"
|
||||
# Use the product name to define the menu for the Hugo template
|
||||
menu="influxdb_$(echo $product | sed 's/\./_/g;s/-/_/g;')"
|
||||
# Extract the API name--for example, "management" from "management@v2".
|
||||
apiName=$(echo $api | sed 's/@.*//g;')
|
||||
# Convert it to title case--for example, "Management".
|
||||
apiTitle=$(echo $apiName \
|
||||
| awk '{print toupper(substr($1,1,1)) tolower(substr($1,2))}')
|
||||
# Extract the API version--for example, "v0" from "management@v0".
|
||||
version=$(echo $api | sed 's/.*@//g;')
|
||||
# Use the title and summary defined in the product API's info.yml file.
|
||||
title=$(yq '.title' $product/$apiName/content/info.yml)
|
||||
description=$(yq '.summary' $product/$apiName/content/info.yml)
|
||||
# Define the file name for the Redoc HTML output.
|
||||
specbundle=redoc-static_index.html
|
||||
# Define the temporary file for the Hugo template and Redoc HTML.
|
||||
tmpfile="${product}-${api}_index.tmp"
|
||||
|
||||
# Define the menu key
|
||||
if [[ $version == "cloud-serverless" ]] || [[ $version == "cloud-dedicated" ]] || [[ $version == "clustered" ]]; then
|
||||
menu="influxdb_$(echo $version | sed 's/\./_/g;s/-/_/g;')"
|
||||
else
|
||||
menu="influxdb_$(echo $version | sed 's/\./_/g;')"
|
||||
fi
|
||||
echo "Bundling $specPath"
|
||||
|
||||
# Define the title text based on the version
|
||||
if [[ $version == "cloud" ]]; then
|
||||
titleVersion="Cloud"
|
||||
elif [[ $version == "cloud-serverless" ]]; then
|
||||
titleVersion="Cloud Serverless"
|
||||
elif [[ $version == "cloud-dedicated" ]]; then
|
||||
titleVersion="Cloud Dedicated"
|
||||
elif [[ $version == "clustered" ]]; then
|
||||
titleVersion="Clustered"
|
||||
else
|
||||
titleVersion="$version"
|
||||
fi
|
||||
# Use npx to install and run the specified version of redoc-cli.
|
||||
# npm_config_yes=true npx overrides the prompt
|
||||
# and (vs. npx --yes) is compatible with npm@6 and npm@7.
|
||||
npx --version && \
|
||||
npm_config_yes=true npx redoc-cli@0.12.3 bundle $specPath \
|
||||
--config $configPath \
|
||||
-t template.hbs \
|
||||
--title=$title \
|
||||
--options.sortPropsAlphabetically \
|
||||
--options.menuToggle \
|
||||
--options.hideDownloadButton \
|
||||
--options.hideHostname \
|
||||
--options.noAutoAuth \
|
||||
--output=$specbundle \
|
||||
--templateOptions.description=$description \
|
||||
--templateOptions.product="$product" \
|
||||
--templateOptions.productName="$productName"
|
||||
|
||||
# Define frontmatter version
|
||||
if [[ $version == "cloud-serverless" ]] || [[ $version == "cloud-dedicated" ]] || [[ $version == "clustered" ]]; then
|
||||
frontmatterVersion="v3"
|
||||
else
|
||||
frontmatterVersion="v2"
|
||||
fi
|
||||
|
||||
# Generate the frontmatter
|
||||
v2frontmatter="---
|
||||
title: InfluxDB $titleVersion API documentation
|
||||
description: >
|
||||
The InfluxDB API provides a programmatic interface for interactions with InfluxDB $titleVersion.
|
||||
if [[ $version == "v1" ]]; then
|
||||
frontmatter="---
|
||||
title: $title
|
||||
description: $description
|
||||
layout: api
|
||||
menu:
|
||||
$menu:
|
||||
parent: InfluxDB v2 API
|
||||
name: v2 API docs
|
||||
weight: 102
|
||||
---
|
||||
"
|
||||
v1compatfrontmatter="---
|
||||
title: InfluxDB $titleVersion v1 compatibility API documentation
|
||||
description: >
|
||||
The InfluxDB v1 compatibility API provides a programmatic interface for interactions with InfluxDB $titleVersion using InfluxDB v1 compatibility endpoints.
|
||||
layout: api
|
||||
menu:
|
||||
$menu:
|
||||
parent: v1 compatibility
|
||||
name: View v1 compatibility API docs
|
||||
parent: $version compatibility
|
||||
name: View $version compatibility API
|
||||
weight: 304
|
||||
---
|
||||
"
|
||||
v3frontmatter="---
|
||||
title: InfluxDB $titleVersion API documentation
|
||||
description: >
|
||||
The InfluxDB API provides a programmatic interface for interactions with InfluxDB $titleVersion.
|
||||
elif [[ $version == "0" ]]; then
|
||||
echo $productName $apiName
|
||||
frontmatter="---
|
||||
title: $title
|
||||
description: $description
|
||||
layout: api
|
||||
weight: 102
|
||||
menu:
|
||||
$menu:
|
||||
parent: InfluxDB HTTP API
|
||||
name: Management API
|
||||
---
|
||||
"
|
||||
elif [[ $isDefault == true ]]; then
|
||||
frontmatter="---
|
||||
title: $title
|
||||
description: $description
|
||||
layout: api
|
||||
menu:
|
||||
$menu:
|
||||
parent: InfluxDB HTTP API
|
||||
name: $apiTitle API
|
||||
weight: 102
|
||||
aliases:
|
||||
- /influxdb/$product/api/
|
||||
---
|
||||
"
|
||||
else
|
||||
frontmatter="---
|
||||
title: $title
|
||||
description: $description
|
||||
layout: api
|
||||
menu:
|
||||
$menu:
|
||||
parent: InfluxDB HTTP API
|
||||
name: $apiTitle API
|
||||
weight: 102
|
||||
---
|
||||
"
|
||||
|
||||
# If the v2 spec file differs from master, regenerate the HTML.
|
||||
filePath="${version}/ref.yml"
|
||||
update=0
|
||||
if [[ $generate_changed == 0 ]]; then
|
||||
fileChanged=$(git diff --name-status master -- ${filePath})
|
||||
if [[ -z "$fileChanged" ]]; then
|
||||
update=1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ $update -eq 0 ]]; then
|
||||
outFilename="_index"
|
||||
titleSubmodule=""
|
||||
generateHtml $filePath $outFilename $titleVersion $titleSubmodule
|
||||
# Create the Hugo template file with the frontmatter and Redoc HTML
|
||||
echo "$frontmatter" >> $tmpfile
|
||||
V_LEN_INIT=$(wc -c $tmpfile | awk '{print $1}')
|
||||
cat $specbundle >> $tmpfile
|
||||
V_LEN=$(wc -c $tmpfile | awk '{print $1}')
|
||||
|
||||
# Create temp file with frontmatter and Redoc html
|
||||
if [[ $frontmatterVersion == "v3" ]]; then
|
||||
echo "$v3frontmatter" >> $version$outFilename.tmp
|
||||
else
|
||||
echo "$v2frontmatter" >> $version$outFilename.tmp
|
||||
fi
|
||||
buildHugoTemplate $version v2 $outFilename
|
||||
if ! [[ $V_LEN -gt $V_LEN_INIT ]]
|
||||
then
|
||||
echo "Error: bundle was not appended to $tmpfile"
|
||||
exit $?
|
||||
fi
|
||||
|
||||
# If the v1 compatibility spec file differs from master, regenerate the HTML.
|
||||
filePath="${version}/swaggerV1Compat.yml"
|
||||
update=0
|
||||
rm -f $specbundle
|
||||
# Create the directory and move the file.
|
||||
if [ ! -z "$apiName" ]; then
|
||||
mkdir -p ../content/influxdb/$product/api/$apiName
|
||||
mv $tmpfile ../content/influxdb/$product/api/$apiName/_index.html
|
||||
else
|
||||
mkdir -p ../content/influxdb/$product/api
|
||||
mv $tmpfile ../content/influxdb/$product/api/_index.html
|
||||
fi
|
||||
}
|
||||
|
||||
if [ -e "$filePath" ]; then
|
||||
function build {
|
||||
# Get the list of products from directory names
|
||||
products="$(ls -d -- */ | grep -v 'node_modules' | grep -v 'openapi')"
|
||||
|
||||
for product in $products; do
|
||||
#Trim the trailing slash off the directory name
|
||||
product="${product%/}"
|
||||
# Get the product API configuration file.
|
||||
configPath="$product/.config.yml"
|
||||
if [ ! -f $configPath ]; then
|
||||
configPath=".config.yml"
|
||||
fi
|
||||
echo "Checking product config $configPath"
|
||||
# Get the product name from the configuration.
|
||||
productName=$(yq e '.x-influxdata-product-name' $configPath)
|
||||
if [[ -z "$productName" ]]; then
|
||||
productName=InfluxDB
|
||||
fi
|
||||
# Get an array of product API names (keys) from the configuration file
|
||||
apis=$(yq e '.apis | keys | .[]' $configPath)
|
||||
# Read each element of the apis array
|
||||
while IFS= read -r api; do
|
||||
# Get the spec file path from the configuration.
|
||||
specRootPath=$(yq e ".apis | .$api | .root" $configPath)
|
||||
# Check that the YAML spec file exists.
|
||||
specPath="$product/$specRootPath"
|
||||
echo "Checking for spec $specPath"
|
||||
if [ -d "$specPath" ] || [ ! -f "$specPath" ]; then
|
||||
echo "OpenAPI spec $specPath doesn't exist."
|
||||
fi
|
||||
# Get default status from the configuration.
|
||||
isDefault=false
|
||||
defaultStatus=$(yq e ".apis | .$api | .x-influxdata-default" $configPath)
|
||||
if [[ $defaultStatus == "true" ]]; then
|
||||
isDefault=true
|
||||
fi
|
||||
|
||||
# If the spec file differs from master, regenerate the HTML.
|
||||
update=0
|
||||
if [[ $generate_changed == 0 ]]; then
|
||||
fileChanged=$(git diff --name-status master -- ${filePath})
|
||||
if [[ -z "$fileChanged" ]]; then
|
||||
update=1
|
||||
diff=$(git diff --name-status master -- ${specPath})
|
||||
if [[ -z "$diff" ]]; then
|
||||
update=1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ $update -eq 0 ]]; then
|
||||
outFilename="v1-compatibility"
|
||||
titleSubmodule="v1 compatibility"
|
||||
generateHtml $filePath $outFilename $titleVersion $titleSubmodule
|
||||
|
||||
# Create temp file with frontmatter and Redoc html
|
||||
echo "$v1compatfrontmatter" >> $version$outFilename.tmp
|
||||
buildHugoTemplate $version v1 $outFilename
|
||||
echo "Regenerating $product $api"
|
||||
generateHtml "$specPath" "$product" "$productName" "$api" "$configPath" $isDefault
|
||||
fi
|
||||
fi
|
||||
done <<< "$apis"
|
||||
done
|
||||
}
|
||||
|
||||
build
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
# This script provides a simple way grab the latest fully resolved openapi (OAS, OpenAPI Specification) contract files
|
||||
# from the influxdata/openapi repo.
|
||||
# Use this script to retrieve the following InfluxData API specifications:
|
||||
# - the latest, fully resolved openapi (OAS, OpenAPI Specification) contract files from the influxdata/openapi repo
|
||||
#
|
||||
# Specify a platform to retrieve (cloud-serverless, cloud-dedicated, clustered, cloud, oss, v1compat, all).
|
||||
# Specify a product to retrieve (cloud-serverless, cloud-dedicated, clustered, cloud, v2, v1-compatibility, all).
|
||||
# Optionally specify:
|
||||
# - an OSS version as the second argument or using the -o flag.
|
||||
# The version specifies where to write the updated openapi.
|
||||
|
@ -15,16 +15,16 @@
|
|||
# For local development, pass your openapi directory using the file:/// protocol.
|
||||
# To use the existing ref.yml and prevent fetching any openapi files, use the -B flag.
|
||||
# Syntax:
|
||||
# sh ./getswagger.sh <platform>
|
||||
# sh ./getswagger.sh <platform> -b <baseUrl>
|
||||
# sh ./getswagger.sh -c <platform> -o <version> -b <baseUrl>
|
||||
# sh ./getswagger.sh -c <platform> -o <version> -B
|
||||
# sh ./getswagger.sh <product>
|
||||
# sh ./getswagger.sh <product> -b <baseUrl>
|
||||
# sh ./getswagger.sh -c <product> -o <version> -b <baseUrl>
|
||||
# sh ./getswagger.sh -c <product> -o <version> -B
|
||||
#
|
||||
# Examples:
|
||||
# sh ./getswagger.sh cloud-serverless
|
||||
# sh ./getswagger.sh clustered -B
|
||||
# sh ./getswagger.sh cloud
|
||||
# sh ./getswagger.sh -c oss -o v2.0 -b file:///Users/johnsmith/github/openapi
|
||||
# sh ./getswagger.sh -c v2 -o v2.0 -b file:///Users/johnsmith/github/openapi
|
||||
|
||||
versionDirs=($(ls -d */))
|
||||
latestOSS=${versionDirs[${#versionDirs[@]}-1]}
|
||||
|
@ -36,12 +36,12 @@ baseUrl="https://raw.githubusercontent.com/influxdata/openapi/master"
|
|||
baseUrlOSS="https://raw.githubusercontent.com/influxdata/openapi/docs-release/influxdb-oss"
|
||||
ossVersion=${latestOSS%/}
|
||||
verbose=""
|
||||
platform=""
|
||||
product=""
|
||||
|
||||
function showHelp {
|
||||
echo "Usage: ./getswagger.sh <platform>"
|
||||
echo "Usage: ./getswagger.sh <product>"
|
||||
echo " With optional arguments:"
|
||||
echo " ./getswagger.sh <platform> -b <baseUrl> -V"
|
||||
echo " ./getswagger.sh <product> -b <baseUrl> -V"
|
||||
echo " ./getswagger.sh cloud"
|
||||
echo " ./getswagger.sh cloud-dedicated"
|
||||
echo " ./getswagger.sh cloud-serverless"
|
||||
|
@ -62,8 +62,8 @@ function showHelp {
|
|||
subcommand=$1
|
||||
|
||||
case "$subcommand" in
|
||||
cloud-dedicated|cloud-serverless|clustered|cloud|oss|v1compat|all)
|
||||
platform=$1
|
||||
cloud-dedicated-v2|cloud-dedicated-management|cloud-serverless-v2|clustered-v2|cloud-v2|v2|v1-compat|all)
|
||||
product=$1
|
||||
shift
|
||||
|
||||
while getopts ":o:b:BhV" opt; do
|
||||
|
@ -103,7 +103,7 @@ case "$subcommand" in
|
|||
esac
|
||||
|
||||
function showArgs {
|
||||
echo "platform: $platform";
|
||||
echo "product: $product";
|
||||
echo "baseUrl: $baseUrl";
|
||||
echo "ossVersion: $ossVersion";
|
||||
}
|
||||
|
@ -112,98 +112,120 @@ function postProcess() {
|
|||
# Use npx to install and run the specified version of openapi-cli.
|
||||
# npm_config_yes=true npx overrides the prompt
|
||||
# and (vs. npx --yes) is compatible with npm@6 and npm@7.
|
||||
specPath=$1
|
||||
platform="$2"
|
||||
apiVersion="$3"
|
||||
specPath="$1"
|
||||
configPath="$2"
|
||||
api="$3"
|
||||
|
||||
openapiCLI=" @redocly/cli"
|
||||
currentPath=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||
|
||||
npx --version
|
||||
# TODO: Move some of this into the plugin:
|
||||
|
||||
# Use Redoc's openapi-cli to regenerate the spec with custom decorations.
|
||||
# If you want to lint the source contract (before bundling),
|
||||
# pass `--lint` to the `bundle` command.
|
||||
# If you set environment variables (for example, INFLUXDB_PLATFORM=)
|
||||
# If you set environment variables (for example, INFLUXDB_PRODUCT=)
|
||||
# preceding the command name, you can then access the variables
|
||||
# in the NodeJS process.env global object.
|
||||
INFLUXDB_API_VERSION=$apiVersion \
|
||||
INFLUXDB_PLATFORM=$platform \
|
||||
# INFLUXDB_API_VERSION=$apiVersion \
|
||||
npx --version
|
||||
INFLUXDB_PRODUCT=$(dirname "$configPath") \
|
||||
INFLUXDB_API_NAME=$(echo "$api" | sed 's/@.*//g;') \
|
||||
API_DOCS_ROOT_PATH=$currentPath \
|
||||
npm_config_yes=true \
|
||||
npx $openapiCLI bundle $specPath \
|
||||
-o $specPath \
|
||||
--config=./.redocly.yaml
|
||||
--config=$configPath
|
||||
}
|
||||
|
||||
function updateCloud {
|
||||
outFile="cloud/ref.yml"
|
||||
function updateCloudV2 {
|
||||
outFile="cloud/v2/ref.yml"
|
||||
if [[ -z "$baseUrl" ]];
|
||||
then
|
||||
echo "Using existing $outFile"
|
||||
else
|
||||
curl $UPDATE_OPTIONS ${baseUrl}/contracts/ref/cloud.yml -o $outFile
|
||||
fi
|
||||
postProcess $outFile cloud
|
||||
postProcess $outFile 'cloud/.config.yml' v2@2
|
||||
}
|
||||
|
||||
function updateCloudDedicated {
|
||||
outFile="cloud-dedicated/ref.yml"
|
||||
function updateCloudDedicatedManagement {
|
||||
outFile="cloud-dedicated/management/openapi.yml"
|
||||
if [[ -z "$baseUrl" ]];
|
||||
then
|
||||
echo "Using existing $outFile"
|
||||
else
|
||||
curl $UPDATE_OPTIONS https://raw.githubusercontent.com/influxdata/granite/3117fb47d5e56afaadcebc226ff4b25785d95b5a/openapi.yaml -o $outFile
|
||||
fi
|
||||
postProcess $outFile 'cloud-dedicated/.config.yml' management@0
|
||||
}
|
||||
|
||||
function updateCloudDedicatedV2 {
|
||||
outFile="cloud-dedicated/v2/ref.yml"
|
||||
if [[ -z "$baseUrl" ]];
|
||||
then
|
||||
echo "Using existing $outFile"
|
||||
else
|
||||
curl $UPDATE_OPTIONS ${baseUrl}/contracts/ref/cloud.yml -o $outFile
|
||||
fi
|
||||
postProcess $outFile cloud-dedicated
|
||||
postProcess $outFile 'cloud-dedicated/.config.yml' v2@2
|
||||
}
|
||||
|
||||
function updateClustered {
|
||||
outFile="clustered/ref.yml"
|
||||
function updateClusteredV2 {
|
||||
outFile="clustered/v2/ref.yml"
|
||||
if [[ -z "$baseUrl" ]];
|
||||
then
|
||||
echo "Using existing $outFile"
|
||||
else
|
||||
curl $UPDATE_OPTIONS ${baseUrl}/contracts/ref/cloud.yml -o $outFile
|
||||
fi
|
||||
postProcess $outFile clustered
|
||||
postProcess $outFile 'clustered/.config.yml' v2@2
|
||||
}
|
||||
|
||||
function updateCloudServerless {
|
||||
outFile="cloud-serverless/ref.yml"
|
||||
function updateCloudServerlessV2 {
|
||||
outFile="cloud-serverless/v2/ref.yml"
|
||||
if [[ -z "$baseUrl" ]];
|
||||
then
|
||||
echo "Using existing $outFile"
|
||||
else
|
||||
curl $UPDATE_OPTIONS ${baseUrl}/contracts/ref/cloud.yml -o $outFile
|
||||
fi
|
||||
postProcess $outFile cloud-serverless
|
||||
postProcess $outFile 'cloud-serverless/.config.yml' v2@2
|
||||
}
|
||||
|
||||
function updateOSS {
|
||||
mkdir -p ${ossVersion}
|
||||
outFile="$ossVersion/ref.yml"
|
||||
function updateOSSV2 {
|
||||
outFile="v2/ref.yml"
|
||||
if [[ -z "$baseUrlOSS" ]];
|
||||
then
|
||||
echo "Using existing $outFile"
|
||||
else
|
||||
curl $UPDATE_OPTIONS ${baseUrlOSS}/contracts/ref/oss.yml -o $outFile
|
||||
fi
|
||||
postProcess $outFile $ossVersion
|
||||
postProcess $outFile 'v2/.config.yml' '@2'
|
||||
}
|
||||
|
||||
function updateV1Compat {
|
||||
outFile="cloud/swaggerV1Compat.yml"
|
||||
outFile="cloud/v1-compatibility/swaggerV1Compat.yml"
|
||||
if [[ -z "$baseUrl" ]];
|
||||
then
|
||||
echo "Using existing $outFile"
|
||||
else
|
||||
curl $UPDATE_OPTIONS ${baseUrl}/contracts/swaggerV1Compat.yml -o $outFile
|
||||
fi
|
||||
postProcess $outFile cloud v1compat
|
||||
postProcess $outFile 'cloud/.config.yml' 'v1-compatibility'
|
||||
|
||||
outFile="$ossVersion/swaggerV1Compat.yml"
|
||||
mkdir -p ${ossVersion} && cp cloud/swaggerV1Compat.yml $outFile
|
||||
postProcess $outFile $ossVersion v1compat
|
||||
outFile="v2/v1-compatibility/swaggerV1Compat.yml"
|
||||
cp cloud/v1-compatibility/swaggerV1Compat.yml $outFile
|
||||
postProcess $outFile 'v2/.config.yml' 'v1-compatibility'
|
||||
|
||||
outFile="cloud-dedicated/v1-compatibility/swaggerV1Compat.yml"
|
||||
postProcess $outFile 'cloud-dedicated/.config.yml' 'v1-compatibility'
|
||||
|
||||
outFile="cloud-serverless/v1-compatibility/swaggerV1Compat.yml"
|
||||
postProcess $outFile 'cloud-serverless/.config.yml' 'v1-compatibility'
|
||||
|
||||
outFile="clustered/v1-compatibility/swaggerV1Compat.yml"
|
||||
postProcess $outFile 'clustered/.config.yml' 'v1-compatibility'
|
||||
}
|
||||
|
||||
UPDATE_OPTIONS="--fail"
|
||||
|
@ -215,33 +237,37 @@ then
|
|||
echo ""
|
||||
fi
|
||||
|
||||
if [ "$platform" = "cloud" ];
|
||||
if [ "$product" = "cloud-v2" ];
|
||||
then
|
||||
updateCloud
|
||||
elif [ "$platform" = "cloud-dedicated" ];
|
||||
updateCloudV2
|
||||
elif [ "$product" = "cloud-dedicated-v2" ];
|
||||
then
|
||||
updateCloudDedicated
|
||||
elif [ "$platform" = "cloud-serverless" ];
|
||||
updateCloudDedicatedV2
|
||||
elif [ "$product" = "cloud-dedicated-management" ];
|
||||
then
|
||||
updateCloudServerless
|
||||
elif [ "$platform" = "clustered" ];
|
||||
updateCloudDedicatedManagement
|
||||
elif [ "$product" = "cloud-serverless-v2" ];
|
||||
then
|
||||
updateClustered
|
||||
elif [ "$platform" = "oss" ];
|
||||
updateCloudServerlessV2
|
||||
elif [ "$product" = "clustered-v2" ];
|
||||
then
|
||||
updateOSS
|
||||
elif [ "$platform" = "v1compat" ];
|
||||
updateClusteredV2
|
||||
elif [ "$product" = "v2" ];
|
||||
then
|
||||
updateOSSV2
|
||||
elif [ "$product" = "v1-compat" ];
|
||||
then
|
||||
updateV1Compat
|
||||
elif [ "$platform" = "all" ];
|
||||
elif [ "$product" = "all" ];
|
||||
then
|
||||
updateCloud
|
||||
updateCloudDedicated
|
||||
updateCloudServerless
|
||||
updateClustered
|
||||
updateOSS
|
||||
updateCloudV2
|
||||
updateCloudDedicatedV2
|
||||
updateCloudDedicatedManagement
|
||||
updateCloudServerlessV2
|
||||
updateClusteredV2
|
||||
updateOSSV2
|
||||
updateV1Compat
|
||||
else
|
||||
echo "Provide a platform argument: cloud, cloud-serverless, cloud-dedicated, clustered, oss, v1compat, or all."
|
||||
echo "Provide a product argument: cloud-v2, cloud-serverless-v2, cloud-dedicated-v2, clustered-v2, v2, v1-compat, or all."
|
||||
showHelp
|
||||
fi
|
||||
|
|
|
@ -6,12 +6,12 @@ function replaceDocsUrl(field) {
|
|||
* [^]* matches line breaks. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#using_regular_expression_on_multiple_lines
|
||||
*/
|
||||
const shortcode = /\{\{%([^]|\s)*?INFLUXDB_DOCS_URL([^]|\s)*?%\}\}/g
|
||||
let replacement = `/influxdb/${process.env.INFLUXDB_PLATFORM}`;
|
||||
let replacement = `/influxdb/${process.env.INFLUXDB_PRODUCT}`;
|
||||
|
||||
field = field.replaceAll(shortcode, replacement)
|
||||
.replaceAll('https://docs.influxdata.com/influxdb/', '/influxdb/');
|
||||
|
||||
if(process.env.INFLUXDB_PLATFORM === 'cloud-iox') {
|
||||
if(process.env.INFLUXDB_PRODUCT === 'cloud-iox') {
|
||||
field = field.replaceAll('/influxdb/cloud/', `${replacement}/`);
|
||||
}
|
||||
return field;
|
||||
|
|
|
@ -8,6 +8,9 @@ module.exports = SetServers;
|
|||
* Object key "Server" is an OAS 3.0 node type.
|
||||
*/
|
||||
function SetServers(data) {
|
||||
if (!data) {
|
||||
data = [ { url: '/' } ];
|
||||
}
|
||||
return {
|
||||
DefinitionRoot: {
|
||||
leave(root) {
|
||||
|
|
|
@ -11,6 +11,11 @@ function SetInfo(data) {
|
|||
}
|
||||
if(data.hasOwnProperty('version')) {
|
||||
info.version = data.version;
|
||||
} else {
|
||||
info['version'] = '';
|
||||
}
|
||||
if(data.hasOwnProperty('summary')) {
|
||||
info.summary = data.summary;
|
||||
}
|
||||
if(data.hasOwnProperty('description')) {
|
||||
info.description = data.description;
|
||||
|
|
|
@ -3,15 +3,22 @@ const { toJSON } = require('./helpers/content-helper');
|
|||
|
||||
function getVersioned(filename) {
|
||||
const apiDocsRoot=path.resolve(process.env.API_DOCS_ROOT_PATH || process.cwd());
|
||||
const contentPath = path.join(apiDocsRoot, process.env.INFLUXDB_PLATFORM, 'content');
|
||||
|
||||
return toJSON(path.join(contentPath, (process.env.INFLUXDB_API_VERSION || ''), filename));
|
||||
let contentPath = path.join(apiDocsRoot, process.env.INFLUXDB_PRODUCT, process.env.INFLUXDB_API_NAME, 'content');
|
||||
content = toJSON(path.join(contentPath, filename));
|
||||
if (content) {
|
||||
return content;
|
||||
} else {
|
||||
// If the content is not found in the product/api folder, try the product folder
|
||||
return toJSON(path.join(apiDocsRoot, process.env.INFLUXDB_PRODUCT, 'content', filename));
|
||||
}
|
||||
}
|
||||
|
||||
const info = () => getVersioned('info.yml');
|
||||
const servers = () => getVersioned('servers.yml');
|
||||
const tagGroups = () => getVersioned('tag-groups.yml');
|
||||
|
||||
module.exports = {
|
||||
info,
|
||||
servers,
|
||||
tagGroups,
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const {info, tagGroups} = require('./docs-content');
|
||||
const {info, servers, tagGroups} = require('./docs-content');
|
||||
const ReportTags = require('./rules/report-tags');
|
||||
const ValidateServersUrl = require('./rules/validate-servers-url');
|
||||
const RemovePrivatePaths = require('./decorators/paths/remove-private-paths');
|
||||
|
@ -23,7 +23,7 @@ const rules = {
|
|||
/** @type {import('@redocly/openapi-cli').CustomRulesConfig} */
|
||||
const decorators = {
|
||||
oas3: {
|
||||
'set-servers': () => SetServers([ { url: '/' } ]),
|
||||
'set-servers': () => SetServers(servers()),
|
||||
'delete-servers': DeleteServers,
|
||||
'remove-private-paths': RemovePrivatePaths,
|
||||
'strip-version-prefix': StripVersionPrefix,
|
||||
|
|
|
@ -51,9 +51,7 @@ function toJSON(yamlPath) {
|
|||
try {
|
||||
return yaml.load(fs.readFileSync(yamlPath, 'utf8'));
|
||||
} catch (e) {
|
||||
/** No file, no harm, no foul. **/
|
||||
// console.log(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
<meta charset="utf8" />
|
||||
<title>{{title}}</title>
|
||||
<meta name="description" content="The InfluxDB API provides a programmatic interface for interactions with InfluxDB {{templateOptions.version}}.">
|
||||
<meta name="description" content="{{templateOptions.description}}.">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="shortcut icon" href="/img/favicon.png" type="image/png" sizes="32x32">
|
||||
|
||||
|
@ -39,7 +39,7 @@
|
|||
<div class="spinner"></div>
|
||||
</div>
|
||||
<div id="influx-header">
|
||||
<a class="back" href="/influxdb/{{templateOptions.version}}/">InfluxDB <span class="version">{{templateOptions.titleVersion}} {{templateOptions.titleSubmodule}}</span> Docs</a>
|
||||
<a class="back" href="/influxdb/{{templateOptions.product}}/"><span class="version">{{templateOptions.productName}}</span> Docs</a>
|
||||
<a class="btn" href="https://github.com/influxdata/influxdb/issues/new/choose/" target="_blank">Submit API issue</a>
|
||||
</div>
|
||||
{{{redocHTML}}}
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
plugins:
|
||||
- '../openapi/plugins/docs-plugin.js'
|
||||
extends:
|
||||
- recommended
|
||||
- docs/all
|
||||
x-influxdata-product-name: InfluxDB v2 OSS
|
||||
|
||||
apis:
|
||||
'@2':
|
||||
root: ref.yml
|
||||
x-influxdata-default: true
|
||||
v1-compatibility@2:
|
||||
root: v1-compatibility/swaggerV1Compat.yml
|
|
@ -1,10 +1,11 @@
|
|||
title: InfluxDB OSS API Service
|
||||
version: 2.7.0
|
||||
summary: The InfluxDB v2 HTTP API provides a programmatic interface for all interactions with an InfluxDB v2 instance.
|
||||
description: |
|
||||
The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
||||
The InfluxDB v2 HTTP API provides a programmatic interface for all interactions with an InfluxDB v2 instance. Access the InfluxDB API using `/api/v2/` and InfluxDB v1-compatible endpoints.
|
||||
|
||||
This documentation is generated from the
|
||||
[InfluxDB OpenAPI specification](https://github.com/influxdata/openapi/blob/influxdb-oss-v2.7.0/contracts/ref/oss.yml).
|
||||
version: 2.x
|
||||
license:
|
||||
name: MIT
|
||||
url: 'https://opensource.org/licenses/MIT'
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
title: InfluxDB OSS v1 compatibility API documentation
|
||||
version: 2.7.0 v1 compatibility
|
||||
description: |
|
||||
The InfluxDB 1.x compatibility /write and /query endpoints work with InfluxDB 1.x client libraries and third-party integrations like Grafana and others.
|
||||
|
||||
If you want to use the latest InfluxDB /api/v2 API instead, see the [InfluxDB v2 API documentation](/influxdb/latest/api/).
|
||||
|
||||
This documentation is generated from the
|
||||
[InfluxDB OpenAPI specification](https://github.com/influxdata/openapi/blob/influxdb-oss-v2.7.0/contracts/swaggerV1Compat.yml).
|
||||
license:
|
||||
name: MIT
|
||||
url: 'https://opensource.org/licenses/MIT'
|
13919
api-docs/v2/ref.yml
13919
api-docs/v2/ref.yml
File diff suppressed because it is too large
Load Diff
|
@ -1,11 +1,11 @@
|
|||
title: InfluxDB Cloud v1 compatibility API documentation
|
||||
title: InfluxDB v1 HTTP API for InfluxDB v2 OSS
|
||||
summary: The InfluxDB v1 compatibility API provides a programmatic interface for interactions with InfluxDB v2 using InfluxDB v1-compatible endpoints.
|
||||
description: |
|
||||
The InfluxDB 1.x compatibility /write and /query endpoints work with InfluxDB 1.x client libraries and third-party integrations like Grafana and others.
|
||||
|
||||
If you want to use the latest InfluxDB /api/v2 API instead, see the [InfluxDB v2 API documentation](/influxdb/cloud/api/).
|
||||
|
||||
This documentation is generated from the
|
||||
[InfluxDB OpenAPI specification](https://raw.githubusercontent.com/influxdata/openapi/master/contracts/swaggerV1Compat.yml).
|
||||
|
||||
license:
|
||||
name: MIT
|
||||
url: 'https://opensource.org/licenses/MIT'
|
||||
url: 'https://opensource.org/licenses/MIT'
|
|
@ -0,0 +1,446 @@
|
|||
openapi: 3.0.0
|
||||
info:
|
||||
title: InfluxDB v1 HTTP API for InfluxDB v2 OSS
|
||||
version: ''
|
||||
description: |
|
||||
The InfluxDB 1.x compatibility /write and /query endpoints work with InfluxDB 1.x client libraries and third-party integrations like Grafana and others.
|
||||
|
||||
This documentation is generated from the
|
||||
[InfluxDB OpenAPI specification](https://raw.githubusercontent.com/influxdata/openapi/master/contracts/swaggerV1Compat.yml).
|
||||
license:
|
||||
name: MIT
|
||||
url: https://opensource.org/licenses/MIT
|
||||
summary: The InfluxDB v1 compatibility API provides a programmatic interface for interactions with InfluxDB v2 using InfluxDB v1-compatible endpoints.
|
||||
servers:
|
||||
- url: /
|
||||
security:
|
||||
- TokenAuthentication: []
|
||||
- BasicAuthentication: []
|
||||
- QuerystringAuthentication: []
|
||||
tags:
|
||||
- name: Authentication
|
||||
description: |
|
||||
The InfluxDB 1.x API requires authentication for all requests.
|
||||
InfluxDB Cloud uses InfluxDB API tokens to authenticate requests.
|
||||
|
||||
|
||||
For more information, see the following:
|
||||
- [Token authentication](#section/Authentication/TokenAuthentication)
|
||||
- [Basic authentication](#section/Authentication/BasicAuthentication)
|
||||
- [Querystring authentication](#section/Authentication/QuerystringAuthentication)
|
||||
|
||||
<!-- ReDoc-Inject: <security-definitions> -->
|
||||
x-traitTag: true
|
||||
- name: Query
|
||||
- name: Write
|
||||
paths:
|
||||
/write:
|
||||
post:
|
||||
operationId: PostWriteV1
|
||||
tags:
|
||||
- Write
|
||||
summary: Write time series data into InfluxDB in a V1-compatible format
|
||||
requestBody:
|
||||
description: Line protocol body
|
||||
required: true
|
||||
content:
|
||||
text/plain:
|
||||
schema:
|
||||
type: string
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/TraceSpan'
|
||||
- $ref: '#/components/parameters/AuthUserV1'
|
||||
- $ref: '#/components/parameters/AuthPassV1'
|
||||
- in: query
|
||||
name: db
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
description: Bucket to write to. If none exists, InfluxDB creates a bucket with a default 3-day retention policy.
|
||||
- in: query
|
||||
name: rp
|
||||
schema:
|
||||
type: string
|
||||
description: Retention policy name.
|
||||
- in: query
|
||||
name: precision
|
||||
schema:
|
||||
type: string
|
||||
description: Write precision.
|
||||
- in: header
|
||||
name: Content-Encoding
|
||||
description: When present, its value indicates to the database that compression is applied to the line protocol body.
|
||||
schema:
|
||||
type: string
|
||||
description: Specifies that the line protocol in the body is encoded with gzip or not encoded with identity.
|
||||
default: identity
|
||||
enum:
|
||||
- gzip
|
||||
- identity
|
||||
responses:
|
||||
'204':
|
||||
description: Write data is correctly formatted and accepted for writing to the bucket.
|
||||
'400':
|
||||
description: Line protocol poorly formed and no points were written. Response can be used to determine the first malformed line in the body line-protocol. All data in body was rejected and not written.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/LineProtocolError'
|
||||
'401':
|
||||
description: Token does not have sufficient permissions to write to this organization and bucket or the organization and bucket do not exist.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
'403':
|
||||
description: No token was sent and they are required.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
'413':
|
||||
description: Write has been rejected because the payload is too large. Error message returns max size supported. All data in body was rejected and not written.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/LineProtocolLengthError'
|
||||
'429':
|
||||
description: Token is temporarily over quota. The Retry-After header describes when to try the write again.
|
||||
headers:
|
||||
Retry-After:
|
||||
description: A non-negative decimal integer indicating the seconds to delay after the response is received.
|
||||
schema:
|
||||
type: integer
|
||||
format: int32
|
||||
'503':
|
||||
description: Server is temporarily unavailable to accept writes. The Retry-After header describes when to try the write again.
|
||||
headers:
|
||||
Retry-After:
|
||||
description: A non-negative decimal integer indicating the seconds to delay after the response is received.
|
||||
schema:
|
||||
type: integer
|
||||
format: int32
|
||||
default:
|
||||
description: Internal server error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
/query:
|
||||
post:
|
||||
operationId: PostQueryV1
|
||||
tags:
|
||||
- Query
|
||||
summary: Query InfluxDB in a V1 compatible format
|
||||
requestBody:
|
||||
description: InfluxQL query to execute.
|
||||
content:
|
||||
text/plain:
|
||||
schema:
|
||||
type: string
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/TraceSpan'
|
||||
- $ref: '#/components/parameters/AuthUserV1'
|
||||
- $ref: '#/components/parameters/AuthPassV1'
|
||||
- in: header
|
||||
name: Accept
|
||||
schema:
|
||||
type: string
|
||||
description: Specifies how query results should be encoded in the response. **Note:** With `application/csv`, query results include epoch timestamps instead of RFC3339 timestamps.
|
||||
default: application/json
|
||||
enum:
|
||||
- application/json
|
||||
- application/csv
|
||||
- text/csv
|
||||
- application/x-msgpack
|
||||
- in: header
|
||||
name: Accept-Encoding
|
||||
description: The Accept-Encoding request HTTP header advertises which content encoding, usually a compression algorithm, the client is able to understand.
|
||||
schema:
|
||||
type: string
|
||||
description: Specifies that the query response in the body should be encoded with gzip or not encoded with identity.
|
||||
default: identity
|
||||
enum:
|
||||
- gzip
|
||||
- identity
|
||||
- in: header
|
||||
name: Content-Type
|
||||
schema:
|
||||
type: string
|
||||
enum:
|
||||
- application/vnd.influxql
|
||||
- in: query
|
||||
name: db
|
||||
schema:
|
||||
type: string
|
||||
required: true
|
||||
description: Bucket to query.
|
||||
- in: query
|
||||
name: rp
|
||||
schema:
|
||||
type: string
|
||||
description: Retention policy name.
|
||||
- in: query
|
||||
name: q
|
||||
description: Defines the influxql query to run.
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: Query results
|
||||
headers:
|
||||
Content-Encoding:
|
||||
description: The Content-Encoding entity header is used to compress the media-type. When present, its value indicates which encodings were applied to the entity-body
|
||||
schema:
|
||||
type: string
|
||||
description: Specifies that the response in the body is encoded with gzip or not encoded with identity.
|
||||
default: identity
|
||||
enum:
|
||||
- gzip
|
||||
- identity
|
||||
Trace-Id:
|
||||
description: The Trace-Id header reports the request's trace ID, if one was generated.
|
||||
schema:
|
||||
type: string
|
||||
description: Specifies the request's trace ID.
|
||||
content:
|
||||
application/csv:
|
||||
schema:
|
||||
$ref: '#/components/schemas/InfluxQLCSVResponse'
|
||||
text/csv:
|
||||
schema:
|
||||
$ref: '#/components/schemas/InfluxQLCSVResponse'
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/InfluxQLResponse'
|
||||
application/x-msgpack:
|
||||
schema:
|
||||
type: string
|
||||
format: binary
|
||||
'429':
|
||||
description: Token is temporarily over quota. The Retry-After header describes when to try the read again.
|
||||
headers:
|
||||
Retry-After:
|
||||
description: A non-negative decimal integer indicating the seconds to delay after the response is received.
|
||||
schema:
|
||||
type: integer
|
||||
format: int32
|
||||
default:
|
||||
description: Error processing query
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
components:
|
||||
parameters:
|
||||
TraceSpan:
|
||||
in: header
|
||||
name: Zap-Trace-Span
|
||||
description: OpenTracing span context
|
||||
example:
|
||||
trace_id: '1'
|
||||
span_id: '1'
|
||||
baggage:
|
||||
key: value
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
AuthUserV1:
|
||||
in: query
|
||||
name: u
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
description: Username.
|
||||
AuthPassV1:
|
||||
in: query
|
||||
name: p
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
description: User token.
|
||||
schemas:
|
||||
InfluxQLResponse:
|
||||
properties:
|
||||
results:
|
||||
type: array
|
||||
oneOf:
|
||||
- required:
|
||||
- statement_id
|
||||
- error
|
||||
- required:
|
||||
- statement_id
|
||||
- series
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
statement_id:
|
||||
type: integer
|
||||
error:
|
||||
type: string
|
||||
series:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
tags:
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: string
|
||||
partial:
|
||||
type: boolean
|
||||
columns:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
values:
|
||||
type: array
|
||||
items:
|
||||
type: array
|
||||
items: {}
|
||||
InfluxQLCSVResponse:
|
||||
type: string
|
||||
example: |
|
||||
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
|
||||
Error:
|
||||
properties:
|
||||
code:
|
||||
description: Code is the machine-readable error code.
|
||||
readOnly: true
|
||||
type: string
|
||||
enum:
|
||||
- internal error
|
||||
- not found
|
||||
- conflict
|
||||
- invalid
|
||||
- unprocessable entity
|
||||
- empty value
|
||||
- unavailable
|
||||
- forbidden
|
||||
- too many requests
|
||||
- unauthorized
|
||||
- method not allowed
|
||||
message:
|
||||
readOnly: true
|
||||
description: Message is a human-readable message.
|
||||
type: string
|
||||
required:
|
||||
- code
|
||||
- message
|
||||
LineProtocolError:
|
||||
properties:
|
||||
code:
|
||||
description: Code is the machine-readable error code.
|
||||
readOnly: true
|
||||
type: string
|
||||
enum:
|
||||
- internal error
|
||||
- not found
|
||||
- conflict
|
||||
- invalid
|
||||
- empty value
|
||||
- unavailable
|
||||
message:
|
||||
readOnly: true
|
||||
description: Message is a human-readable message.
|
||||
type: string
|
||||
op:
|
||||
readOnly: true
|
||||
description: Op describes the logical code operation during error. Useful for debugging.
|
||||
type: string
|
||||
err:
|
||||
readOnly: true
|
||||
description: Err is a stack of errors that occurred during processing of the request. Useful for debugging.
|
||||
type: string
|
||||
line:
|
||||
readOnly: true
|
||||
description: First line within sent body containing malformed data
|
||||
type: integer
|
||||
format: int32
|
||||
required:
|
||||
- code
|
||||
- message
|
||||
- op
|
||||
- err
|
||||
LineProtocolLengthError:
|
||||
properties:
|
||||
code:
|
||||
description: Code is the machine-readable error code.
|
||||
readOnly: true
|
||||
type: string
|
||||
enum:
|
||||
- invalid
|
||||
message:
|
||||
readOnly: true
|
||||
description: Message is a human-readable message.
|
||||
type: string
|
||||
maxLength:
|
||||
readOnly: true
|
||||
description: Max length in bytes for a body of line-protocol.
|
||||
type: integer
|
||||
format: int32
|
||||
required:
|
||||
- code
|
||||
- message
|
||||
- maxLength
|
||||
securitySchemes:
|
||||
TokenAuthentication:
|
||||
type: apiKey
|
||||
name: Authorization
|
||||
in: header
|
||||
description: |
|
||||
Use the [Token authentication](#section/Authentication/TokenAuthentication)
|
||||
scheme to authenticate to the InfluxDB API.
|
||||
|
||||
|
||||
In your API requests, send an `Authorization` header.
|
||||
For the header value, provide the word `Token` followed by a space and an InfluxDB API token.
|
||||
The word `Token` is case-sensitive.
|
||||
|
||||
|
||||
### Syntax
|
||||
|
||||
`Authorization: Token YOUR_INFLUX_TOKEN`
|
||||
|
||||
|
||||
For examples and more information, see the following:
|
||||
- [`/authorizations`](#tag/Authorizations) endpoint.
|
||||
- [Authorize API requests](/influxdb/cloud/api-guide/api_intro/#authentication).
|
||||
- [Manage API tokens](/influxdb/cloud/security/tokens/).
|
||||
BasicAuthentication:
|
||||
type: http
|
||||
scheme: basic
|
||||
description: |
|
||||
Use the HTTP [Basic authentication](#section/Authentication/BasicAuthentication)
|
||||
scheme with clients that support the InfluxDB 1.x convention of username and password (that don't support the `Authorization: Token` scheme):
|
||||
|
||||
|
||||
For examples and more information, see how to [authenticate with a username and password](/influxdb/cloud/reference/api/influxdb-1x/).
|
||||
QuerystringAuthentication:
|
||||
type: apiKey
|
||||
in: query
|
||||
name: u=&p=
|
||||
description: |
|
||||
Use the [Querystring authentication](#section/Authentication/QuerystringAuthentication)
|
||||
scheme with InfluxDB 1.x API parameters to provide credentials through the query string.
|
||||
|
||||
|
||||
For examples and more information, see how to [authenticate with a username and password](/influxdb/cloud/reference/api/influxdb-1x/).
|
||||
x-tagGroups:
|
||||
- name: Using the InfluxDB HTTP API
|
||||
tags:
|
||||
- Quick start
|
||||
- Authentication
|
||||
- Supported operations
|
||||
- Headers
|
||||
- Pagination
|
||||
- Response codes
|
||||
- Data I/O endpoints
|
||||
- Security and access endpoints
|
||||
- System information endpoints
|
||||
- name: All endpoints
|
||||
tags:
|
||||
- Query
|
||||
- Write
|
|
@ -287,16 +287,17 @@ function appendUrlSelector () {
|
|||
placeholderUrls.clustered,
|
||||
];
|
||||
|
||||
if (context() === 'cloud' || 'serverless') {
|
||||
var selectorText = 'InfluxDB Cloud Region';
|
||||
} else if (context() === 'dedicated') {
|
||||
var selectorText = 'Set Dedicated cluster URL';
|
||||
} else if (context() === 'clustered') {
|
||||
var selectorText = 'Set InfluxDB cluster URL';
|
||||
} else if (context() === 'oss/enterprise') {
|
||||
var selectorText = 'Change InfluxDB URL';
|
||||
} else {
|
||||
var selectorText = 'InfluxDB Cloud or OSS?';
|
||||
getBtnText = (context) => {
|
||||
contextText = {
|
||||
'oss/enterprise': 'Change InfluxDB URL',
|
||||
'cloud': 'InfluxDB Cloud Region',
|
||||
'serverless': 'InfluxDB Cloud Region',
|
||||
'dedicated': 'Set Dedicated cluster URL',
|
||||
'clustered': 'Set InfluxDB cluster URL',
|
||||
'other': 'InfluxDB Cloud or OSS?'
|
||||
}
|
||||
|
||||
return contextText[context]
|
||||
}
|
||||
|
||||
appendToUrls.forEach(function (url) {
|
||||
|
@ -305,7 +306,7 @@ function appendUrlSelector () {
|
|||
if (code.includes(url)) {
|
||||
$(this).after(
|
||||
"<div class='select-url'><a class='url-trigger' href='#'>" +
|
||||
selectorText +
|
||||
getBtnText(context()) +
|
||||
'</a></div>'
|
||||
);
|
||||
$('.select-url').fadeIn(400);
|
||||
|
|
|
@ -40,6 +40,7 @@ function getTabQueryParam () {
|
|||
|
||||
// Add query param to .keep-tab paginated navigation buttons to persist tab
|
||||
// selection when navigating between the pages.
|
||||
|
||||
function updateBtnURLs (tabId, op = 'update') {
|
||||
$('a.keep-tab').each(function () {
|
||||
var link = $(this)[0].href;
|
||||
|
@ -54,7 +55,7 @@ function updateBtnURLs (tabId, op = 'update') {
|
|||
}
|
||||
|
||||
function activateTabs (selector, tab) {
|
||||
const anchor = window.location.hash;
|
||||
var anchor = window.location.hash;
|
||||
if (tab !== '') {
|
||||
let targetTab = $(`${selector} a:contains("${tab}")`);
|
||||
if (!targetTab.length) {
|
||||
|
@ -71,25 +72,27 @@ function activateTabs (selector, tab) {
|
|||
scrollToAnchor(anchor);
|
||||
}
|
||||
}
|
||||
|
||||
const queryParams = new URLSearchParams(window.location.search);
|
||||
$(`${selector} p a`).click(function () {
|
||||
if ($(this).is(':not(":first-child")')) {
|
||||
queryParams.set('t', $(this).html());
|
||||
window.history.replaceState(
|
||||
{},
|
||||
'',
|
||||
`${location.pathname}?${queryParams}${anchor}`
|
||||
);
|
||||
updateBtnURLs($(this).html());
|
||||
} else {
|
||||
queryParams.delete('t');
|
||||
window.history.replaceState({}, '', `${location.pathname}${anchor}`);
|
||||
updateBtnURLs($(this).html(), 'delete');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(`.tabs p a, .code-tabs p a`).click(function () {
|
||||
var queryParams = new URLSearchParams(window.location.search);
|
||||
var anchor = window.location.hash;
|
||||
|
||||
if ($(this).is(':not(":first-child")')) {
|
||||
queryParams.set('t', $(this).html());
|
||||
window.history.replaceState(
|
||||
{},
|
||||
'',
|
||||
`${location.pathname}?${queryParams}${anchor}`
|
||||
);
|
||||
updateBtnURLs($(this).html());
|
||||
} else {
|
||||
queryParams.delete('t');
|
||||
window.history.replaceState({}, '', `${location.pathname}${anchor}`);
|
||||
updateBtnURLs($(this).html(), 'delete');
|
||||
}
|
||||
});
|
||||
|
||||
//////////////////// Activate Tab with Cookie or Query Param ///////////////////
|
||||
|
||||
tab = getTabQueryParam();
|
||||
|
|
19
compose.yaml
19
compose.yaml
|
@ -1,5 +1,5 @@
|
|||
# For examples, see the Awesome Compose repository:
|
||||
# https://github.com/docker/awesome-compose
|
||||
# This is a Docker Compose file for the InfluxData documentation site.
|
||||
## Run documentation tests for code samples.
|
||||
services:
|
||||
test:
|
||||
image: docs-v2-tests
|
||||
|
@ -19,3 +19,18 @@ services:
|
|||
args:
|
||||
- SOURCE_DIR=test
|
||||
- DOCKER_IMAGE=docs-v2-tests
|
||||
## Run InfluxData documentation with the hugo development server on port 1313.
|
||||
## For more information about the hugomods/hugo image, see
|
||||
## https://docker.hugomods.com/docs/development/docker-compose/
|
||||
local-dev:
|
||||
image: hugomods/hugo:exts-0.123.8
|
||||
command: hugo server --bind 0.0.0.0
|
||||
ports:
|
||||
- 1313:1313
|
||||
volumes:
|
||||
- type: bind
|
||||
source: "$PWD"
|
||||
target: /src
|
||||
- type: bind
|
||||
source: $HOME/hugo_cache
|
||||
target: /tmp/hugo_cache
|
||||
|
|
|
@ -238,8 +238,8 @@ Environment variable: `INFLUXDB_META_LEADER_LEASE_TIMEOUT`
|
|||
|
||||
Default is `"50ms"`.
|
||||
|
||||
The commit timeout is the amount of time a Raft node will tolerate between
|
||||
commands before issuing a heartbeat to tell the leader it is alive.
|
||||
The commit timeout is the interval that the leader waits between sending messages with
|
||||
the leader's commit index to followerers.
|
||||
The default setting should work for most systems.
|
||||
|
||||
Environment variable: `INFLUXDB_META_COMMIT_TIMEOUT`
|
||||
|
|
|
@ -55,7 +55,7 @@ Regardless of your certificate's type, InfluxDB Enterprise supports certificates
|
|||
a private key file (`.key`) and a signed certificate file (`.crt`) file pair, as well as certificates
|
||||
that combine the private key file and the signed certificate file into a single bundled file (`.pem`).
|
||||
|
||||
In general, each node node should have its own certificate, whether signed or unsiged.
|
||||
In general, each node node should have its own certificate, whether signed or unsigned.
|
||||
|
||||
## Set up HTTPS in an InfluxDB Enterprise cluster
|
||||
|
||||
|
|
|
@ -12,29 +12,34 @@ canonical: /influxdb/v2/tools/grafana/
|
|||
---
|
||||
|
||||
Use [Grafana](https://grafana.com/) or [Grafana Cloud](https://grafana.com/products/cloud/)
|
||||
to visualize data from your **InfluxDB Enterprise v1.8** instance.
|
||||
to visualize data from your **InfluxDB Enterprise** cluster.
|
||||
|
||||
{{% note %}}
|
||||
#### Required
|
||||
- The instructions in this guide require **Grafana Cloud** or **Grafana v7.1+**.
|
||||
- The instructions in this guide require **Grafana Cloud** or **Grafana v10.3+**.
|
||||
For information about using InfluxDB with other versions of Grafana,
|
||||
see the [Grafana documentation](https://grafana.com/docs/grafana/v7.0/features/datasources/influxdb/).
|
||||
- To use **Flux**, use **InfluxDB Enterprise 1.8.1+** and [enable Flux](/enterprise_influxdb/v1/flux/installation/)
|
||||
in your InfluxDB data node configuration file.
|
||||
see the [Grafana documentation](https://grafana.com/docs/grafana/latest/datasources/influxdb/).
|
||||
- To use **Flux**, use **InfluxDB 1.8.1+** and [enable Flux](/influxdb/v1/flux/installation/)
|
||||
in your InfluxDB configuration file.
|
||||
{{% /note %}}
|
||||
|
||||
1. [Set up an InfluxDB Enterprise cluster](/enterprise_influxdb/v1/introduction/installation/).
|
||||
2. [Sign up for Grafana Cloud](https://grafana.com/products/cloud/) or
|
||||
[download and install Grafana](https://grafana.com/grafana/download).
|
||||
3. Visit your **Grafana Cloud user interface** (UI) or, if running Grafana locally,
|
||||
[start Grafana](https://grafana.com/docs/grafana/latest/installation/) and visit
|
||||
`http://localhost:3000` in your browser.
|
||||
4. In the left navigation of the Grafana UI, hover over the gear
|
||||
icon to expand the **Configuration** section. Click **Data Sources**.
|
||||
5. Click **Add data source**.
|
||||
6. Select **InfluxDB** from the list of available data sources.
|
||||
7. On the **Data Source configuration page**, enter a **name** for your InfluxDB data source.
|
||||
8. Under **Query Language**, select one of the following:
|
||||
1. [Set up an InfluxDB Enterprise cluster](/enterprise_influxdb/v1/introduction/installation/).
|
||||
2. [Sign up for Grafana Cloud](https://grafana.com/products/cloud/) or
|
||||
[download and install Grafana](https://grafana.com/grafana/download).
|
||||
3. Visit your **Grafana Cloud user interface** (UI) or, if running Grafana locally,
|
||||
[start Grafana](https://grafana.com/docs/grafana/latest/installation/) and visit
|
||||
<http://localhost:3000> in your browser.
|
||||
4. In the left navigation of the Grafana UI, expand the **Connections** section
|
||||
and click **Add new connection**.
|
||||
5. Select **InfluxDB** from the list of available data sources and click
|
||||
**Add data source**.
|
||||
6. On the **Data Source configuration page**, enter a **name** for your InfluxDB data source.
|
||||
7. In the **Query Language** drop-down menu, select one of the query languages
|
||||
supported by InfluxDB {{< current-version >}} (InfluxQL or Flux):
|
||||
|
||||
{{% note %}}
|
||||
SQL is only supported in InfluxDB v3.
|
||||
{{% /note %}}
|
||||
|
||||
{{< tabs-wrapper >}}
|
||||
{{% tabs %}}
|
||||
|
@ -52,25 +57,25 @@ With **InfluxQL** selected as the query language in your InfluxDB data source se
|
|||
- **URL**: Your **InfluxDB Enterprise URL** or **load balancer URL**.
|
||||
|
||||
```sh
|
||||
http://localhost:8086/
|
||||
http://localhost:8086
|
||||
```
|
||||
- **Access**: Server (default)
|
||||
|
||||
2. Under **InfluxDB Details**, enter the following:
|
||||
|
||||
- **Database**: your database name
|
||||
- **User**: your InfluxDB Enterprise username _(if [authentication is enabled](/enterprise_influxdb/v1/administration/authentication_and_authorization/))_
|
||||
- **Password**: your InfluxDB Enterprise password _(if [authentication is enabled](/enterprise_influxdb/v1/administration/authentication_and_authorization/))_
|
||||
- **HTTP Method**: select **GET** or **POST** _(for differences between the two,
|
||||
- **User**: your InfluxDB username _(if [authentication is enabled](/enterprise_influxdb/v1/administration/authentication_and_authorization/))_
|
||||
- **Password**: your InfluxDB password _(if [authentication is enabled](/enterprise_influxdb/v1/administration/authentication_and_authorization/))_
|
||||
- **HTTP Method**: Select **GET** or **POST** _(for differences between the two,
|
||||
see the [query HTTP endpoint documentation](/enterprise_influxdb/v1/tools/api/#query-http-endpoint))_
|
||||
|
||||
3. Provide a **[Min time interval](https://grafana.com/docs/grafana/latest/datasources/influxdb/#min-time-interval)**
|
||||
(default is 10s).
|
||||
|
||||
{{< img-hd src="/img/enterprise/1-7-tools-grafana-influxql.png" />}}
|
||||
{{< img-hd src="/img/influxdb/v1-tools-grafana-influxql.png" />}}
|
||||
|
||||
4. Click **Save & Test**. Grafana attempts to connect to InfluxDB Enterprise and returns
|
||||
4. Click **Save & Test**. Grafana attempts to connect to InfluxDB and returns
|
||||
the result of the test.
|
||||
|
||||
{{% /tab-content %}}
|
||||
<!---------------------------- END INFLUXQL CONTENT --------------------------->
|
||||
<!----------------------------- BEGIN FLUX CONTENT ---------------------------->
|
||||
|
@ -80,18 +85,22 @@ With **InfluxQL** selected as the query language in your InfluxDB data source se
|
|||
With **Flux** selected as the query language in your InfluxDB data source,
|
||||
configure your InfluxDB connection:
|
||||
|
||||
1. Ensure [Flux is enabled](/enterprise_influxdb/v1/flux/installation/) in InfluxDB Enterprise data nodes.
|
||||
1. Ensure [Flux is enabled](/enterprise_influxdb/v1/flux/installation/) in
|
||||
your InfluxDB Enterprise data nodes.
|
||||
|
||||
2. Under **Connection**, enter the following:
|
||||
2. Under **HTTP**, enter the following:
|
||||
|
||||
- **URL**: Your **InfluxDB Enterprise URL** or **load balancer URL**.
|
||||
|
||||
```sh
|
||||
http://localhost:8086/
|
||||
http://localhost:8086
|
||||
```
|
||||
|
||||
3. Under **InfluxDB Details**, enter the following:
|
||||
|
||||
- **Organization**: Provide an arbitrary value.
|
||||
- **Token**: Provide your InfluxDB Enterprise username and password using the following syntax:
|
||||
- **Token**: If [InfluxDB authentication is enabled](/enterprise_influxdb/v1/administration/authentication_and_authorization/),
|
||||
provide your InfluxDB username and password using the following syntax:
|
||||
|
||||
```sh
|
||||
# Syntax
|
||||
|
@ -101,9 +110,7 @@ configure your InfluxDB connection:
|
|||
johndoe:mY5uP3rS3crE7pA5Sw0Rd
|
||||
```
|
||||
|
||||
We recommend [enabling authentication](/enterprise_influxdb/v1/administration/authentication_and_authorization/)
|
||||
on all InfluxDB Enterprise clusters. If you choose to leave authentication disabled,
|
||||
leave this field blank.
|
||||
If authentication is not enabled, leave blank.
|
||||
|
||||
- **Default Bucket**: Provide a default database and retention policy combination
|
||||
using the following syntax:
|
||||
|
@ -119,9 +126,9 @@ configure your InfluxDB connection:
|
|||
|
||||
- **Min time interval**: [Grafana minimum time interval](https://grafana.com/docs/grafana/latest/features/datasources/influxdb/#min-time-interval).
|
||||
|
||||
{{< img-hd src="/img/enterprise/1-8-tools-grafana-flux.png" />}}
|
||||
{{< img-hd src="/img/influxdb/v1-tools-grafana-flux.png" />}}
|
||||
|
||||
3. Click **Save & Test**. Grafana attempts to connect to InfluxDB Enterprise and returns
|
||||
3. Click **Save & Test**. Grafana attempts to connect to InfluxDB and returns
|
||||
the result of the test.
|
||||
{{% /tab-content %}}
|
||||
<!------------------------------ END FLUX CONTENT ----------------------------->
|
||||
|
|
|
@ -40,7 +40,9 @@ Neither input array is mutated and a new array is returned.
|
|||
(<-arr: [A], v: [A]) => [A]
|
||||
```
|
||||
|
||||
{{% caption %}}For more information, see [Function type signatures](/flux/v0/function-type-signatures/).{{% /caption %}}
|
||||
{{% caption %}}
|
||||
For more information, see [Function type signatures](/flux/v0/function-type-signatures/).
|
||||
{{% /caption %}}
|
||||
|
||||
## Parameters
|
||||
|
||||
|
|
|
@ -40,7 +40,9 @@ a new array with only elements that match the predicate.
|
|||
(<-arr: [A], fn: (x: A) => bool) => [A]
|
||||
```
|
||||
|
||||
{{% caption %}}For more information, see [Function type signatures](/flux/v0/function-type-signatures/).{{% /caption %}}
|
||||
{{% caption %}}
|
||||
For more information, see [Function type signatures](/flux/v0/function-type-signatures/).
|
||||
{{% /caption %}}
|
||||
|
||||
## Parameters
|
||||
|
||||
|
|
|
@ -38,7 +38,9 @@ records must have the same keys and data types.
|
|||
(<-rows: [A]) => stream[A] where A: Record
|
||||
```
|
||||
|
||||
{{% caption %}}For more information, see [Function type signatures](/flux/v0/function-type-signatures/).{{% /caption %}}
|
||||
{{% caption %}}
|
||||
For more information, see [Function type signatures](/flux/v0/function-type-signatures/).
|
||||
{{% /caption %}}
|
||||
|
||||
## Parameters
|
||||
|
||||
|
|
|
@ -40,7 +40,9 @@ and then returns a new array.
|
|||
(<-arr: [A], fn: (x: A) => B) => [B]
|
||||
```
|
||||
|
||||
{{% caption %}}For more information, see [Function type signatures](/flux/v0/function-type-signatures/).{{% /caption %}}
|
||||
{{% caption %}}
|
||||
For more information, see [Function type signatures](/flux/v0/function-type-signatures/).
|
||||
{{% /caption %}}
|
||||
|
||||
## Parameters
|
||||
|
||||
|
|
|
@ -36,7 +36,9 @@ Fluxdoc syntax: https://github.com/influxdata/flux/blob/master/docs/fluxdoc.md
|
|||
(a: int, b: int) => int
|
||||
```
|
||||
|
||||
{{% caption %}}For more information, see [Function type signatures](/flux/v0/function-type-signatures/).{{% /caption %}}
|
||||
{{% caption %}}
|
||||
For more information, see [Function type signatures](/flux/v0/function-type-signatures/).
|
||||
{{% /caption %}}
|
||||
|
||||
## Parameters
|
||||
|
||||
|
|
|
@ -38,7 +38,9 @@ Both `a` and `b` are integers.
|
|||
(a: int, b: int) => int
|
||||
```
|
||||
|
||||
{{% caption %}}For more information, see [Function type signatures](/flux/v0/function-type-signatures/).{{% /caption %}}
|
||||
{{% caption %}}
|
||||
For more information, see [Function type signatures](/flux/v0/function-type-signatures/).
|
||||
{{% /caption %}}
|
||||
|
||||
## Parameters
|
||||
|
||||
|
|
|
@ -38,7 +38,9 @@ Both `a` and `b` are integers.
|
|||
(a: int, b: int) => int
|
||||
```
|
||||
|
||||
{{% caption %}}For more information, see [Function type signatures](/flux/v0/function-type-signatures/).{{% /caption %}}
|
||||
{{% caption %}}
|
||||
For more information, see [Function type signatures](/flux/v0/function-type-signatures/).
|
||||
{{% /caption %}}
|
||||
|
||||
## Parameters
|
||||
|
||||
|
|
|
@ -36,7 +36,9 @@ Fluxdoc syntax: https://github.com/influxdata/flux/blob/master/docs/fluxdoc.md
|
|||
(a: int) => int
|
||||
```
|
||||
|
||||
{{% caption %}}For more information, see [Function type signatures](/flux/v0/function-type-signatures/).{{% /caption %}}
|
||||
{{% caption %}}
|
||||
For more information, see [Function type signatures](/flux/v0/function-type-signatures/).
|
||||
{{% /caption %}}
|
||||
|
||||
## Parameters
|
||||
|
||||
|
|
|
@ -36,7 +36,9 @@ Fluxdoc syntax: https://github.com/influxdata/flux/blob/master/docs/fluxdoc.md
|
|||
(a: int, b: int) => int
|
||||
```
|
||||
|
||||
{{% caption %}}For more information, see [Function type signatures](/flux/v0/function-type-signatures/).{{% /caption %}}
|
||||
{{% caption %}}
|
||||
For more information, see [Function type signatures](/flux/v0/function-type-signatures/).
|
||||
{{% /caption %}}
|
||||
|
||||
## Parameters
|
||||
|
||||
|
|
|
@ -38,7 +38,9 @@ Both `a` and `b` are integers.
|
|||
(a: int, b: int) => int
|
||||
```
|
||||
|
||||
{{% caption %}}For more information, see [Function type signatures](/flux/v0/function-type-signatures/).{{% /caption %}}
|
||||
{{% caption %}}
|
||||
For more information, see [Function type signatures](/flux/v0/function-type-signatures/).
|
||||
{{% /caption %}}
|
||||
|
||||
## Parameters
|
||||
|
||||
|
|
|
@ -36,7 +36,9 @@ Fluxdoc syntax: https://github.com/influxdata/flux/blob/master/docs/fluxdoc.md
|
|||
(a: int, b: int) => int
|
||||
```
|
||||
|
||||
{{% caption %}}For more information, see [Function type signatures](/flux/v0/function-type-signatures/).{{% /caption %}}
|
||||
{{% caption %}}
|
||||
For more information, see [Function type signatures](/flux/v0/function-type-signatures/).
|
||||
{{% /caption %}}
|
||||
|
||||
## Parameters
|
||||
|
||||
|
|
|
@ -36,7 +36,9 @@ Fluxdoc syntax: https://github.com/influxdata/flux/blob/master/docs/fluxdoc.md
|
|||
(a: uint, b: uint) => uint
|
||||
```
|
||||
|
||||
{{% caption %}}For more information, see [Function type signatures](/flux/v0/function-type-signatures/).{{% /caption %}}
|
||||
{{% caption %}}
|
||||
For more information, see [Function type signatures](/flux/v0/function-type-signatures/).
|
||||
{{% /caption %}}
|
||||
|
||||
## Parameters
|
||||
|
||||
|
|
|
@ -36,7 +36,9 @@ Fluxdoc syntax: https://github.com/influxdata/flux/blob/master/docs/fluxdoc.md
|
|||
(a: uint, b: uint) => uint
|
||||
```
|
||||
|
||||
{{% caption %}}For more information, see [Function type signatures](/flux/v0/function-type-signatures/).{{% /caption %}}
|
||||
{{% caption %}}
|
||||
For more information, see [Function type signatures](/flux/v0/function-type-signatures/).
|
||||
{{% /caption %}}
|
||||
|
||||
## Parameters
|
||||
|
||||
|
|
|
@ -38,7 +38,9 @@ Both `a` and `b` are unsigned integers.
|
|||
(a: uint, b: uint) => uint
|
||||
```
|
||||
|
||||
{{% caption %}}For more information, see [Function type signatures](/flux/v0/function-type-signatures/).{{% /caption %}}
|
||||
{{% caption %}}
|
||||
For more information, see [Function type signatures](/flux/v0/function-type-signatures/).
|
||||
{{% /caption %}}
|
||||
|
||||
## Parameters
|
||||
|
||||
|
|
|
@ -36,7 +36,9 @@ Fluxdoc syntax: https://github.com/influxdata/flux/blob/master/docs/fluxdoc.md
|
|||
(a: uint) => uint
|
||||
```
|
||||
|
||||
{{% caption %}}For more information, see [Function type signatures](/flux/v0/function-type-signatures/).{{% /caption %}}
|
||||
{{% caption %}}
|
||||
For more information, see [Function type signatures](/flux/v0/function-type-signatures/).
|
||||
{{% /caption %}}
|
||||
|
||||
## Parameters
|
||||
|
||||
|
|
|
@ -36,7 +36,9 @@ Fluxdoc syntax: https://github.com/influxdata/flux/blob/master/docs/fluxdoc.md
|
|||
(a: uint, b: uint) => uint
|
||||
```
|
||||
|
||||
{{% caption %}}For more information, see [Function type signatures](/flux/v0/function-type-signatures/).{{% /caption %}}
|
||||
{{% caption %}}
|
||||
For more information, see [Function type signatures](/flux/v0/function-type-signatures/).
|
||||
{{% /caption %}}
|
||||
|
||||
## Parameters
|
||||
|
||||
|
|
|
@ -38,7 +38,9 @@ Both `a` and `b` are unsigned integers.
|
|||
(a: uint, b: uint) => uint
|
||||
```
|
||||
|
||||
{{% caption %}}For more information, see [Function type signatures](/flux/v0/function-type-signatures/).{{% /caption %}}
|
||||
{{% caption %}}
|
||||
For more information, see [Function type signatures](/flux/v0/function-type-signatures/).
|
||||
{{% /caption %}}
|
||||
|
||||
## Parameters
|
||||
|
||||
|
|
|
@ -36,7 +36,9 @@ Fluxdoc syntax: https://github.com/influxdata/flux/blob/master/docs/fluxdoc.md
|
|||
(a: uint, b: uint) => uint
|
||||
```
|
||||
|
||||
{{% caption %}}For more information, see [Function type signatures](/flux/v0/function-type-signatures/).{{% /caption %}}
|
||||
{{% caption %}}
|
||||
For more information, see [Function type signatures](/flux/v0/function-type-signatures/).
|
||||
{{% /caption %}}
|
||||
|
||||
## Parameters
|
||||
|
||||
|
|
|
@ -42,7 +42,9 @@ Fluxdoc syntax: https://github.com/influxdata/flux/blob/master/docs/fluxdoc.md
|
|||
) => stream[F] where A: Equatable, B: Equatable, D: Equatable, E: Equatable, F: Record
|
||||
```
|
||||
|
||||
{{% caption %}}For more information, see [Function type signatures](/flux/v0/function-type-signatures/).{{% /caption %}}
|
||||
{{% caption %}}
|
||||
For more information, see [Function type signatures](/flux/v0/function-type-signatures/).
|
||||
{{% /caption %}}
|
||||
|
||||
## Parameters
|
||||
|
||||
|
|
|
@ -42,7 +42,9 @@ Output data is grouped by `_time` and includes the following columns of interest
|
|||
(<-table: stream[B], ?threshold: A) => stream[{C with level: string, _value_diff_med: D, _value_diff: D, _value: D}] where A: Comparable + Equatable, B: Record, D: Comparable + Divisible + Equatable
|
||||
```
|
||||
|
||||
{{% caption %}}For more information, see [Function type signatures](/flux/v0/function-type-signatures/).{{% /caption %}}
|
||||
{{% caption %}}
|
||||
For more information, see [Function type signatures](/flux/v0/function-type-signatures/).
|
||||
{{% /caption %}}
|
||||
|
||||
## Parameters
|
||||
|
||||
|
|
|
@ -64,7 +64,9 @@ Output data includes the following columns:
|
|||
}] where A: Record, D: Divisible + Subtractable
|
||||
```
|
||||
|
||||
{{% caption %}}For more information, see [Function type signatures](/flux/v0/function-type-signatures/).{{% /caption %}}
|
||||
{{% caption %}}
|
||||
For more information, see [Function type signatures](/flux/v0/function-type-signatures/).
|
||||
{{% /caption %}}
|
||||
|
||||
## Parameters
|
||||
|
||||
|
|
|
@ -53,7 +53,9 @@ Fluxdoc syntax: https://github.com/influxdata/flux/blob/master/docs/fluxdoc.md
|
|||
) => int
|
||||
```
|
||||
|
||||
{{% caption %}}For more information, see [Function type signatures](/flux/v0/function-type-signatures/).{{% /caption %}}
|
||||
{{% caption %}}
|
||||
For more information, see [Function type signatures](/flux/v0/function-type-signatures/).
|
||||
{{% /caption %}}
|
||||
|
||||
## Parameters
|
||||
|
||||
|
|
|
@ -80,7 +80,9 @@ For more information, see `alerta.alert()` parameters.
|
|||
) => (<-tables: stream[C]) => stream[{C with _sent: string}]
|
||||
```
|
||||
|
||||
{{% caption %}}For more information, see [Function type signatures](/flux/v0/function-type-signatures/).{{% /caption %}}
|
||||
{{% caption %}}
|
||||
For more information, see [Function type signatures](/flux/v0/function-type-signatures/).
|
||||
{{% /caption %}}
|
||||
|
||||
## Parameters
|
||||
|
||||
|
|
|
@ -37,7 +37,9 @@ Fluxdoc syntax: https://github.com/influxdata/flux/blob/master/docs/fluxdoc.md
|
|||
(v: string) => bytes
|
||||
```
|
||||
|
||||
{{% caption %}}For more information, see [Function type signatures](/flux/v0/function-type-signatures/).{{% /caption %}}
|
||||
{{% caption %}}
|
||||
For more information, see [Function type signatures](/flux/v0/function-type-signatures/).
|
||||
{{% /caption %}}
|
||||
|
||||
## Parameters
|
||||
|
||||
|
|
|
@ -37,7 +37,9 @@ Fluxdoc syntax: https://github.com/influxdata/flux/blob/master/docs/fluxdoc.md
|
|||
(v: string) => int
|
||||
```
|
||||
|
||||
{{% caption %}}For more information, see [Function type signatures](/flux/v0/function-type-signatures/).{{% /caption %}}
|
||||
{{% caption %}}
|
||||
For more information, see [Function type signatures](/flux/v0/function-type-signatures/).
|
||||
{{% /caption %}}
|
||||
|
||||
## Parameters
|
||||
|
||||
|
|
|
@ -38,7 +38,9 @@ types to hexadecimal lowercase characters.
|
|||
(v: A) => string
|
||||
```
|
||||
|
||||
{{% caption %}}For more information, see [Function type signatures](/flux/v0/function-type-signatures/).{{% /caption %}}
|
||||
{{% caption %}}
|
||||
For more information, see [Function type signatures](/flux/v0/function-type-signatures/).
|
||||
{{% /caption %}}
|
||||
|
||||
## Parameters
|
||||
|
||||
|
|
|
@ -37,7 +37,9 @@ Fluxdoc syntax: https://github.com/influxdata/flux/blob/master/docs/fluxdoc.md
|
|||
(v: string) => uint
|
||||
```
|
||||
|
||||
{{% caption %}}For more information, see [Function type signatures](/flux/v0/function-type-signatures/).{{% /caption %}}
|
||||
{{% caption %}}
|
||||
For more information, see [Function type signatures](/flux/v0/function-type-signatures/).
|
||||
{{% /caption %}}
|
||||
|
||||
## Parameters
|
||||
|
||||
|
|
|
@ -75,7 +75,9 @@ For more information, see `servicenow.event()` parameters.
|
|||
) => (<-tables: stream[B]) => stream[{B with _sent: string}] where J: Equatable
|
||||
```
|
||||
|
||||
{{% caption %}}For more information, see [Function type signatures](/flux/v0/function-type-signatures/).{{% /caption %}}
|
||||
{{% caption %}}
|
||||
For more information, see [Function type signatures](/flux/v0/function-type-signatures/).
|
||||
{{% /caption %}}
|
||||
|
||||
## Parameters
|
||||
|
||||
|
|
|
@ -51,7 +51,9 @@ ServiceNow Event API fields are described in
|
|||
) => int where B: Equatable, C: Equatable
|
||||
```
|
||||
|
||||
{{% caption %}}For more information, see [Function type signatures](/flux/v0/function-type-signatures/).{{% /caption %}}
|
||||
{{% caption %}}
|
||||
For more information, see [Function type signatures](/flux/v0/function-type-signatures/).
|
||||
{{% /caption %}}
|
||||
|
||||
## Parameters
|
||||
|
||||
|
|
|
@ -80,7 +80,9 @@ TICKscript [`alert()`](/kapacitor/v1/reference/nodes/alert_node/).
|
|||
}] where E: Record, I: Record, M: Record
|
||||
```
|
||||
|
||||
{{% caption %}}For more information, see [Function type signatures](/flux/v0/function-type-signatures/).{{% /caption %}}
|
||||
{{% caption %}}
|
||||
For more information, see [Function type signatures](/flux/v0/function-type-signatures/).
|
||||
{{% /caption %}}
|
||||
|
||||
## Parameters
|
||||
|
||||
|
|
|
@ -39,7 +39,9 @@ optionally applies an aggregate or selector function.
|
|||
(<-tables: B, as: string, ?column: A, ?fn: (<-: B, column: A) => stream[C]) => stream[D] where A: Equatable, C: Record, D: Record
|
||||
```
|
||||
|
||||
{{% caption %}}For more information, see [Function type signatures](/flux/v0/function-type-signatures/).{{% /caption %}}
|
||||
{{% caption %}}
|
||||
For more information, see [Function type signatures](/flux/v0/function-type-signatures/).
|
||||
{{% /caption %}}
|
||||
|
||||
## Parameters
|
||||
|
||||
|
|
|
@ -79,7 +79,9 @@ This function is comparable to [Kapacitor AlertNode deadman](/kapacitor/latest/n
|
|||
}] where E: Record, F: Record, L: Comparable + Equatable, M: Record
|
||||
```
|
||||
|
||||
{{% caption %}}For more information, see [Function type signatures](/flux/v0/function-type-signatures/).{{% /caption %}}
|
||||
{{% caption %}}
|
||||
For more information, see [Function type signatures](/flux/v0/function-type-signatures/).
|
||||
{{% /caption %}}
|
||||
|
||||
## Parameters
|
||||
|
||||
|
|
|
@ -36,7 +36,9 @@ Fluxdoc syntax: https://github.com/influxdata/flux/blob/master/docs/fluxdoc.md
|
|||
(id: A, name: B, ?type: C) => {tags: {}, _type: C, _check_name: B, _check_id: A}
|
||||
```
|
||||
|
||||
{{% caption %}}For more information, see [Function type signatures](/flux/v0/function-type-signatures/).{{% /caption %}}
|
||||
{{% caption %}}
|
||||
For more information, see [Function type signatures](/flux/v0/function-type-signatures/).
|
||||
{{% /caption %}}
|
||||
|
||||
## Parameters
|
||||
|
||||
|
|
|
@ -39,7 +39,9 @@ This function is comparable to [Kapacitor QueryNode .groupBy](/kapacitor/latest/
|
|||
(<-tables: stream[A], columns: [string]) => stream[A] where A: Record
|
||||
```
|
||||
|
||||
{{% caption %}}For more information, see [Function type signatures](/flux/v0/function-type-signatures/).{{% /caption %}}
|
||||
{{% caption %}}
|
||||
For more information, see [Function type signatures](/flux/v0/function-type-signatures/).
|
||||
{{% /caption %}}
|
||||
|
||||
## Parameters
|
||||
|
||||
|
|
|
@ -39,7 +39,9 @@ This function is comparable to [Kapacitor JoinNode](/kapacitor/latest/nodes/join
|
|||
(measurement: A, tables: B, ?on: [string]) => stream[{C with _measurement: A}] where B: Record, C: Record
|
||||
```
|
||||
|
||||
{{% caption %}}For more information, see [Function type signatures](/flux/v0/function-type-signatures/).{{% /caption %}}
|
||||
{{% caption %}}
|
||||
For more information, see [Function type signatures](/flux/v0/function-type-signatures/).
|
||||
{{% /caption %}}
|
||||
|
||||
## Parameters
|
||||
|
||||
|
|
|
@ -49,7 +49,9 @@ query("SELECT f(x) AS y")
|
|||
(<-tables: B, as: string, ?column: A, ?fn: (<-: B, column: A) => stream[C]) => stream[D] where A: Equatable, C: Record, D: Record
|
||||
```
|
||||
|
||||
{{% caption %}}For more information, see [Function type signatures](/flux/v0/function-type-signatures/).{{% /caption %}}
|
||||
{{% caption %}}
|
||||
For more information, see [Function type signatures](/flux/v0/function-type-signatures/).
|
||||
{{% /caption %}}
|
||||
|
||||
## Parameters
|
||||
|
||||
|
|
|
@ -53,7 +53,9 @@ query("SELECT f(x) AS y")
|
|||
) => stream[E] where B: Record, C: Record, D: Record, E: Record
|
||||
```
|
||||
|
||||
{{% caption %}}For more information, see [Function type signatures](/flux/v0/function-type-signatures/).{{% /caption %}}
|
||||
{{% caption %}}
|
||||
For more information, see [Function type signatures](/flux/v0/function-type-signatures/).
|
||||
{{% /caption %}}
|
||||
|
||||
## Parameters
|
||||
|
||||
|
|
|
@ -45,7 +45,9 @@ Fluxdoc syntax: https://github.com/influxdata/flux/blob/master/docs/fluxdoc.md
|
|||
) => int
|
||||
```
|
||||
|
||||
{{% caption %}}For more information, see [Function type signatures](/flux/v0/function-type-signatures/).{{% /caption %}}
|
||||
{{% caption %}}
|
||||
For more information, see [Function type signatures](/flux/v0/function-type-signatures/).
|
||||
{{% /caption %}}
|
||||
|
||||
## Parameters
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue