Class AccessTokensApi


  • public class AccessTokensApi
    extends java.lang.Object
    • Constructor Detail

      • AccessTokensApi

        public AccessTokensApi()
      • AccessTokensApi

        public AccessTokensApi​(ApiClient apiClient)
    • Method Detail

      • getApiClient

        public ApiClient getApiClient()
      • setApiClient

        public void setApiClient​(ApiClient apiClient)
      • getHostIndex

        public int getHostIndex()
      • setHostIndex

        public void setHostIndex​(int hostIndex)
      • getCustomBaseUrl

        public java.lang.String getCustomBaseUrl()
      • setCustomBaseUrl

        public void setCustomBaseUrl​(java.lang.String customBaseUrl)
      • deleteTokenCall

        public okhttp3.Call deleteTokenCall​(@Nonnull
                                            java.lang.String id,
                                            ApiCallback _callback)
                                     throws ApiException
        Build call for deleteToken
        Parameters:
        id - The ID of the access token to update (required)
        _callback - Callback for upload/download progress
        Returns:
        Call to execute
        Throws:
        ApiException - If fail to serialize the request body object
      • deleteToken

        public void deleteToken​(@Nonnull
                                java.lang.String id)
                         throws ApiException
        Delete access token Delete an access token by ID.
        Parameters:
        id - The ID of the access token to update (required)
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • deleteTokenWithHttpInfo

        public ApiResponse<java.lang.Void> deleteTokenWithHttpInfo​(@Nonnull
                                                                   java.lang.String id)
                                                            throws ApiException
        Delete access token Delete an access token by ID.
        Parameters:
        id - The ID of the access token to update (required)
        Returns:
        ApiResponse<Void>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • deleteTokenAsync

        public okhttp3.Call deleteTokenAsync​(@Nonnull
                                             java.lang.String id,
                                             ApiCallback<java.lang.Void> _callback)
                                      throws ApiException
        Delete access token (asynchronously) Delete an access token by ID.
        Parameters:
        id - The ID of the access token to update (required)
        _callback - The callback to be executed when the API call finishes
        Returns:
        The request call
        Throws:
        ApiException - If fail to process the API call, e.g. serializing the request body object
      • getTokenCall

        public okhttp3.Call getTokenCall​(@Nonnull
                                         java.lang.String id,
                                         ApiCallback _callback)
                                  throws ApiException
        Build call for getToken
        Parameters:
        id - The ID of the access token (required)
        _callback - Callback for upload/download progress
        Returns:
        Call to execute
        Throws:
        ApiException - If fail to serialize the request body object
      • getToken

        public Token getToken​(@Nonnull
                              java.lang.String id)
                       throws ApiException
        Get access token Get a single access token by ID.
        Parameters:
        id - The ID of the access token (required)
        Returns:
        Token
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • getTokenWithHttpInfo

        public ApiResponse<Token> getTokenWithHttpInfo​(@Nonnull
                                                       java.lang.String id)
                                                throws ApiException
        Get access token Get a single access token by ID.
        Parameters:
        id - The ID of the access token (required)
        Returns:
        ApiResponse<Token>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • getTokenAsync

        public okhttp3.Call getTokenAsync​(@Nonnull
                                          java.lang.String id,
                                          ApiCallback<Token> _callback)
                                   throws ApiException
        Get access token (asynchronously) Get a single access token by ID.
        Parameters:
        id - The ID of the access token (required)
        _callback - The callback to be executed when the API call finishes
        Returns:
        The request call
        Throws:
        ApiException - If fail to process the API call, e.g. serializing the request body object
      • getTokensCall

        public okhttp3.Call getTokensCall​(@Nullable
                                          java.lang.Boolean showAll,
                                          @Nullable
                                          java.lang.Long limit,
                                          @Nullable
                                          java.lang.Long offset,
                                          ApiCallback _callback)
                                   throws ApiException
        Build call for getTokens
        Parameters:
        showAll - If set to true, and the authentication access token has the 'Admin' role, personal access tokens for all members will be retrieved. (optional)
        limit - The number of access tokens to return in the response. Defaults to 25. (optional)
        offset - Where to start in the list. This is for use with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`. (optional)
        _callback - Callback for upload/download progress
        Returns:
        Call to execute
        Throws:
        ApiException - If fail to serialize the request body object
      • getTokens

        public Tokens getTokens​(@Nullable
                                java.lang.Boolean showAll,
                                @Nullable
                                java.lang.Long limit,
                                @Nullable
                                java.lang.Long offset)
                         throws ApiException
        List access tokens Fetch a list of all access tokens.
        Parameters:
        showAll - If set to true, and the authentication access token has the 'Admin' role, personal access tokens for all members will be retrieved. (optional)
        limit - The number of access tokens to return in the response. Defaults to 25. (optional)
        offset - Where to start in the list. This is for use with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`. (optional)
        Returns:
        Tokens
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • getTokensWithHttpInfo

        public ApiResponse<Tokens> getTokensWithHttpInfo​(@Nullable
                                                         java.lang.Boolean showAll,
                                                         @Nullable
                                                         java.lang.Long limit,
                                                         @Nullable
                                                         java.lang.Long offset)
                                                  throws ApiException
        List access tokens Fetch a list of all access tokens.
        Parameters:
        showAll - If set to true, and the authentication access token has the 'Admin' role, personal access tokens for all members will be retrieved. (optional)
        limit - The number of access tokens to return in the response. Defaults to 25. (optional)
        offset - Where to start in the list. This is for use with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`. (optional)
        Returns:
        ApiResponse<Tokens>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • getTokensAsync

        public okhttp3.Call getTokensAsync​(@Nullable
                                           java.lang.Boolean showAll,
                                           @Nullable
                                           java.lang.Long limit,
                                           @Nullable
                                           java.lang.Long offset,
                                           ApiCallback<Tokens> _callback)
                                    throws ApiException
        List access tokens (asynchronously) Fetch a list of all access tokens.
        Parameters:
        showAll - If set to true, and the authentication access token has the 'Admin' role, personal access tokens for all members will be retrieved. (optional)
        limit - The number of access tokens to return in the response. Defaults to 25. (optional)
        offset - Where to start in the list. This is for use with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`. (optional)
        _callback - The callback to be executed when the API call finishes
        Returns:
        The request call
        Throws:
        ApiException - If fail to process the API call, e.g. serializing the request body object
      • patchTokenCall

        public okhttp3.Call patchTokenCall​(@Nonnull
                                           java.lang.String id,
                                           @Nonnull
                                           java.util.List<PatchOperation> patchOperation,
                                           ApiCallback _callback)
                                    throws ApiException
        Build call for patchToken
        Parameters:
        id - The ID of the access token to update (required)
        patchOperation - (required)
        _callback - Callback for upload/download progress
        Returns:
        Call to execute
        Throws:
        ApiException - If fail to serialize the request body object
      • patchToken

        public Token patchToken​(@Nonnull
                                java.lang.String id,
                                @Nonnull
                                java.util.List<PatchOperation> patchOperation)
                         throws ApiException
        Patch access token Update an access token's settings. Updating an access token uses a [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) representation of the desired changes. To learn more, read [Updates](https://launchdarkly.com/docs/api#updates).
        Parameters:
        id - The ID of the access token to update (required)
        patchOperation - (required)
        Returns:
        Token
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • patchTokenWithHttpInfo

        public ApiResponse<Token> patchTokenWithHttpInfo​(@Nonnull
                                                         java.lang.String id,
                                                         @Nonnull
                                                         java.util.List<PatchOperation> patchOperation)
                                                  throws ApiException
        Patch access token Update an access token's settings. Updating an access token uses a [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) representation of the desired changes. To learn more, read [Updates](https://launchdarkly.com/docs/api#updates).
        Parameters:
        id - The ID of the access token to update (required)
        patchOperation - (required)
        Returns:
        ApiResponse<Token>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • patchTokenAsync

        public okhttp3.Call patchTokenAsync​(@Nonnull
                                            java.lang.String id,
                                            @Nonnull
                                            java.util.List<PatchOperation> patchOperation,
                                            ApiCallback<Token> _callback)
                                     throws ApiException
        Patch access token (asynchronously) Update an access token's settings. Updating an access token uses a [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) representation of the desired changes. To learn more, read [Updates](https://launchdarkly.com/docs/api#updates).
        Parameters:
        id - The ID of the access token to update (required)
        patchOperation - (required)
        _callback - The callback to be executed when the API call finishes
        Returns:
        The request call
        Throws:
        ApiException - If fail to process the API call, e.g. serializing the request body object
      • postTokenCall

        public okhttp3.Call postTokenCall​(@Nonnull
                                          AccessTokenPost accessTokenPost,
                                          ApiCallback _callback)
                                   throws ApiException
        Build call for postToken
        Parameters:
        accessTokenPost - (required)
        _callback - Callback for upload/download progress
        Returns:
        Call to execute
        Throws:
        ApiException - If fail to serialize the request body object
      • postToken

        public Token postToken​(@Nonnull
                               AccessTokenPost accessTokenPost)
                        throws ApiException
        Create access token Create a new access token.
        Parameters:
        accessTokenPost - (required)
        Returns:
        Token
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • postTokenWithHttpInfo

        public ApiResponse<Token> postTokenWithHttpInfo​(@Nonnull
                                                        AccessTokenPost accessTokenPost)
                                                 throws ApiException
        Create access token Create a new access token.
        Parameters:
        accessTokenPost - (required)
        Returns:
        ApiResponse<Token>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • postTokenAsync

        public okhttp3.Call postTokenAsync​(@Nonnull
                                           AccessTokenPost accessTokenPost,
                                           ApiCallback<Token> _callback)
                                    throws ApiException
        Create access token (asynchronously) Create a new access token.
        Parameters:
        accessTokenPost - (required)
        _callback - The callback to be executed when the API call finishes
        Returns:
        The request call
        Throws:
        ApiException - If fail to process the API call, e.g. serializing the request body object
      • resetTokenCall

        public okhttp3.Call resetTokenCall​(@Nonnull
                                           java.lang.String id,
                                           @Nullable
                                           java.lang.Long expiry,
                                           ApiCallback _callback)
                                    throws ApiException
        Build call for resetToken
        Parameters:
        id - The ID of the access token to update (required)
        expiry - An expiration time for the old token key, expressed as a Unix epoch time in milliseconds. By default, the token will expire immediately. (optional)
        _callback - Callback for upload/download progress
        Returns:
        Call to execute
        Throws:
        ApiException - If fail to serialize the request body object
      • resetToken

        public Token resetToken​(@Nonnull
                                java.lang.String id,
                                @Nullable
                                java.lang.Long expiry)
                         throws ApiException
        Reset access token Reset an access token's secret key with an optional expiry time for the old key.
        Parameters:
        id - The ID of the access token to update (required)
        expiry - An expiration time for the old token key, expressed as a Unix epoch time in milliseconds. By default, the token will expire immediately. (optional)
        Returns:
        Token
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • resetTokenWithHttpInfo

        public ApiResponse<Token> resetTokenWithHttpInfo​(@Nonnull
                                                         java.lang.String id,
                                                         @Nullable
                                                         java.lang.Long expiry)
                                                  throws ApiException
        Reset access token Reset an access token's secret key with an optional expiry time for the old key.
        Parameters:
        id - The ID of the access token to update (required)
        expiry - An expiration time for the old token key, expressed as a Unix epoch time in milliseconds. By default, the token will expire immediately. (optional)
        Returns:
        ApiResponse<Token>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • resetTokenAsync

        public okhttp3.Call resetTokenAsync​(@Nonnull
                                            java.lang.String id,
                                            @Nullable
                                            java.lang.Long expiry,
                                            ApiCallback<Token> _callback)
                                     throws ApiException
        Reset access token (asynchronously) Reset an access token's secret key with an optional expiry time for the old key.
        Parameters:
        id - The ID of the access token to update (required)
        expiry - An expiration time for the old token key, expressed as a Unix epoch time in milliseconds. By default, the token will expire immediately. (optional)
        _callback - The callback to be executed when the API call finishes
        Returns:
        The request call
        Throws:
        ApiException - If fail to process the API call, e.g. serializing the request body object