Class FlagTriggersApi


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

      • FlagTriggersApi

        public FlagTriggersApi()
      • FlagTriggersApi

        public FlagTriggersApi​(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)
      • createTriggerWorkflowCall

        public okhttp3.Call createTriggerWorkflowCall​(java.lang.String projectKey,
                                                      java.lang.String environmentKey,
                                                      java.lang.String featureFlagKey,
                                                      TriggerPost triggerPost,
                                                      ApiCallback _callback)
                                               throws ApiException
        Build call for createTriggerWorkflow
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        featureFlagKey - The feature flag key (required)
        triggerPost - (required)
        _callback - Callback for upload/download progress
        Returns:
        Call to execute
        Throws:
        ApiException - If fail to serialize the request body object
      • createTriggerWorkflow

        public TriggerWorkflowRep createTriggerWorkflow​(java.lang.String projectKey,
                                                        java.lang.String environmentKey,
                                                        java.lang.String featureFlagKey,
                                                        TriggerPost triggerPost)
                                                 throws ApiException
        Create flag trigger Create a new flag trigger.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        featureFlagKey - The feature flag key (required)
        triggerPost - (required)
        Returns:
        TriggerWorkflowRep
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • createTriggerWorkflowWithHttpInfo

        public ApiResponse<TriggerWorkflowRep> createTriggerWorkflowWithHttpInfo​(java.lang.String projectKey,
                                                                                 java.lang.String environmentKey,
                                                                                 java.lang.String featureFlagKey,
                                                                                 TriggerPost triggerPost)
                                                                          throws ApiException
        Create flag trigger Create a new flag trigger.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        featureFlagKey - The feature flag key (required)
        triggerPost - (required)
        Returns:
        ApiResponse<TriggerWorkflowRep>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • createTriggerWorkflowAsync

        public okhttp3.Call createTriggerWorkflowAsync​(java.lang.String projectKey,
                                                       java.lang.String environmentKey,
                                                       java.lang.String featureFlagKey,
                                                       TriggerPost triggerPost,
                                                       ApiCallback<TriggerWorkflowRep> _callback)
                                                throws ApiException
        Create flag trigger (asynchronously) Create a new flag trigger.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        featureFlagKey - The feature flag key (required)
        triggerPost - (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
      • deleteTriggerWorkflowCall

        public okhttp3.Call deleteTriggerWorkflowCall​(java.lang.String projectKey,
                                                      java.lang.String environmentKey,
                                                      java.lang.String featureFlagKey,
                                                      java.lang.String id,
                                                      ApiCallback _callback)
                                               throws ApiException
        Build call for deleteTriggerWorkflow
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        featureFlagKey - The feature flag key (required)
        id - The flag trigger ID (required)
        _callback - Callback for upload/download progress
        Returns:
        Call to execute
        Throws:
        ApiException - If fail to serialize the request body object
      • deleteTriggerWorkflow

        public void deleteTriggerWorkflow​(java.lang.String projectKey,
                                          java.lang.String environmentKey,
                                          java.lang.String featureFlagKey,
                                          java.lang.String id)
                                   throws ApiException
        Delete flag trigger Delete a flag trigger by ID.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        featureFlagKey - The feature flag key (required)
        id - The flag trigger ID (required)
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • deleteTriggerWorkflowWithHttpInfo

        public ApiResponse<java.lang.Void> deleteTriggerWorkflowWithHttpInfo​(java.lang.String projectKey,
                                                                             java.lang.String environmentKey,
                                                                             java.lang.String featureFlagKey,
                                                                             java.lang.String id)
                                                                      throws ApiException
        Delete flag trigger Delete a flag trigger by ID.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        featureFlagKey - The feature flag key (required)
        id - The flag trigger ID (required)
        Returns:
        ApiResponse<Void>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • deleteTriggerWorkflowAsync

        public okhttp3.Call deleteTriggerWorkflowAsync​(java.lang.String projectKey,
                                                       java.lang.String environmentKey,
                                                       java.lang.String featureFlagKey,
                                                       java.lang.String id,
                                                       ApiCallback<java.lang.Void> _callback)
                                                throws ApiException
        Delete flag trigger (asynchronously) Delete a flag trigger by ID.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        featureFlagKey - The feature flag key (required)
        id - The flag trigger 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
      • getTriggerWorkflowByIdCall

        public okhttp3.Call getTriggerWorkflowByIdCall​(java.lang.String projectKey,
                                                       java.lang.String featureFlagKey,
                                                       java.lang.String environmentKey,
                                                       java.lang.String id,
                                                       ApiCallback _callback)
                                                throws ApiException
        Build call for getTriggerWorkflowById
        Parameters:
        projectKey - The project key (required)
        featureFlagKey - The feature flag key (required)
        environmentKey - The environment key (required)
        id - The flag trigger ID (required)
        _callback - Callback for upload/download progress
        Returns:
        Call to execute
        Throws:
        ApiException - If fail to serialize the request body object
      • getTriggerWorkflowById

        public TriggerWorkflowRep getTriggerWorkflowById​(java.lang.String projectKey,
                                                         java.lang.String featureFlagKey,
                                                         java.lang.String environmentKey,
                                                         java.lang.String id)
                                                  throws ApiException
        Get flag trigger by ID Get a flag trigger by ID.
        Parameters:
        projectKey - The project key (required)
        featureFlagKey - The feature flag key (required)
        environmentKey - The environment key (required)
        id - The flag trigger ID (required)
        Returns:
        TriggerWorkflowRep
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • getTriggerWorkflowByIdWithHttpInfo

        public ApiResponse<TriggerWorkflowRep> getTriggerWorkflowByIdWithHttpInfo​(java.lang.String projectKey,
                                                                                  java.lang.String featureFlagKey,
                                                                                  java.lang.String environmentKey,
                                                                                  java.lang.String id)
                                                                           throws ApiException
        Get flag trigger by ID Get a flag trigger by ID.
        Parameters:
        projectKey - The project key (required)
        featureFlagKey - The feature flag key (required)
        environmentKey - The environment key (required)
        id - The flag trigger ID (required)
        Returns:
        ApiResponse<TriggerWorkflowRep>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • getTriggerWorkflowByIdAsync

        public okhttp3.Call getTriggerWorkflowByIdAsync​(java.lang.String projectKey,
                                                        java.lang.String featureFlagKey,
                                                        java.lang.String environmentKey,
                                                        java.lang.String id,
                                                        ApiCallback<TriggerWorkflowRep> _callback)
                                                 throws ApiException
        Get flag trigger by ID (asynchronously) Get a flag trigger by ID.
        Parameters:
        projectKey - The project key (required)
        featureFlagKey - The feature flag key (required)
        environmentKey - The environment key (required)
        id - The flag trigger 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
      • getTriggerWorkflowsCall

        public okhttp3.Call getTriggerWorkflowsCall​(java.lang.String projectKey,
                                                    java.lang.String environmentKey,
                                                    java.lang.String featureFlagKey,
                                                    ApiCallback _callback)
                                             throws ApiException
        Build call for getTriggerWorkflows
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment 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
      • getTriggerWorkflows

        public TriggerWorkflowCollectionRep getTriggerWorkflows​(java.lang.String projectKey,
                                                                java.lang.String environmentKey,
                                                                java.lang.String featureFlagKey)
                                                         throws ApiException
        List flag triggers Get a list of all flag triggers.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        featureFlagKey - The feature flag key (required)
        Returns:
        TriggerWorkflowCollectionRep
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • getTriggerWorkflowsWithHttpInfo

        public ApiResponse<TriggerWorkflowCollectionRep> getTriggerWorkflowsWithHttpInfo​(java.lang.String projectKey,
                                                                                         java.lang.String environmentKey,
                                                                                         java.lang.String featureFlagKey)
                                                                                  throws ApiException
        List flag triggers Get a list of all flag triggers.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        featureFlagKey - The feature flag key (required)
        Returns:
        ApiResponse<TriggerWorkflowCollectionRep>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • getTriggerWorkflowsAsync

        public okhttp3.Call getTriggerWorkflowsAsync​(java.lang.String projectKey,
                                                     java.lang.String environmentKey,
                                                     java.lang.String featureFlagKey,
                                                     ApiCallback<TriggerWorkflowCollectionRep> _callback)
                                              throws ApiException
        List flag triggers (asynchronously) Get a list of all flag triggers.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment 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
      • patchTriggerWorkflowCall

        public okhttp3.Call patchTriggerWorkflowCall​(java.lang.String projectKey,
                                                     java.lang.String environmentKey,
                                                     java.lang.String featureFlagKey,
                                                     java.lang.String id,
                                                     FlagTriggerInput flagTriggerInput,
                                                     ApiCallback _callback)
                                              throws ApiException
        Build call for patchTriggerWorkflow
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        featureFlagKey - The feature flag key (required)
        id - The flag trigger ID (required)
        flagTriggerInput - (required)
        _callback - Callback for upload/download progress
        Returns:
        Call to execute
        Throws:
        ApiException - If fail to serialize the request body object
      • patchTriggerWorkflow

        public TriggerWorkflowRep patchTriggerWorkflow​(java.lang.String projectKey,
                                                       java.lang.String environmentKey,
                                                       java.lang.String featureFlagKey,
                                                       java.lang.String id,
                                                       FlagTriggerInput flagTriggerInput)
                                                throws ApiException
        Update flag trigger Update a flag trigger. Updating a flag trigger 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](/reference#updates-using-semantic-patch). ### Instructions Semantic patch requests support the following `kind` instructions for updating flag triggers. #### replaceTriggerActionInstructions Removes the existing trigger action and replaces it with the new instructions. ##### Parameters - `value`: An array of the new `kind`s of actions to perform when triggering. Supported flag actions are `turnFlagOn` and `turnFlagOff`. For example, to replace the trigger action instructions, use this request body: ```json { \"comment\": \"optional comment\", \"instructions\": [ { \"kind\": \"replaceTriggerActionInstructions\", \"value\": [ {\"kind\": \"turnFlagOff\"} ] } ] } ``` #### cycleTriggerUrl Generates a new URL for this trigger. You must update any clients using the trigger to use this new URL. #### disableTrigger Disables the trigger. This saves the trigger configuration, but the trigger stops running. To re-enable, use `enableTrigger`. #### enableTrigger Enables the trigger. If you previously disabled the trigger, it begins running again.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        featureFlagKey - The feature flag key (required)
        id - The flag trigger ID (required)
        flagTriggerInput - (required)
        Returns:
        TriggerWorkflowRep
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • patchTriggerWorkflowWithHttpInfo

        public ApiResponse<TriggerWorkflowRep> patchTriggerWorkflowWithHttpInfo​(java.lang.String projectKey,
                                                                                java.lang.String environmentKey,
                                                                                java.lang.String featureFlagKey,
                                                                                java.lang.String id,
                                                                                FlagTriggerInput flagTriggerInput)
                                                                         throws ApiException
        Update flag trigger Update a flag trigger. Updating a flag trigger 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](/reference#updates-using-semantic-patch). ### Instructions Semantic patch requests support the following `kind` instructions for updating flag triggers. #### replaceTriggerActionInstructions Removes the existing trigger action and replaces it with the new instructions. ##### Parameters - `value`: An array of the new `kind`s of actions to perform when triggering. Supported flag actions are `turnFlagOn` and `turnFlagOff`. For example, to replace the trigger action instructions, use this request body: ```json { \"comment\": \"optional comment\", \"instructions\": [ { \"kind\": \"replaceTriggerActionInstructions\", \"value\": [ {\"kind\": \"turnFlagOff\"} ] } ] } ``` #### cycleTriggerUrl Generates a new URL for this trigger. You must update any clients using the trigger to use this new URL. #### disableTrigger Disables the trigger. This saves the trigger configuration, but the trigger stops running. To re-enable, use `enableTrigger`. #### enableTrigger Enables the trigger. If you previously disabled the trigger, it begins running again.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        featureFlagKey - The feature flag key (required)
        id - The flag trigger ID (required)
        flagTriggerInput - (required)
        Returns:
        ApiResponse<TriggerWorkflowRep>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • patchTriggerWorkflowAsync

        public okhttp3.Call patchTriggerWorkflowAsync​(java.lang.String projectKey,
                                                      java.lang.String environmentKey,
                                                      java.lang.String featureFlagKey,
                                                      java.lang.String id,
                                                      FlagTriggerInput flagTriggerInput,
                                                      ApiCallback<TriggerWorkflowRep> _callback)
                                               throws ApiException
        Update flag trigger (asynchronously) Update a flag trigger. Updating a flag trigger 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](/reference#updates-using-semantic-patch). ### Instructions Semantic patch requests support the following `kind` instructions for updating flag triggers. #### replaceTriggerActionInstructions Removes the existing trigger action and replaces it with the new instructions. ##### Parameters - `value`: An array of the new `kind`s of actions to perform when triggering. Supported flag actions are `turnFlagOn` and `turnFlagOff`. For example, to replace the trigger action instructions, use this request body: ```json { \"comment\": \"optional comment\", \"instructions\": [ { \"kind\": \"replaceTriggerActionInstructions\", \"value\": [ {\"kind\": \"turnFlagOff\"} ] } ] } ``` #### cycleTriggerUrl Generates a new URL for this trigger. You must update any clients using the trigger to use this new URL. #### disableTrigger Disables the trigger. This saves the trigger configuration, but the trigger stops running. To re-enable, use `enableTrigger`. #### enableTrigger Enables the trigger. If you previously disabled the trigger, it begins running again.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        featureFlagKey - The feature flag key (required)
        id - The flag trigger ID (required)
        flagTriggerInput - (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