59 lines
2.3 KiB
YAML
59 lines
2.3 KiB
YAML
TokenAuthentication:
|
|
type: http
|
|
scheme: token
|
|
bearerFormat: InfluxDB Token String
|
|
description: |
|
|
### Token authentication scheme
|
|
|
|
InfluxDB API tokens ensure secure interaction between users and data. A token belongs to an organization and identifies InfluxDB permissions within the organization.
|
|
|
|
Include your API token in an `Authorization: Token YOUR_API_TOKEN` HTTP header with each request.
|
|
|
|
### Example
|
|
|
|
`curl http://localhost:8086/ping
|
|
--header "Authorization: Token YOUR_API_TOKEN"`
|
|
|
|
For more information and examples, see the following:
|
|
- [Use tokens in API requests](https://docs.influxdata.com/influxdb/v2.0/api-guide/api_intro/#authentication).
|
|
- [Manage API tokens](https://docs.influxdata.com/influxdb/v2.0/security/tokens).
|
|
- [`/authorizations`](#tag/Authorizations) endpoint.
|
|
BasicAuthentication:
|
|
type: http
|
|
scheme: basic
|
|
description: |
|
|
### Basic authentication scheme
|
|
|
|
Use HTTP Basic Auth with clients that support the InfluxDB 1.x convention of username and password (that don't support the `Authorization: Token` scheme).
|
|
|
|
Username and password schemes require the following credentials:
|
|
- **username**: 1.x username (this is separate from the UI login username)
|
|
- **password**: 1.x password or InfluxDB API token
|
|
|
|
### Example
|
|
|
|
`curl --get "http://localhost:8086/query"
|
|
--user "YOUR_1.x_USERNAME":"YOUR_TOKEN_OR_PASSWORD"`
|
|
|
|
For more information and examples, see how to [authenticate with a username and password scheme](https://docs.influxdata.com/influxdb/v2.0/reference/api/influxdb-1x/)
|
|
QuerystringAuthentication:
|
|
type: apiKey
|
|
in: query
|
|
name: u=&p=
|
|
description: |
|
|
### Querystring authentication scheme
|
|
|
|
Use InfluxDB 1.x API parameters to provide credentials through the query string.
|
|
|
|
Username and password schemes require the following credentials:
|
|
- **username**: 1.x username (this is separate from the UI login username)
|
|
- **password**: 1.x password or InfluxDB API token
|
|
|
|
### Example
|
|
|
|
`curl --get "http://localhost:8086/query"
|
|
--data-urlencode "u=YOUR_1.x_USERNAME"
|
|
--data-urlencode "p=YOUR_TOKEN_OR_PASSWORD"`
|
|
|
|
For more information and examples, see how to [authenticate with a username and password scheme](https://docs.influxdata.com/influxdb/v2.0/reference/api/influxdb-1x/)
|