Class HoldoutsBetaApi


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

      • HoldoutsBetaApi

        public HoldoutsBetaApi()
      • HoldoutsBetaApi

        public HoldoutsBetaApi​(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)
      • getAllHoldoutsCall

        public okhttp3.Call getAllHoldoutsCall​(@Nonnull
                                               java.lang.String projectKey,
                                               @Nonnull
                                               java.lang.String environmentKey,
                                               @Nullable
                                               java.lang.Long limit,
                                               @Nullable
                                               java.lang.Long offset,
                                               ApiCallback _callback)
                                        throws ApiException
        Build call for getAllHoldouts
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        limit - The number of holdouts to return in the response. Defaults to 20 (optional)
        offset - Where to start in the list. Use this 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
      • getAllHoldouts

        public HoldoutsCollectionRep getAllHoldouts​(@Nonnull
                                                    java.lang.String projectKey,
                                                    @Nonnull
                                                    java.lang.String environmentKey,
                                                    @Nullable
                                                    java.lang.Long limit,
                                                    @Nullable
                                                    java.lang.Long offset)
                                             throws ApiException
        Get all holdouts
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        limit - The number of holdouts to return in the response. Defaults to 20 (optional)
        offset - Where to start in the list. Use this 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:
        HoldoutsCollectionRep
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • getAllHoldoutsWithHttpInfo

        public ApiResponse<HoldoutsCollectionRep> getAllHoldoutsWithHttpInfo​(@Nonnull
                                                                             java.lang.String projectKey,
                                                                             @Nonnull
                                                                             java.lang.String environmentKey,
                                                                             @Nullable
                                                                             java.lang.Long limit,
                                                                             @Nullable
                                                                             java.lang.Long offset)
                                                                      throws ApiException
        Get all holdouts
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        limit - The number of holdouts to return in the response. Defaults to 20 (optional)
        offset - Where to start in the list. Use this 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<HoldoutsCollectionRep>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • getAllHoldoutsAsync

        public okhttp3.Call getAllHoldoutsAsync​(@Nonnull
                                                java.lang.String projectKey,
                                                @Nonnull
                                                java.lang.String environmentKey,
                                                @Nullable
                                                java.lang.Long limit,
                                                @Nullable
                                                java.lang.Long offset,
                                                ApiCallback<HoldoutsCollectionRep> _callback)
                                         throws ApiException
        Get all holdouts (asynchronously)
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        limit - The number of holdouts to return in the response. Defaults to 20 (optional)
        offset - Where to start in the list. Use this 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
      • getHoldoutCall

        public okhttp3.Call getHoldoutCall​(@Nonnull
                                           java.lang.String projectKey,
                                           @Nonnull
                                           java.lang.String environmentKey,
                                           @Nonnull
                                           java.lang.String holdoutKey,
                                           @Nullable
                                           java.lang.String expand,
                                           ApiCallback _callback)
                                    throws ApiException
        Build call for getHoldout
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        holdoutKey - The holdout experiment key (required)
        expand - A comma-separated list of properties that can reveal additional information in the response. Supported fields are explained above. Holdout experiment expansion fields have no prefix. Related experiment expansion fields have `rel-` as a prefix. (optional)
        _callback - Callback for upload/download progress
        Returns:
        Call to execute
        Throws:
        ApiException - If fail to serialize the request body object
      • getHoldout

        public HoldoutDetailRep getHoldout​(@Nonnull
                                           java.lang.String projectKey,
                                           @Nonnull
                                           java.lang.String environmentKey,
                                           @Nonnull
                                           java.lang.String holdoutKey,
                                           @Nullable
                                           java.lang.String expand)
                                    throws ApiException
        Get holdout Get details about a holdout. ### Expanding the holdout response LaunchDarkly supports the following fields for expanding the \"Get holdout\" response. By default, these fields are **not** included in the response. To expand the response, append the `expand` query parameter and add a comma-separated list with any of the following fields: - `draftIteration` includes the iteration which has not been started yet, if any, for this holdout. - `previousIterations` includes all iterations prior to the current iteration, for this holdout. By default only the current iteration is included in the response. - `rel-draftIteration` includes the iteration which has not been started yet, if any, for the experiments related to this holdout. - `rel-metrics` includes metrics for experiments related to this holdout. - `rel-previousIterations` includes all iterations prior to the current iteration, for the experiments related to this holdout. - `rel-secondaryMetrics` includes secondary metrics for experiments related to this holdout. - `rel-treatments` includes all treatment and parameter details for experiments related to this holdout. - `secondaryMetrics` includes secondary metrics for this holdout. By default only the primary metric is included in the response. - `treatments` includes all treatment and parameter details for this holdout. By default treatment data is not included in the response. For example, `expand=draftIteration,rel-draftIteration` includes the `draftIteration` and `rel-draftIteration` fields in the response. If fields that you request with the `expand` query parameter are empty, they are not included in the response.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        holdoutKey - The holdout experiment key (required)
        expand - A comma-separated list of properties that can reveal additional information in the response. Supported fields are explained above. Holdout experiment expansion fields have no prefix. Related experiment expansion fields have `rel-` as a prefix. (optional)
        Returns:
        HoldoutDetailRep
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • getHoldoutWithHttpInfo

        public ApiResponse<HoldoutDetailRep> getHoldoutWithHttpInfo​(@Nonnull
                                                                    java.lang.String projectKey,
                                                                    @Nonnull
                                                                    java.lang.String environmentKey,
                                                                    @Nonnull
                                                                    java.lang.String holdoutKey,
                                                                    @Nullable
                                                                    java.lang.String expand)
                                                             throws ApiException
        Get holdout Get details about a holdout. ### Expanding the holdout response LaunchDarkly supports the following fields for expanding the \"Get holdout\" response. By default, these fields are **not** included in the response. To expand the response, append the `expand` query parameter and add a comma-separated list with any of the following fields: - `draftIteration` includes the iteration which has not been started yet, if any, for this holdout. - `previousIterations` includes all iterations prior to the current iteration, for this holdout. By default only the current iteration is included in the response. - `rel-draftIteration` includes the iteration which has not been started yet, if any, for the experiments related to this holdout. - `rel-metrics` includes metrics for experiments related to this holdout. - `rel-previousIterations` includes all iterations prior to the current iteration, for the experiments related to this holdout. - `rel-secondaryMetrics` includes secondary metrics for experiments related to this holdout. - `rel-treatments` includes all treatment and parameter details for experiments related to this holdout. - `secondaryMetrics` includes secondary metrics for this holdout. By default only the primary metric is included in the response. - `treatments` includes all treatment and parameter details for this holdout. By default treatment data is not included in the response. For example, `expand=draftIteration,rel-draftIteration` includes the `draftIteration` and `rel-draftIteration` fields in the response. If fields that you request with the `expand` query parameter are empty, they are not included in the response.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        holdoutKey - The holdout experiment key (required)
        expand - A comma-separated list of properties that can reveal additional information in the response. Supported fields are explained above. Holdout experiment expansion fields have no prefix. Related experiment expansion fields have `rel-` as a prefix. (optional)
        Returns:
        ApiResponse<HoldoutDetailRep>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • getHoldoutAsync

        public okhttp3.Call getHoldoutAsync​(@Nonnull
                                            java.lang.String projectKey,
                                            @Nonnull
                                            java.lang.String environmentKey,
                                            @Nonnull
                                            java.lang.String holdoutKey,
                                            @Nullable
                                            java.lang.String expand,
                                            ApiCallback<HoldoutDetailRep> _callback)
                                     throws ApiException
        Get holdout (asynchronously) Get details about a holdout. ### Expanding the holdout response LaunchDarkly supports the following fields for expanding the \"Get holdout\" response. By default, these fields are **not** included in the response. To expand the response, append the `expand` query parameter and add a comma-separated list with any of the following fields: - `draftIteration` includes the iteration which has not been started yet, if any, for this holdout. - `previousIterations` includes all iterations prior to the current iteration, for this holdout. By default only the current iteration is included in the response. - `rel-draftIteration` includes the iteration which has not been started yet, if any, for the experiments related to this holdout. - `rel-metrics` includes metrics for experiments related to this holdout. - `rel-previousIterations` includes all iterations prior to the current iteration, for the experiments related to this holdout. - `rel-secondaryMetrics` includes secondary metrics for experiments related to this holdout. - `rel-treatments` includes all treatment and parameter details for experiments related to this holdout. - `secondaryMetrics` includes secondary metrics for this holdout. By default only the primary metric is included in the response. - `treatments` includes all treatment and parameter details for this holdout. By default treatment data is not included in the response. For example, `expand=draftIteration,rel-draftIteration` includes the `draftIteration` and `rel-draftIteration` fields in the response. If fields that you request with the `expand` query parameter are empty, they are not included in the response.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        holdoutKey - The holdout experiment key (required)
        expand - A comma-separated list of properties that can reveal additional information in the response. Supported fields are explained above. Holdout experiment expansion fields have no prefix. Related experiment expansion fields have `rel-` as a prefix. (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
      • getHoldoutByIdCall

        public okhttp3.Call getHoldoutByIdCall​(@Nonnull
                                               java.lang.String projectKey,
                                               @Nonnull
                                               java.lang.String environmentKey,
                                               @Nonnull
                                               java.lang.String holdoutId,
                                               ApiCallback _callback)
                                        throws ApiException
        Build call for getHoldoutById
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        holdoutId - The holdout experiment ID (required)
        _callback - Callback for upload/download progress
        Returns:
        Call to execute
        Throws:
        ApiException - If fail to serialize the request body object
      • getHoldoutById

        public HoldoutRep getHoldoutById​(@Nonnull
                                         java.lang.String projectKey,
                                         @Nonnull
                                         java.lang.String environmentKey,
                                         @Nonnull
                                         java.lang.String holdoutId)
                                  throws ApiException
        Get Holdout by Id
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        holdoutId - The holdout experiment ID (required)
        Returns:
        HoldoutRep
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • getHoldoutByIdWithHttpInfo

        public ApiResponse<HoldoutRep> getHoldoutByIdWithHttpInfo​(@Nonnull
                                                                  java.lang.String projectKey,
                                                                  @Nonnull
                                                                  java.lang.String environmentKey,
                                                                  @Nonnull
                                                                  java.lang.String holdoutId)
                                                           throws ApiException
        Get Holdout by Id
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        holdoutId - The holdout experiment ID (required)
        Returns:
        ApiResponse<HoldoutRep>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • getHoldoutByIdAsync

        public okhttp3.Call getHoldoutByIdAsync​(@Nonnull
                                                java.lang.String projectKey,
                                                @Nonnull
                                                java.lang.String environmentKey,
                                                @Nonnull
                                                java.lang.String holdoutId,
                                                ApiCallback<HoldoutRep> _callback)
                                         throws ApiException
        Get Holdout by Id (asynchronously)
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        holdoutId - The holdout experiment ID (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
      • patchHoldoutCall

        public okhttp3.Call patchHoldoutCall​(@Nonnull
                                             java.lang.String projectKey,
                                             @Nonnull
                                             java.lang.String environmentKey,
                                             @Nonnull
                                             java.lang.String holdoutKey,
                                             @Nonnull
                                             HoldoutPatchInput holdoutPatchInput,
                                             ApiCallback _callback)
                                      throws ApiException
        Build call for patchHoldout
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        holdoutKey - The holdout key (required)
        holdoutPatchInput - (required)
        _callback - Callback for upload/download progress
        Returns:
        Call to execute
        Throws:
        ApiException - If fail to serialize the request body object
      • patchHoldout

        public HoldoutRep patchHoldout​(@Nonnull
                                       java.lang.String projectKey,
                                       @Nonnull
                                       java.lang.String environmentKey,
                                       @Nonnull
                                       java.lang.String holdoutKey,
                                       @Nonnull
                                       HoldoutPatchInput holdoutPatchInput)
                                throws ApiException
        Patch holdout Updates an existing holdout, and returns the updated holdout. Updating holdouts uses the semantic patch format. 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](https://launchdarkly.com/docs/api#updates-using-semantic-patch). ### Instructions Semantic patch requests support the following `kind` instructions for updating holdouts. <details> <summary>Click to expand instructions for <strong>updating holdouts</strong></summary> #### endHoldout Ends a holdout. ##### Parameters None. Here's an example: ```json { \"comment\": \"Optional comment describing why the holdout is ending\", \"instructions\": [{ \"kind\": \"endHoldout\" }] } ``` #### removeExperiment Removes an experiment from a holdout. ##### Parameters - `value`: The key of the experiment to remove Here's an example: ```json { \"comment\": \"Optional comment describing the change\", \"instructions\": [{ \"kind\": \"removeExperiment\", \"value\": \"experiment-key\" }] } ``` #### updateDescription Updates the description of the holdout. ##### Parameters - `value`: The new description. Here's an example: ```json { \"comment\": \"Optional comment describing the update\", \"instructions\": [{ \"kind\": \"updateDescription\", \"value\": \"Updated holdout description\" }] } ``` #### updateName Updates the name of the holdout. ##### Parameters - `value`: The new name. Here's an example: ```json { \"comment\": \"Optional comment describing the update\", \"instructions\": [{ \"kind\": \"updateName\", \"value\": \"Updated holdout name\" }] } ``` </details>
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        holdoutKey - The holdout key (required)
        holdoutPatchInput - (required)
        Returns:
        HoldoutRep
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • patchHoldoutWithHttpInfo

        public ApiResponse<HoldoutRep> patchHoldoutWithHttpInfo​(@Nonnull
                                                                java.lang.String projectKey,
                                                                @Nonnull
                                                                java.lang.String environmentKey,
                                                                @Nonnull
                                                                java.lang.String holdoutKey,
                                                                @Nonnull
                                                                HoldoutPatchInput holdoutPatchInput)
                                                         throws ApiException
        Patch holdout Updates an existing holdout, and returns the updated holdout. Updating holdouts uses the semantic patch format. 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](https://launchdarkly.com/docs/api#updates-using-semantic-patch). ### Instructions Semantic patch requests support the following `kind` instructions for updating holdouts. <details> <summary>Click to expand instructions for <strong>updating holdouts</strong></summary> #### endHoldout Ends a holdout. ##### Parameters None. Here's an example: ```json { \"comment\": \"Optional comment describing why the holdout is ending\", \"instructions\": [{ \"kind\": \"endHoldout\" }] } ``` #### removeExperiment Removes an experiment from a holdout. ##### Parameters - `value`: The key of the experiment to remove Here's an example: ```json { \"comment\": \"Optional comment describing the change\", \"instructions\": [{ \"kind\": \"removeExperiment\", \"value\": \"experiment-key\" }] } ``` #### updateDescription Updates the description of the holdout. ##### Parameters - `value`: The new description. Here's an example: ```json { \"comment\": \"Optional comment describing the update\", \"instructions\": [{ \"kind\": \"updateDescription\", \"value\": \"Updated holdout description\" }] } ``` #### updateName Updates the name of the holdout. ##### Parameters - `value`: The new name. Here's an example: ```json { \"comment\": \"Optional comment describing the update\", \"instructions\": [{ \"kind\": \"updateName\", \"value\": \"Updated holdout name\" }] } ``` </details>
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        holdoutKey - The holdout key (required)
        holdoutPatchInput - (required)
        Returns:
        ApiResponse<HoldoutRep>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • patchHoldoutAsync

        public okhttp3.Call patchHoldoutAsync​(@Nonnull
                                              java.lang.String projectKey,
                                              @Nonnull
                                              java.lang.String environmentKey,
                                              @Nonnull
                                              java.lang.String holdoutKey,
                                              @Nonnull
                                              HoldoutPatchInput holdoutPatchInput,
                                              ApiCallback<HoldoutRep> _callback)
                                       throws ApiException
        Patch holdout (asynchronously) Updates an existing holdout, and returns the updated holdout. Updating holdouts uses the semantic patch format. 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](https://launchdarkly.com/docs/api#updates-using-semantic-patch). ### Instructions Semantic patch requests support the following `kind` instructions for updating holdouts. <details> <summary>Click to expand instructions for <strong>updating holdouts</strong></summary> #### endHoldout Ends a holdout. ##### Parameters None. Here's an example: ```json { \"comment\": \"Optional comment describing why the holdout is ending\", \"instructions\": [{ \"kind\": \"endHoldout\" }] } ``` #### removeExperiment Removes an experiment from a holdout. ##### Parameters - `value`: The key of the experiment to remove Here's an example: ```json { \"comment\": \"Optional comment describing the change\", \"instructions\": [{ \"kind\": \"removeExperiment\", \"value\": \"experiment-key\" }] } ``` #### updateDescription Updates the description of the holdout. ##### Parameters - `value`: The new description. Here's an example: ```json { \"comment\": \"Optional comment describing the update\", \"instructions\": [{ \"kind\": \"updateDescription\", \"value\": \"Updated holdout description\" }] } ``` #### updateName Updates the name of the holdout. ##### Parameters - `value`: The new name. Here's an example: ```json { \"comment\": \"Optional comment describing the update\", \"instructions\": [{ \"kind\": \"updateName\", \"value\": \"Updated holdout name\" }] } ``` </details>
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        holdoutKey - The holdout key (required)
        holdoutPatchInput - (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
      • postHoldoutCall

        public okhttp3.Call postHoldoutCall​(@Nonnull
                                            java.lang.String projectKey,
                                            @Nonnull
                                            java.lang.String environmentKey,
                                            @Nonnull
                                            HoldoutPostRequest holdoutPostRequest,
                                            ApiCallback _callback)
                                     throws ApiException
        Build call for postHoldout
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        holdoutPostRequest - (required)
        _callback - Callback for upload/download progress
        Returns:
        Call to execute
        Throws:
        ApiException - If fail to serialize the request body object
      • postHoldout

        public HoldoutRep postHoldout​(@Nonnull
                                      java.lang.String projectKey,
                                      @Nonnull
                                      java.lang.String environmentKey,
                                      @Nonnull
                                      HoldoutPostRequest holdoutPostRequest)
                               throws ApiException
        Create holdout Create a new holdout in the specified project.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        holdoutPostRequest - (required)
        Returns:
        HoldoutRep
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • postHoldoutWithHttpInfo

        public ApiResponse<HoldoutRep> postHoldoutWithHttpInfo​(@Nonnull
                                                               java.lang.String projectKey,
                                                               @Nonnull
                                                               java.lang.String environmentKey,
                                                               @Nonnull
                                                               HoldoutPostRequest holdoutPostRequest)
                                                        throws ApiException
        Create holdout Create a new holdout in the specified project.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        holdoutPostRequest - (required)
        Returns:
        ApiResponse<HoldoutRep>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • postHoldoutAsync

        public okhttp3.Call postHoldoutAsync​(@Nonnull
                                             java.lang.String projectKey,
                                             @Nonnull
                                             java.lang.String environmentKey,
                                             @Nonnull
                                             HoldoutPostRequest holdoutPostRequest,
                                             ApiCallback<HoldoutRep> _callback)
                                      throws ApiException
        Create holdout (asynchronously) Create a new holdout in the specified project.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        holdoutPostRequest - (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