Interface AuthorizationsApi


@ThreadSafe public interface AuthorizationsApi
The client of the InfluxDB 2.x that implement Authorization HTTP API endpoint.
Author:
Jakub Bednar (bednar@github) (17/09/2018 11:09)
  • Method Details

    • createAuthorization

      @Nonnull Authorization createAuthorization(@Nonnull Authorization authorization)
      Create an new authorization.
      Parameters:
      authorization - authorization to create.
      Returns:
      created authorization
    • createAuthorization

      @Nonnull Authorization createAuthorization(@Nonnull Organization organization, @Nonnull List<Permission> permissions)
      Create an authorization with defined permissions.
      Parameters:
      organization - owner of authorization
      permissions - the permissions for the authorization
      Returns:
      created authorization
    • createAuthorization

      @Nonnull Authorization createAuthorization(@Nonnull String orgID, @Nonnull List<Permission> permissions)
      Create an authorization with defined permissions.
      Parameters:
      orgID - owner id of authorization
      permissions - the permissions for the authorization
      Returns:
      created authorization
    • createAuthorization

      @Nonnull Authorization createAuthorization(@Nonnull AuthorizationPostRequest request)
      Create an authorization.

      Use this method to create an authorization, which generates an API token with permissions to `read` or `write` to a specific resource or `type` of resource. The response contains the new authorization with the generated API token.

      Parameters:
      request - The authorization to create.
      Returns:
      Newly created authorization
    • updateAuthorization

      @Nonnull Authorization updateAuthorization(@Nonnull Authorization authorization)
      Updates the status of the authorization. Useful for setting an authorization to inactive or active.
      Parameters:
      authorization - the authorization with updated status
      Returns:
      updated authorization
    • updateAuthorization

      @Nonnull Authorization updateAuthorization(@Nonnull String authorizationID, @Nonnull AuthorizationUpdateRequest request)
      Update an authorization to be active or inactive.
      Parameters:
      authorizationID - The ID of the authorization to update.
      request - Authorization to update
      Returns:
      The active or inactive authorization
    • deleteAuthorization

      void deleteAuthorization(@Nonnull Authorization authorization)
      Delete an authorization.
      Parameters:
      authorization - authorization to delete
    • deleteAuthorization

      void deleteAuthorization(@Nonnull String authorizationID)
      Delete an authorization.
      Parameters:
      authorizationID - ID of authorization to delete
    • cloneAuthorization

      @Nonnull Authorization cloneAuthorization(@Nonnull String authorizationID)
      Clone an authorization.
      Parameters:
      authorizationID - ID of authorization to clone
      Returns:
      cloned authorization
    • cloneAuthorization

      @Nonnull Authorization cloneAuthorization(@Nonnull Authorization authorization)
      Clone an authorization.
      Parameters:
      authorization - authorization to clone
      Returns:
      cloned authorization
    • findAuthorizations

      @Nonnull List<Authorization> findAuthorizations()
      List all authorizations.
      Returns:
      list all authorizations
    • findAuthorizationByID

      @Nonnull Authorization findAuthorizationByID(@Nonnull String authorizationID)
      Retrieve an authorization.
      Parameters:
      authorizationID - ID of authorization to get
      Returns:
      authorization details
    • findAuthorizationsByUser

      @Nonnull List<Authorization> findAuthorizationsByUser(@Nonnull User user)
      List all authorizations for specified user.
      Parameters:
      user - filter authorizations belonging to a user
      Returns:
      A list of authorizations
    • findAuthorizationsByUserID

      @Nonnull List<Authorization> findAuthorizationsByUserID(@Nullable String userID)
      List all authorizations for specified userID.
      Parameters:
      userID - filter authorizations belonging to a user ID
      Returns:
      A list of authorizations
    • findAuthorizationsByUserName

      @Nonnull List<Authorization> findAuthorizationsByUserName(@Nullable String userName)
      List all authorizations for specified userName.
      Parameters:
      userName - filter authorizations belonging to a user name
      Returns:
      A list of authorizations
    • findAuthorizationsByOrg

      @Nonnull List<Authorization> findAuthorizationsByOrg(@Nonnull Organization organization)
      List all authorizations for specified organization.
      Parameters:
      organization - filter authorizations belonging to a org
      Returns:
      A list of authorizations
    • findAuthorizationsByOrgID

      @Nonnull List<Authorization> findAuthorizationsByOrgID(@Nullable String orgID)
      List all authorizations for specified orgID.
      Parameters:
      orgID - filter authorizations belonging to a org id
      Returns:
      A list of authorizations