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)
      • getHostIndex

        public int getHostIndex()
      • setHostIndex

        public void setHostIndex​(int hostIndex)
      • getCustomBaseUrl

        public java.lang.String getCustomBaseUrl()
      • setCustomBaseUrl

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

        public okhttp3.Call getExpiringFlagsForUserCall​(java.lang.String projectKey,
                                                        java.lang.String userKey,
                                                        java.lang.String environmentKey,
                                                        ApiCallback _callback)
                                                 throws ApiException
        Build call for getExpiringFlagsForUser
        Parameters:
        projectKey - The project key (required)
        userKey - The user key (required)
        environmentKey - 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 projectKey,
                                                                     java.lang.String userKey,
                                                                     java.lang.String environmentKey)
                                                              throws ApiException
        Get expiring dates on flags for user Get a list of flags for which the given user is scheduled for removal.
        Parameters:
        projectKey - The project key (required)
        userKey - The user key (required)
        environmentKey - 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 projectKey,
                                                                                              java.lang.String userKey,
                                                                                              java.lang.String environmentKey)
                                                                                       throws ApiException
        Get expiring dates on flags for user Get a list of flags for which the given user is scheduled for removal.
        Parameters:
        projectKey - The project key (required)
        userKey - The user key (required)
        environmentKey - 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 projectKey,
                                                         java.lang.String userKey,
                                                         java.lang.String environmentKey,
                                                         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:
        projectKey - The project key (required)
        userKey - The user key (required)
        environmentKey - 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 projectKey,
                                                   java.lang.String environmentKey,
                                                   java.lang.String userKey,
                                                   java.lang.String featureFlagKey,
                                                   ApiCallback _callback)
                                            throws ApiException
        Build call for getUserFlagSetting
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        userKey - The user key (required)
        featureFlagKey - 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 projectKey,
                                                  java.lang.String environmentKey,
                                                  java.lang.String userKey,
                                                  java.lang.String featureFlagKey)
                                           throws ApiException
        Get flag setting for user Get a single flag setting for a user by flag key. <br /><br />The `_value` is the flag variation that the user receives. The `setting` 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`. The example response indicates that the user `Abbie_Braun` has the `sort.order` flag enabled.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        userKey - The user key (required)
        featureFlagKey - 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 projectKey,
                                                                           java.lang.String environmentKey,
                                                                           java.lang.String userKey,
                                                                           java.lang.String featureFlagKey)
                                                                    throws ApiException
        Get flag setting for user Get a single flag setting for a user by flag key. <br /><br />The `_value` is the flag variation that the user receives. The `setting` 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`. The example response indicates that the user `Abbie_Braun` has the `sort.order` flag enabled.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        userKey - The user key (required)
        featureFlagKey - 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 projectKey,
                                                    java.lang.String environmentKey,
                                                    java.lang.String userKey,
                                                    java.lang.String featureFlagKey,
                                                    ApiCallback<UserFlagSetting> _callback)
                                             throws ApiException
        Get flag setting for user (asynchronously) Get a single flag setting for a user by flag key. <br /><br />The `_value` is the flag variation that the user receives. The `setting` 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`. The example response indicates that the user `Abbie_Braun` has the `sort.order` flag enabled.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        userKey - The user key (required)
        featureFlagKey - 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 projectKey,
                                                    java.lang.String environmentKey,
                                                    java.lang.String userKey,
                                                    ApiCallback _callback)
                                             throws ApiException
        Build call for getUserFlagSettings
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        userKey - 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 projectKey,
                                                    java.lang.String environmentKey,
                                                    java.lang.String userKey)
                                             throws ApiException
        List flag settings for user Get the current flag settings for a given user. <br /><br />The `_value` is the flag variation that the user receives. The `setting` 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`. The example response indicates that the user `Abbie_Braun` has the `sort.order` flag enabled and the `alternate.page` flag disabled, and that the user has not been explicitly targeted to receive a particular variation.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        userKey - 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 projectKey,
                                                                             java.lang.String environmentKey,
                                                                             java.lang.String userKey)
                                                                      throws ApiException
        List flag settings for user Get the current flag settings for a given user. <br /><br />The `_value` is the flag variation that the user receives. The `setting` 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`. The example response indicates that the user `Abbie_Braun` has the `sort.order` flag enabled and the `alternate.page` flag disabled, and that the user has not been explicitly targeted to receive a particular variation.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        userKey - 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 projectKey,
                                                     java.lang.String environmentKey,
                                                     java.lang.String userKey,
                                                     ApiCallback<UserFlagSettings> _callback)
                                              throws ApiException
        List flag settings for user (asynchronously) Get the current flag settings for a given user. <br /><br />The `_value` is the flag variation that the user receives. The `setting` 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`. The example response indicates that the user `Abbie_Braun` has the `sort.order` flag enabled and the `alternate.page` flag disabled, and that the user has not been explicitly targeted to receive a particular variation.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        userKey - 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 projectKey,
                                                          java.lang.String userKey,
                                                          java.lang.String environmentKey,
                                                          PatchUsersRequest patchUsersRequest,
                                                          ApiCallback _callback)
                                                   throws ApiException
        Build call for patchExpiringFlagsForUser
        Parameters:
        projectKey - The project key (required)
        userKey - The user key (required)
        environmentKey - The environment key (required)
        patchUsersRequest - (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 projectKey,
                                                                         java.lang.String userKey,
                                                                         java.lang.String environmentKey,
                                                                         PatchUsersRequest patchUsersRequest)
                                                                  throws ApiException
        Update expiring user target for flags Schedule the specified user for removal from individual targeting on one or more flags. The user must already be individually targeted for each flag. You can add, update, or remove a scheduled removal date. You can only schedule a user for removal on a single variation per flag. This request only supports semantic patches. To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](/reference#updates-using-semantic-patch). ### Instructions #### addExpireUserTargetDate Adds a date and time that LaunchDarkly will remove the user from the flag's individual targeting. ##### Parameters * `value`: The time, in Unix milliseconds, when LaunchDarkly should remove the user from individual targeting for this flag. #### updateExpireUserTargetDate Updates the date and time that LaunchDarkly will remove the user from the flag's individual targeting. ##### Parameters * `value`: The time, in Unix milliseconds, when LaunchDarkly should remove the user from individual targeting for this flag. * `version`: The version of the flag variation to update. You can retrieve this by making a GET request for the flag. #### removeExpireUserTargetDate Removes the scheduled removal of the user from the flag's individual targeting. The user will remain part of the flag's individual targeting until explicitly removed, or until another removal is scheduled.
        Parameters:
        projectKey - The project key (required)
        userKey - The user key (required)
        environmentKey - The environment key (required)
        patchUsersRequest - (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 projectKey,
                                                                                                  java.lang.String userKey,
                                                                                                  java.lang.String environmentKey,
                                                                                                  PatchUsersRequest patchUsersRequest)
                                                                                           throws ApiException
        Update expiring user target for flags Schedule the specified user for removal from individual targeting on one or more flags. The user must already be individually targeted for each flag. You can add, update, or remove a scheduled removal date. You can only schedule a user for removal on a single variation per flag. This request only supports semantic patches. To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](/reference#updates-using-semantic-patch). ### Instructions #### addExpireUserTargetDate Adds a date and time that LaunchDarkly will remove the user from the flag's individual targeting. ##### Parameters * `value`: The time, in Unix milliseconds, when LaunchDarkly should remove the user from individual targeting for this flag. #### updateExpireUserTargetDate Updates the date and time that LaunchDarkly will remove the user from the flag's individual targeting. ##### Parameters * `value`: The time, in Unix milliseconds, when LaunchDarkly should remove the user from individual targeting for this flag. * `version`: The version of the flag variation to update. You can retrieve this by making a GET request for the flag. #### removeExpireUserTargetDate Removes the scheduled removal of the user from the flag's individual targeting. The user will remain part of the flag's individual targeting until explicitly removed, or until another removal is scheduled.
        Parameters:
        projectKey - The project key (required)
        userKey - The user key (required)
        environmentKey - The environment key (required)
        patchUsersRequest - (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 projectKey,
                                                           java.lang.String userKey,
                                                           java.lang.String environmentKey,
                                                           PatchUsersRequest patchUsersRequest,
                                                           ApiCallback<ExpiringUserTargetPatchResponse> _callback)
                                                    throws ApiException
        Update expiring user target for flags (asynchronously) Schedule the specified user for removal from individual targeting on one or more flags. The user must already be individually targeted for each flag. You can add, update, or remove a scheduled removal date. You can only schedule a user for removal on a single variation per flag. This request only supports semantic patches. To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](/reference#updates-using-semantic-patch). ### Instructions #### addExpireUserTargetDate Adds a date and time that LaunchDarkly will remove the user from the flag's individual targeting. ##### Parameters * `value`: The time, in Unix milliseconds, when LaunchDarkly should remove the user from individual targeting for this flag. #### updateExpireUserTargetDate Updates the date and time that LaunchDarkly will remove the user from the flag's individual targeting. ##### Parameters * `value`: The time, in Unix milliseconds, when LaunchDarkly should remove the user from individual targeting for this flag. * `version`: The version of the flag variation to update. You can retrieve this by making a GET request for the flag. #### removeExpireUserTargetDate Removes the scheduled removal of the user from the flag's individual targeting. The user will remain part of the flag's individual targeting until explicitly removed, or until another removal is scheduled.
        Parameters:
        projectKey - The project key (required)
        userKey - The user key (required)
        environmentKey - The environment key (required)
        patchUsersRequest - (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 projectKey,
                                               java.lang.String environmentKey,
                                               java.lang.String userKey,
                                               java.lang.String featureFlagKey,
                                               ValuePut valuePut,
                                               ApiCallback _callback)
                                        throws ApiException
        Build call for putFlagSetting
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        userKey - The user key (required)
        featureFlagKey - 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 projectKey,
                                   java.lang.String environmentKey,
                                   java.lang.String userKey,
                                   java.lang.String featureFlagKey,
                                   ValuePut valuePut)
                            throws ApiException
        Update flag settings for user Enable or disable a feature flag for a user based on their key. Omitting the `setting` attribute from the request body, or including a `setting` of `null`, erases 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:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        userKey - The user key (required)
        featureFlagKey - 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 projectKey,
                                                                      java.lang.String environmentKey,
                                                                      java.lang.String userKey,
                                                                      java.lang.String featureFlagKey,
                                                                      ValuePut valuePut)
                                                               throws ApiException
        Update flag settings for user Enable or disable a feature flag for a user based on their key. Omitting the `setting` attribute from the request body, or including a `setting` of `null`, erases 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:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        userKey - The user key (required)
        featureFlagKey - 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 projectKey,
                                                java.lang.String environmentKey,
                                                java.lang.String userKey,
                                                java.lang.String featureFlagKey,
                                                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. Omitting the `setting` attribute from the request body, or including a `setting` of `null`, erases 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:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        userKey - The user key (required)
        featureFlagKey - 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