InfluxData Security and access endpoints API

The Security and access endpoints API from InfluxData — 16 operation(s) for security and access endpoints.

OpenAPI Specification

influxdata-security-and-access-endpoints-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: InfluxDB Cloud API Service Authorizations (API tokens) Authorizations (API tokens) Security and access endpoints API
  version: 2.0.1
  description: 'The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.

    '
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
- url: /api/v2
security:
- TokenAuthentication: []
tags:
- name: Security and access endpoints
paths:
  /signin:
    post:
      operationId: PostSignin
      summary: Create a user session.
      description: "Authenticates [Basic authentication credentials](#section/Authentication/BasicAuthentication)\nfor a [user](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#user),\nand then, if successful, generates a user session.\n\nTo authenticate a user, pass the HTTP `Authorization` header with the\n`Basic` scheme and the base64-encoded username and password.\nFor syntax and more information, see [Basic Authentication](#section/Authentication/BasicAuthentication) for\nsyntax and more information.\n\nIf authentication is successful, InfluxDB creates a new session for the user\nand then returns the session cookie in the `Set-Cookie` response header.\n\nInfluxDB stores user sessions in memory only.\nThey expire within ten minutes and during restarts of the InfluxDB instance.\n\n#### User sessions with authorizations\n\n- In InfluxDB Cloud, a user session inherits all the user's permissions for\n  the organization.\n- In InfluxDB OSS, a user session inherits all the user's permissions for all\n  the organizations that the user belongs to.\n\n#### Related endpoints\n\n- [Signout](#tag/Signout)\n"
      tags:
      - Security and access endpoints
      security:
      - BasicAuthentication: []
      parameters:
      - $ref: '#/components/parameters/TraceSpan'
      responses:
        '204':
          description: 'Success.

            The user is authenticated.

            The `Set-Cookie` response header contains the session cookie.

            '
        '401':
          description: 'Unauthorized.

            This error may be caused by one of the following problems:


            - The user doesn''t have access.

            - The user passed incorrect credentials in the request.

            - The credentials are formatted incorrectly in the request.

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden. The user account is disabled.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: Unsuccessful authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
      - lang: Shell
        label: 'cURL: signin with --user option encoding'
        source: "curl --request POST http://localhost:8086/api/v2/signin \\\n     --user \"USERNAME:PASSWORD\"\n"
  /signout:
    post:
      operationId: PostSignout
      summary: Expire a user session
      tags:
      - Security and access endpoints
      description: "Expires a user session specified by a session cookie.\n\nUse this endpoint to expire a user session that was generated when the user\nauthenticated with the InfluxDB Developer Console (UI) or the `POST /api/v2/signin` endpoint.\n\nFor example, the `POST /api/v2/signout` endpoint represents the third step\nin the following three-step process\nto authenticate a user, retrieve the `user` resource, and then expire the session:\n\n1. Send a request with the user's [Basic authentication credentials](#section/Authentication/BasicAuthentication)\n   to the `POST /api/v2/signin` endpoint to create a user session and\n   generate a session cookie.\n2. Send a request to the `GET /api/v2/me` endpoint, passing the stored session cookie\n   from step 1 to retrieve user information.\n3. Send a request to the `POST /api/v2/signout` endpoint, passing the stored session\n   cookie to expire the session.\n\n_See the complete example in request samples._\n\nInfluxDB stores user sessions in memory only.\nIf a user doesn't sign out, then the user session automatically expires within ten minutes or\nduring a restart of the InfluxDB instance.\n\nTo learn more about cookies in HTTP requests, see\n[Mozilla Developer Network (MDN) Web Docs, HTTP cookies](https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies).\n\n#### Related endpoints\n\n- [Signin](#tag/Signin)\n"
      parameters:
      - $ref: '#/components/parameters/TraceSpan'
      responses:
        '204':
          description: Success. The session is expired.
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: The session expiry is unsuccessful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
      - lang: Shell
        label: 'cURL: sign in a user, verify the user session, and then end the session'
        source: "# The following example shows how to use cURL and the InfluxDB API\n# to do the following:\n# 1. Sign in a user with a username and password.\n# 2. Check that the user session exists for the user.\n# 3. Sign out the user to expire the session.\n# 4. Check that the session is no longer active.\n\n# 1. Send a request to `POST /api/v2/signin` to sign in the user.\n#    In your request, pass the following:\n#\n#      - `--user` option with basic authentication credentials.\n#      - `-c` option with a file path where cURL will write cookies.\n\n      curl --request POST \\\n        -c ./cookie-file.tmp \\\n        \"$INFLUX_URL/api/v2/signin\" \\\n        --user \"${INFLUX_USER_NAME}:${INFLUX_USER_PASSWORD}\"\n\n# 2. To check that a user session exists for the user in step 1,\n#    send a request to `GET /api/v2/me`.\n#    In your request, pass the `-b` option with the session cookie file path from step 1.\n\n      curl --request GET \\\n        -b ./cookie-file.tmp \\\n        \"$INFLUX_URL/api/v2/me\"\n\n#    InfluxDB responds with the `user` resource.\n\n# 3. Send a request to `POST /api/v2/signout` to expire the user session.\n#    In your request, pass the `-b` option with the session cookie file path from step 1.\n\n      curl --request POST \\\n        -b ./cookie-file.tmp \\\n        \"$INFLUX_URL/api/v2/signout\"\n\n#     If the user session is successfully expired, InfluxDB responds with\n      an HTTP `204` status code.\n\n# 4. To check that the user session is expired, call `GET /api/v2/me` again,\n#    passing the `-b` option with the cookie file path.\n\n      curl --request GET \\\n        -b ./cookie-file.tmp \\\n        \"$INFLUX_URL/api/v2/me\"\n\n#    If the user session is expired, InfluxDB responds with an HTTP `401` status code.\n"
  /orgs:
    get:
      operationId: GetOrgs
      tags:
      - Security and access endpoints
      summary: List organizations
      description: 'Lists [organizations](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#organization/).


        To limit which organizations are returned, pass query parameters in your request.

        If no query parameters are passed, InfluxDB returns all organizations up to the default `limit`.


        #### InfluxDB Cloud


        - Only returns the organization that owns the token passed in the request.


        #### Related guides


        - [View organizations](https://docs.influxdata.com/influxdb/cloud/organizations/view-orgs/)

        '
      parameters:
      - $ref: '#/components/parameters/TraceSpan'
      - $ref: '#/components/parameters/Offset'
      - $ref: '#/components/parameters/Limit'
      - $ref: '#/components/parameters/Descending'
      - in: query
        name: org
        schema:
          type: string
        description: 'An organization name.

          Only returns the specified organization.

          '
      - in: query
        name: orgID
        schema:
          type: string
        description: 'An organization ID.

          Only returns the specified organization.

          '
      - in: query
        name: userID
        schema:
          type: string
        description: 'A user ID.

          Only returns organizations where the specified user is a member or owner.

          '
      responses:
        '200':
          description: Success. The response body contains a list of organizations.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Organizations'
              examples:
                successResponse:
                  value:
                    links:
                      self: /api/v2/orgs
                    orgs:
                    - links:
                        buckets: /api/v2/buckets?org=INFLUX_ORG
                        dashboards: /api/v2/dashboards?org=INFLUX_ORG
                        labels: /api/v2/orgs/INFLUX_ORG_ID/labels
                        logs: /api/v2/orgs/INFLUX_ORG_ID/logs
                        members: /api/v2/orgs/INFLUX_ORG_ID/members
                        owners: /api/v2/orgs/INFLUX_ORG_ID/owners
                        secrets: /api/v2/orgs/INFLUX_ORG_ID/secrets
                        self: /api/v2/orgs/INFLUX_ORG_ID
                        tasks: /api/v2/tasks?org=InfluxData
                      id: INFLUX_ORG_ID
                      name: INFLUX_ORG
                      description: Example InfluxDB organization
                      createdAt: '2022-07-17T23:00:30.778487Z'
                      updatedAt: '2022-07-17T23:00:30.778487Z'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthorizationError'
        '404':
          $ref: '#/components/responses/ResourceNotFoundError'
        '500':
          $ref: '#/components/responses/InternalServerError'
        default:
          $ref: '#/components/responses/GeneralServerError'
  /orgs/{orgID}:
    get:
      operationId: GetOrgsID
      tags:
      - Security and access endpoints
      summary: Retrieve an organization
      description: 'Retrieves an organization.


        Use this endpoint to retrieve information for a specific organization.


        #### Related guides


        - [View organizations](https://docs.influxdata.com/influxdb/cloud/organizations/view-orgs/)

        '
      parameters:
      - $ref: '#/components/parameters/TraceSpan'
      - in: path
        name: orgID
        schema:
          type: string
        required: true
        description: 'The ID of the organization to retrieve.

          '
      responses:
        '200':
          description: 'Success.

            The response body contains the organization information.

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Organization'
        '401':
          $ref: '#/components/responses/AuthorizationError'
        '404':
          description: 'Not found.

            Organization not found.

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                notFound:
                  summary: 'The requested organization wasn''t found.

                    '
                  value:
                    code: not found
                    message: organization not found
        '500':
          $ref: '#/components/responses/InternalServerError'
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /orgs/{orgID}/secrets:
    get:
      operationId: GetOrgsIDSecrets
      tags:
      - Security and access endpoints
      summary: List all secret keys for an organization
      parameters:
      - $ref: '#/components/parameters/TraceSpan'
      - in: path
        name: orgID
        schema:
          type: string
        required: true
        description: The organization ID.
      responses:
        '200':
          description: A list of all secret keys
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SecretKeysResponse'
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /orgs/{orgID}/members:
    get:
      operationId: GetOrgsIDMembers
      tags:
      - Security and access endpoints
      summary: List all members of an organization
      description: "Lists all users that belong to an organization.\n\nInfluxDB [users](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#user) have\npermission to access InfluxDB.\n\n[Members](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#member) are users\nwithin the organization.\n\n#### InfluxDB Cloud\n\n- Doesn't use `owner` and `member` roles.\n  Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions.\n\n#### Limitations\n\n- Member permissions are separate from API token permissions.\n- Member permissions are used in the context of the InfluxDB UI.\n\n#### Required permissions\n\n- `read-orgs INFLUX_ORG_ID`\n\n*`INFLUX_ORG_ID`* is the ID of the organization that you want to retrieve\nmembers for.\n\n#### Related guides\n\n- [Manage users](https://docs.influxdata.com/influxdb/cloud/users/)\n- [Manage members](https://docs.influxdata.com/influxdb/cloud/organizations/members/)\n"
      parameters:
      - $ref: '#/components/parameters/TraceSpan'
      - in: path
        name: orgID
        schema:
          type: string
        required: true
        description: 'The ID of the organization to retrieve users for.

          '
      responses:
        '200':
          description: 'Success.

            The response body contains a list of all users within the organization.

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceMembers'
              examples:
                successResponse:
                  value:
                    links:
                      self: /api/v2/orgs/055aa4783aa38398/members
                    users:
                    - role: member
                      links:
                        self: /api/v2/users/791df274afd48a83
                      id: 791df274afd48a83
                      name: example_user_1
                      status: active
                    - role: owner
                      links:
                        self: /api/v2/users/09cfb87051cbe000
                      id: 09cfb87051cbe000
                      name: example_user_2
                      status: active
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthorizationError'
        '404':
          description: 'Not found.

            InfluxDB can''t find the organization.

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                notFound:
                  summary: 'The requested organization wasn''t found.

                    '
                  value:
                    code: not found
                    message: 404 page not found
        '500':
          $ref: '#/components/responses/InternalServerError'
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /orgs/{orgID}/members/{userID}:
    delete:
      operationId: DeleteOrgsIDMembersID
      tags:
      - Security and access endpoints
      summary: Remove a member from an organization
      description: "Removes a member from an organization.\n\nUse this endpoint to remove a user's member privileges for an organization.\nRemoving member privileges removes the user's `read` and `write` permissions\nfrom the organization.\n\n#### InfluxDB Cloud\n\n- Doesn't use `owner` and `member` roles.\n  Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions.\n\n#### Limitations\n\n- Member permissions are separate from API token permissions.\n- Member permissions are used in the context of the InfluxDB UI.\n\n#### Required permissions\n\n- `write-orgs INFLUX_ORG_ID`\n\n*`INFLUX_ORG_ID`* is the ID of the organization that you want to remove an\nowner from.\n\n#### Related guides\n\n- [Manage members](https://docs.influxdata.com/influxdb/cloud/organizations/members/)\n"
      parameters:
      - $ref: '#/components/parameters/TraceSpan'
      - in: path
        name: userID
        schema:
          type: string
        required: true
        description: The ID of the user to remove.
      - in: path
        name: orgID
        schema:
          type: string
        required: true
        description: The ID of the organization to remove a user from.
      responses:
        '204':
          description: 'Success.

            The user is no longer a member of the organization.

            '
        '401':
          $ref: '#/components/responses/AuthorizationError'
        '404':
          $ref: '#/components/responses/ResourceNotFoundError'
        '500':
          $ref: '#/components/responses/InternalServerError'
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /orgs/{orgID}/owners:
    get:
      operationId: GetOrgsIDOwners
      tags:
      - Security and access endpoints
      summary: List all owners of an organization
      description: "Lists all owners of an organization.\n\n#### InfluxDB Cloud\n\n- Doesn't use `owner` and `member` roles.\n  Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions.\n\n#### Required permissions\n\n- `read-orgs INFLUX_ORG_ID`\n\n*`INFLUX_ORG_ID`* is the ID of the organization that you want to retrieve a\nlist of owners from.\n"
      parameters:
      - $ref: '#/components/parameters/TraceSpan'
      - in: path
        name: orgID
        schema:
          type: string
        required: true
        description: 'The ID of the organization to list owners for.

          '
      responses:
        '200':
          description: A list of organization owners
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceOwners'
              examples:
                successResponse:
                  value:
                    links:
                      self: /api/v2/orgs/055aa4783aa38398/owners
                    users:
                    - role: owner
                      links:
                        self: /api/v2/users/09cfb87051cbe000
                      id: 09cfb87051cbe000
                      name: example_user_2
                      status: active
        '404':
          description: Organization not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /orgs/{orgID}/owners/{userID}:
    delete:
      operationId: DeleteOrgsIDOwnersID
      tags:
      - Security and access endpoints
      summary: Remove an owner from an organization
      description: "Removes an [owner](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#owner) from\nthe organization.\n\nOrganization owners have permission to delete organizations and remove user and member\npermissions from the organization.\n\n#### InfluxDB Cloud\n- Doesn't use `owner` and `member` roles.\n  Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions.\n\n#### Limitations\n\n- Owner permissions are separate from API token permissions.\n- Owner permissions are used in the context of the InfluxDB UI.\n\n#### Required permissions\n\n- `write-orgs INFLUX_ORG_ID`\n\n*`INFLUX_ORG_ID`* is the ID of the organization that you want to\nremove an owner from.\n\n#### Related endpoints\n- [Authorizations](#tag/Authorizations-(API-tokens))\n"
      parameters:
      - $ref: '#/components/parameters/TraceSpan'
      - in: path
        name: userID
        schema:
          type: string
        required: true
        description: The ID of the user to remove.
      - in: path
        name: orgID
        schema:
          type: string
        required: true
        description: 'The ID of the organization to remove an owner from.

          '
      responses:
        '204':
          description: 'Success.

            The user is no longer an owner of the organization.

            '
        '401':
          $ref: '#/components/responses/AuthorizationError'
        '404':
          $ref: '#/components/responses/ResourceNotFoundError'
        '500':
          $ref: '#/components/responses/InternalServerError'
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /orgs/{orgID}/secrets/delete:
    post:
      deprecated: true
      operationId: PostOrgsIDSecrets
      tags:
      - Security and access endpoints
      summary: Delete secrets from an organization
      parameters:
      - $ref: '#/components/parameters/TraceSpan'
      - in: path
        name: orgID
        schema:
          type: string
        required: true
        description: The organization ID.
      requestBody:
        description: Secret key to delete
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SecretKeys'
      responses:
        '204':
          description: Keys successfully patched
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /orgs/{orgID}/secrets/{secretID}:
    delete:
      operationId: DeleteOrgsIDSecretsID
      tags:
      - Security and access endpoints
      summary: Delete a secret from an organization
      parameters:
      - $ref: '#/components/parameters/TraceSpan'
      - in: path
        name: orgID
        schema:
          type: string
        required: true
        description: The organization ID.
      - in: path
        name: secretID
        schema:
          type: string
        required: true
        description: The secret ID.
      responses:
        '204':
          description: Keys successfully deleted
        default:
          description: Unexpected error
          $ref: '#/components/responses/GeneralServerError'
  /users/{userID}/password:
    post:
      operationId: PostUsersIDPassword
      tags:
      - Security and access endpoints
      summary: Update a password
      description: "Updates a user password.\n\n#### InfluxDB Cloud\n\n- Doesn't allow you to manage user passwords through the API.\n  Use the InfluxDB Cloud user interface (UI) to update a password.\n\n#### Related guides\n\n- [InfluxDB Cloud - Change your password](https://docs.influxdata.com/influxdb/cloud/account-management/change-password/)\n- [InfluxDB OSS - Change your password](https://docs.influxdata.com/influxdb/latest/users/change-password/)\n"
      parameters:
      - $ref: '#/components/parameters/TraceSpan'
      - in: path
        name: userID
        schema:
          type: string
        required: true
        description: The ID of the user to set the password for.
      requestBody:
        description: The new password to set for the user.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PasswordResetBody'
      responses:
        '204':
          description: Success. The password is updated.
        '400':
          description: 'Bad request.


            #### InfluxDB Cloud


            - Doesn''t allow you to manage passwords through the API; always responds with this status.


            #### InfluxDB OSS


            - Doesn''t understand a value passed in the request.

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                updatePasswordNotAllowed:
                  summary: Cloud API can't update passwords
                  value:
                    code: invalid
                    message: passwords cannot be changed through the InfluxDB Cloud API
        default:
          description: Unexpected error
          $ref: '#/components/responses/GeneralServerError'
      x-codeSamples:
      - lang: Shell
        label: 'cURL: use HTTP POST to update the user password'
        source: "curl --request POST \\\n   \"http://localhost:8086/api/v2/users/USER_ID/password\" \\\n  --header 'Content-type: application/json' \\\n  --header \"Authorization: Token INFLUX_TOKEN\" \\\n  --data-binary @- << EOF\n    {\"password\": \"NEW_USER_PASSWORD\"}\nEOF\n"
    put:
      operationId: PutUsersIDPassword
      tags:
      - Security and access endpoints
      summary: Update a password
      description: "Updates a user password.\n\nUse this endpoint to let a user authenticate with\n[Basic authentication credentials](#section/Authentication/BasicAuthentication)\nand set a new password.\n\n#### InfluxDB Cloud\n\n- Doesn't allow you to manage user passwords through the API.\n  Use the InfluxDB Cloud user interface (UI) to update a password.\n\n#### Related guides\n\n- [InfluxDB Cloud - Change your password](https://docs.influxdata.com/influxdb/cloud/account-management/change-password/)\n- [InfluxDB OSS - Change your password](https://docs.influxdata.com/influxdb/latest/users/change-password/)\n"
      security:
      - BasicAuthentication: []
      parameters:
      - $ref: '#/components/parameters/TraceSpan'
      - in: path
        name: userID
        schema:
          type: string
        required: true
        description: The ID of the user to set the password for.
      requestBody:
        description: The new password to set for the user.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PasswordResetBody'
      responses:
        '204':
          description: Success. The password is updated.
        '400':
          description: 'Bad request.


            #### InfluxDB Cloud


            - Doesn''t allow you to manage passwords through the API; always responds with this status.


            #### InfluxDB OSS


            - Doesn''t understand a value passed in the request.

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                updatePasswordNotAllowed:
                  summary: Cloud API can't update passwords
                  value:
                    code: invalid
                    message: passwords cannot be changed through the InfluxDB Cloud API
        default:
          description: Unexpected error
          $ref: '#/components/responses/GeneralServerError'
      x-codeSamples:
      - lang: Shell
        label: 'cURL: use Basic auth to update the user password'
        source: "curl -c ./cookie-file.tmp --request POST \\\n   \"http://localhost:8086/api/v2/signin\" \\\n  --user \"${INFLUX_USER_NAME}:${INFLUX_USER_PASSWORD}\"\n\ncurl -b ./cookie-file.tmp --request PUT \\\n   \"http://localhost:8086/api/v2/users/USER_ID/password\" \\\n  --header 'Content-type: application/json' \\\n  --data-binary @- << EOF\n    {\"password\": \"NEW_USER_PASSWORD\"}\nEOF\n"
  /authorizations:
    get:
      operationId: GetAuthorizations
      tags:
      - Security and access endpoints
      summary: List authorizations
      description: "Lists authorizations.\n\nTo limit which authorizations are returned, pass query parameters in your request.\nIf no query parameters are passed, InfluxDB returns all authorizations.\n\n#### InfluxDB Cloud\n\n- InfluxDB Cloud doesn't expose [API token](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#token)\n  values in `GET /api/v2/authorizations` responses;\n  returns `token: redacted` for all authorizations.\n\n#### Required permissions\n\nTo retrieve an authorization, the request must use an API token that has the\nfollowing permissions:\n\n- `read-authorizations`\n- `read-user` for the user that the authorization is scoped to\n\n#### Related guides\n\n- [View tokens](https://docs.influxdata.com/influxdb/cloud/security/tokens/view-tokens/)\n"
      parameters:
      - $ref: '#/components/parameters/TraceSpan'
      - in: query
        name: userID
        schema:
          type: string
        description: 'A user ID.

          Only returns authorizations scoped to the specified [user](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#user).

          '
      - in: query
        name: user
        schema:
          type: string
        description: 'A user name.

          Only returns authorizations scoped to the specified [user](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#user).

          '
      - in: query
        name: orgID
        schema:
          type: string
        description: An organization ID. Only returns authorizations that belong to the specified [organization](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#organization).
      - in: query
        name: org
        schema:
          type: string
        description: 'An organization name.

          Only returns authorizations that belong to the specified [organization](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#organization).

          '
      - in: query
        name: token
        schema:
          type: string
        description: "An API [token](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#token) value.\nSpecifies an authorization by its `token` property value\nand returns the authorization.\n\n#### InfluxDB OSS\n\n- Doesn't support this parameter. InfluxDB OSS ignores the `token=` parameter,\n  applies other parameters, and then returns the result.\n\n#### Limitations\n\n- The parameter is non-repeatable. If you specify more than one,\n  only the first one is used. If a resource with the specified\n  property value doesn't exist, then the response body contains an empty list.\n"
      responses:
        '200':
          description: "Success. The response body contains a list of authorizations.\n\nIf the response body is missing authorizations that you expect, check that the API\ntoken used in the request has `read-user` permission for the users (`userID` property value)\nin those authorizations.\n\n#### InfluxDB OSS\n\n- **Warning**: The response body contains authorizations with their\n  [API token](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#token) values in clear text.\n- If the request uses an  _[operator token](https://docs.influxdata.com/influxdb/latest/security/tokens/#operator-token)_,\n  InfluxDB OSS returns authorizations for all organizations in the instance.\n"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Authorizations'
        '400':
          description: Invalid request
          $ref: '#/components/responses/GeneralServerError'
        '401':
          $ref: '#/components/responses/AuthorizationError'
        '500':
          $ref: '#/components/responses/InternalServerError'
        default:
          description: Unexpected error
          $ref: '#/components/responses/GeneralServerError'
    post:
      operationId: PostAuthorizations
      tags:
      - Security and access endpoints
      summary: Create an authorization
      description: "Creates an authorization and returns the authorization with the\ngenerated API [token](https://docs.

# --- truncated at 32 KB (65 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/influxdata/refs/heads/main/openapi/influxdata-security-and-access-endpoints-api-openapi.yml