Class UserSettingsApi


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

      • UserSettingsApi

        public UserSettingsApi()
      • UserSettingsApi

        public UserSettingsApi​(ApiClient apiClient)
    • Method Detail

      • getApiClient

        public ApiClient getApiClient()
      • setApiClient

        public void setApiClient​(ApiClient apiClient)
      • getExpiringFlagsForUserCall

        public okhttp3.Call getExpiringFlagsForUserCall​(java.lang.String projKey,
                                                        java.lang.String userKey,
                                                        java.lang.String envKey,
                                                        ApiCallback _callback)
                                                 throws ApiException
        Build call for getExpiringFlagsForUser
        Parameters:
        projKey - The project key. (required)
        userKey - The user key. (required)
        envKey - The environment key. (required)
        _callback - Callback for upload/download progress
        Returns:
        Call to execute
        Throws:
        ApiException - If fail to serialize the request body object
      • getExpiringFlagsForUser

        public ExpiringUserTargetGetResponse getExpiringFlagsForUser​(java.lang.String projKey,
                                                                     java.lang.String userKey,
                                                                     java.lang.String envKey)
                                                              throws ApiException
        Get expiring dates on flags for user Get a list of flags for which the given user is scheduled for removal.
        Parameters:
        projKey - The project key. (required)
        userKey - The user key. (required)
        envKey - The environment key. (required)
        Returns:
        ExpiringUserTargetGetResponse
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • getExpiringFlagsForUserWithHttpInfo

        public ApiResponse<ExpiringUserTargetGetResponse> getExpiringFlagsForUserWithHttpInfo​(java.lang.String projKey,
                                                                                              java.lang.String userKey,
                                                                                              java.lang.String envKey)
                                                                                       throws ApiException
        Get expiring dates on flags for user Get a list of flags for which the given user is scheduled for removal.
        Parameters:
        projKey - The project key. (required)
        userKey - The user key. (required)
        envKey - The environment key. (required)
        Returns:
        ApiResponse<ExpiringUserTargetGetResponse>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • getExpiringFlagsForUserAsync

        public okhttp3.Call getExpiringFlagsForUserAsync​(java.lang.String projKey,
                                                         java.lang.String userKey,
                                                         java.lang.String envKey,
                                                         ApiCallback<ExpiringUserTargetGetResponse> _callback)
                                                  throws ApiException
        Get expiring dates on flags for user (asynchronously) Get a list of flags for which the given user is scheduled for removal.
        Parameters:
        projKey - The project key. (required)
        userKey - The user key. (required)
        envKey - The environment key. (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
      • getUserFlagSettingCall

        public okhttp3.Call getUserFlagSettingCall​(java.lang.String projKey,
                                                   java.lang.String envKey,
                                                   java.lang.String key,
                                                   java.lang.String featureKey,
                                                   ApiCallback _callback)
                                            throws ApiException
        Build call for getUserFlagSetting
        Parameters:
        projKey - The project key (required)
        envKey - The environment key (required)
        key - The user key (required)
        featureKey - The feature flag key (required)
        _callback - Callback for upload/download progress
        Returns:
        Call to execute
        Throws:
        ApiException - If fail to serialize the request body object
      • getUserFlagSetting

        public UserFlagSetting getUserFlagSetting​(java.lang.String projKey,
                                                  java.lang.String envKey,
                                                  java.lang.String key,
                                                  java.lang.String featureKey)
                                           throws ApiException
        Get flag setting for user Get a single flag setting for a user by key. The most important attribute in the response is the `_value`. The `_value` is the current setting that the user sees. For a boolean feature toggle, this is `true`, `false`, or `null`. `null` returns if there is no defined fallback value. The example response indicates that the user `Abbie_Braun` has the `sort.order` flag enabled.<br /><br />The setting attribute indicates whether you've explicitly targeted a user to receive a particular variation. For example, if you have turned off a feature flag for a user, this setting will be `false`. A setting of `null` means that you haven't assigned that user to a specific variation.
        Parameters:
        projKey - The project key (required)
        envKey - The environment key (required)
        key - The user key (required)
        featureKey - The feature flag key (required)
        Returns:
        UserFlagSetting
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • getUserFlagSettingWithHttpInfo

        public ApiResponse<UserFlagSetting> getUserFlagSettingWithHttpInfo​(java.lang.String projKey,
                                                                           java.lang.String envKey,
                                                                           java.lang.String key,
                                                                           java.lang.String featureKey)
                                                                    throws ApiException
        Get flag setting for user Get a single flag setting for a user by key. The most important attribute in the response is the `_value`. The `_value` is the current setting that the user sees. For a boolean feature toggle, this is `true`, `false`, or `null`. `null` returns if there is no defined fallback value. The example response indicates that the user `Abbie_Braun` has the `sort.order` flag enabled.<br /><br />The setting attribute indicates whether you've explicitly targeted a user to receive a particular variation. For example, if you have turned off a feature flag for a user, this setting will be `false`. A setting of `null` means that you haven't assigned that user to a specific variation.
        Parameters:
        projKey - The project key (required)
        envKey - The environment key (required)
        key - The user key (required)
        featureKey - The feature flag key (required)
        Returns:
        ApiResponse<UserFlagSetting>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • getUserFlagSettingAsync

        public okhttp3.Call getUserFlagSettingAsync​(java.lang.String projKey,
                                                    java.lang.String envKey,
                                                    java.lang.String key,
                                                    java.lang.String featureKey,
                                                    ApiCallback<UserFlagSetting> _callback)
                                             throws ApiException
        Get flag setting for user (asynchronously) Get a single flag setting for a user by key. The most important attribute in the response is the `_value`. The `_value` is the current setting that the user sees. For a boolean feature toggle, this is `true`, `false`, or `null`. `null` returns if there is no defined fallback value. The example response indicates that the user `Abbie_Braun` has the `sort.order` flag enabled.<br /><br />The setting attribute indicates whether you've explicitly targeted a user to receive a particular variation. For example, if you have turned off a feature flag for a user, this setting will be `false`. A setting of `null` means that you haven't assigned that user to a specific variation.
        Parameters:
        projKey - The project key (required)
        envKey - The environment key (required)
        key - The user key (required)
        featureKey - The feature flag key (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
      • getUserFlagSettingsCall

        public okhttp3.Call getUserFlagSettingsCall​(java.lang.String projKey,
                                                    java.lang.String envKey,
                                                    java.lang.String key,
                                                    ApiCallback _callback)
                                             throws ApiException
        Build call for getUserFlagSettings
        Parameters:
        projKey - The project key (required)
        envKey - The environment key (required)
        key - The user key (required)
        _callback - Callback for upload/download progress
        Returns:
        Call to execute
        Throws:
        ApiException - If fail to serialize the request body object
      • getUserFlagSettings

        public UserFlagSettings getUserFlagSettings​(java.lang.String projKey,
                                                    java.lang.String envKey,
                                                    java.lang.String key)
                                             throws ApiException
        List flag settings for user Get the current flag settings for a given user. The most important attribute in the response is the `_value`. The `_value` is the setting that the user sees. For a boolean feature toggle, this is `true`, `false`, or `null`. `null` returns if there is no defined fallthrough value. The example response indicates that the user `Abbie_Braun` has the `sort.order` flag enabled and the `alternate.page` flag disabled.<br /><br />The setting attribute indicates whether you've explicitly targeted a user to receive a particular variation. For example, if you have turned off a feature flag for a user, this setting will be `false`. A setting of `null` means that you haven't assigned that user to a specific variation.
        Parameters:
        projKey - The project key (required)
        envKey - The environment key (required)
        key - The user key (required)
        Returns:
        UserFlagSettings
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • getUserFlagSettingsWithHttpInfo

        public ApiResponse<UserFlagSettings> getUserFlagSettingsWithHttpInfo​(java.lang.String projKey,
                                                                             java.lang.String envKey,
                                                                             java.lang.String key)
                                                                      throws ApiException
        List flag settings for user Get the current flag settings for a given user. The most important attribute in the response is the `_value`. The `_value` is the setting that the user sees. For a boolean feature toggle, this is `true`, `false`, or `null`. `null` returns if there is no defined fallthrough value. The example response indicates that the user `Abbie_Braun` has the `sort.order` flag enabled and the `alternate.page` flag disabled.<br /><br />The setting attribute indicates whether you've explicitly targeted a user to receive a particular variation. For example, if you have turned off a feature flag for a user, this setting will be `false`. A setting of `null` means that you haven't assigned that user to a specific variation.
        Parameters:
        projKey - The project key (required)
        envKey - The environment key (required)
        key - The user key (required)
        Returns:
        ApiResponse<UserFlagSettings>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • getUserFlagSettingsAsync

        public okhttp3.Call getUserFlagSettingsAsync​(java.lang.String projKey,
                                                     java.lang.String envKey,
                                                     java.lang.String key,
                                                     ApiCallback<UserFlagSettings> _callback)
                                              throws ApiException
        List flag settings for user (asynchronously) Get the current flag settings for a given user. The most important attribute in the response is the `_value`. The `_value` is the setting that the user sees. For a boolean feature toggle, this is `true`, `false`, or `null`. `null` returns if there is no defined fallthrough value. The example response indicates that the user `Abbie_Braun` has the `sort.order` flag enabled and the `alternate.page` flag disabled.<br /><br />The setting attribute indicates whether you've explicitly targeted a user to receive a particular variation. For example, if you have turned off a feature flag for a user, this setting will be `false`. A setting of `null` means that you haven't assigned that user to a specific variation.
        Parameters:
        projKey - The project key (required)
        envKey - The environment key (required)
        key - The user key (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
      • patchExpiringFlagsForUserCall

        public okhttp3.Call patchExpiringFlagsForUserCall​(java.lang.String projKey,
                                                          java.lang.String userKey,
                                                          java.lang.String envKey,
                                                          PatchWithComment patchWithComment,
                                                          ApiCallback _callback)
                                                   throws ApiException
        Build call for patchExpiringFlagsForUser
        Parameters:
        projKey - The project key. (required)
        userKey - The user key. (required)
        envKey - The environment key. (required)
        patchWithComment - (required)
        _callback - Callback for upload/download progress
        Returns:
        Call to execute
        Throws:
        ApiException - If fail to serialize the request body object
      • patchExpiringFlagsForUser

        public ExpiringUserTargetPatchResponse patchExpiringFlagsForUser​(java.lang.String projKey,
                                                                         java.lang.String userKey,
                                                                         java.lang.String envKey,
                                                                         PatchWithComment patchWithComment)
                                                                  throws ApiException
        Update expiring user target for flags Schedule the specified user for removal from individual user targeting on one or more flags. You can only schedule a user for removal on a single variation per flag. To learn more about semantic patches, read [Updates](/#section/Updates). If you previously patched the flag, and the patch included the user's data, LaunchDarkly continues to use that data. If LaunchDarkly has never encountered the user's key before, it calculates the flag values based on the user key alone.
        Parameters:
        projKey - The project key. (required)
        userKey - The user key. (required)
        envKey - The environment key. (required)
        patchWithComment - (required)
        Returns:
        ExpiringUserTargetPatchResponse
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • patchExpiringFlagsForUserWithHttpInfo

        public ApiResponse<ExpiringUserTargetPatchResponse> patchExpiringFlagsForUserWithHttpInfo​(java.lang.String projKey,
                                                                                                  java.lang.String userKey,
                                                                                                  java.lang.String envKey,
                                                                                                  PatchWithComment patchWithComment)
                                                                                           throws ApiException
        Update expiring user target for flags Schedule the specified user for removal from individual user targeting on one or more flags. You can only schedule a user for removal on a single variation per flag. To learn more about semantic patches, read [Updates](/#section/Updates). If you previously patched the flag, and the patch included the user's data, LaunchDarkly continues to use that data. If LaunchDarkly has never encountered the user's key before, it calculates the flag values based on the user key alone.
        Parameters:
        projKey - The project key. (required)
        userKey - The user key. (required)
        envKey - The environment key. (required)
        patchWithComment - (required)
        Returns:
        ApiResponse<ExpiringUserTargetPatchResponse>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • patchExpiringFlagsForUserAsync

        public okhttp3.Call patchExpiringFlagsForUserAsync​(java.lang.String projKey,
                                                           java.lang.String userKey,
                                                           java.lang.String envKey,
                                                           PatchWithComment patchWithComment,
                                                           ApiCallback<ExpiringUserTargetPatchResponse> _callback)
                                                    throws ApiException
        Update expiring user target for flags (asynchronously) Schedule the specified user for removal from individual user targeting on one or more flags. You can only schedule a user for removal on a single variation per flag. To learn more about semantic patches, read [Updates](/#section/Updates). If you previously patched the flag, and the patch included the user's data, LaunchDarkly continues to use that data. If LaunchDarkly has never encountered the user's key before, it calculates the flag values based on the user key alone.
        Parameters:
        projKey - The project key. (required)
        userKey - The user key. (required)
        envKey - The environment key. (required)
        patchWithComment - (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
      • putFlagSettingCall

        public okhttp3.Call putFlagSettingCall​(java.lang.String projKey,
                                               java.lang.String envKey,
                                               java.lang.String key,
                                               java.lang.String featureKey,
                                               ValuePut valuePut,
                                               ApiCallback _callback)
                                        throws ApiException
        Build call for putFlagSetting
        Parameters:
        projKey - The project key (required)
        envKey - The environment key (required)
        key - The user key (required)
        featureKey - The feature flag key (required)
        valuePut - (required)
        _callback - Callback for upload/download progress
        Returns:
        Call to execute
        Throws:
        ApiException - If fail to serialize the request body object
      • putFlagSetting

        public void putFlagSetting​(java.lang.String projKey,
                                   java.lang.String envKey,
                                   java.lang.String key,
                                   java.lang.String featureKey,
                                   ValuePut valuePut)
                            throws ApiException
        Update flag settings for user Enable or disable a feature flag for a user based on their key. To change the setting, send a `PUT` request to this URL with a request body containing the flag value. For example, to disable the sort.order flag for the user `[email protected]`, send a `PUT` to `https://app.launchdarkly.com/api/v2/users/default/production/[email protected]/flags/sort.order` with the following body: ```json { \"setting\": false } ``` Omitting the setting attribute, or a setting of null, in your `PUT` \"clears\" the current setting for a user. If you previously patched the flag, and the patch included the user's data, LaunchDarkly continues to use that data. If LaunchDarkly has never encountered the user's key before, it calculates the flag values based on the user key alone.
        Parameters:
        projKey - The project key (required)
        envKey - The environment key (required)
        key - The user key (required)
        featureKey - The feature flag key (required)
        valuePut - (required)
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • putFlagSettingWithHttpInfo

        public ApiResponse<java.lang.Void> putFlagSettingWithHttpInfo​(java.lang.String projKey,
                                                                      java.lang.String envKey,
                                                                      java.lang.String key,
                                                                      java.lang.String featureKey,
                                                                      ValuePut valuePut)
                                                               throws ApiException
        Update flag settings for user Enable or disable a feature flag for a user based on their key. To change the setting, send a `PUT` request to this URL with a request body containing the flag value. For example, to disable the sort.order flag for the user `[email protected]`, send a `PUT` to `https://app.launchdarkly.com/api/v2/users/default/production/[email protected]/flags/sort.order` with the following body: ```json { \"setting\": false } ``` Omitting the setting attribute, or a setting of null, in your `PUT` \"clears\" the current setting for a user. If you previously patched the flag, and the patch included the user's data, LaunchDarkly continues to use that data. If LaunchDarkly has never encountered the user's key before, it calculates the flag values based on the user key alone.
        Parameters:
        projKey - The project key (required)
        envKey - The environment key (required)
        key - The user key (required)
        featureKey - The feature flag key (required)
        valuePut - (required)
        Returns:
        ApiResponse<Void>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • putFlagSettingAsync

        public okhttp3.Call putFlagSettingAsync​(java.lang.String projKey,
                                                java.lang.String envKey,
                                                java.lang.String key,
                                                java.lang.String featureKey,
                                                ValuePut valuePut,
                                                ApiCallback<java.lang.Void> _callback)
                                         throws ApiException
        Update flag settings for user (asynchronously) Enable or disable a feature flag for a user based on their key. To change the setting, send a `PUT` request to this URL with a request body containing the flag value. For example, to disable the sort.order flag for the user `[email protected]`, send a `PUT` to `https://app.launchdarkly.com/api/v2/users/default/production/[email protected]/flags/sort.order` with the following body: ```json { \"setting\": false } ``` Omitting the setting attribute, or a setting of null, in your `PUT` \"clears\" the current setting for a user. If you previously patched the flag, and the patch included the user's data, LaunchDarkly continues to use that data. If LaunchDarkly has never encountered the user's key before, it calculates the flag values based on the user key alone.
        Parameters:
        projKey - The project key (required)
        envKey - The environment key (required)
        key - The user key (required)
        featureKey - The feature flag key (required)
        valuePut - (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