Class EnvironmentsApi


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

      • EnvironmentsApi

        public EnvironmentsApi()
      • EnvironmentsApi

        public EnvironmentsApi​(ApiClient apiClient)
    • Method Detail

      • getApiClient

        public ApiClient getApiClient()
      • setApiClient

        public void setApiClient​(ApiClient apiClient)
      • deleteEnvironmentCall

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

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

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

        public okhttp3.Call deleteEnvironmentAsync​(java.lang.String projectKey,
                                                   java.lang.String environmentKey,
                                                   ApiCallback<java.lang.Void> _callback)
                                            throws ApiException
        Delete environment (asynchronously) Delete a environment by key.
        Parameters:
        projectKey - The project 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
      • getEnvironmentCall

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

        public Environment getEnvironment​(java.lang.String projectKey,
                                          java.lang.String environmentKey)
                                   throws ApiException
        Get environment > ### Approval settings > > The `approvalSettings` key is only returned when the Flag Approvals feature is enabled. Get an environment given a project and key.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        Returns:
        Environment
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • getEnvironmentWithHttpInfo

        public ApiResponse<Environment> getEnvironmentWithHttpInfo​(java.lang.String projectKey,
                                                                   java.lang.String environmentKey)
                                                            throws ApiException
        Get environment > ### Approval settings > > The `approvalSettings` key is only returned when the Flag Approvals feature is enabled. Get an environment given a project and key.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        Returns:
        ApiResponse<Environment>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • getEnvironmentAsync

        public okhttp3.Call getEnvironmentAsync​(java.lang.String projectKey,
                                                java.lang.String environmentKey,
                                                ApiCallback<Environment> _callback)
                                         throws ApiException
        Get environment (asynchronously) > ### Approval settings > > The `approvalSettings` key is only returned when the Flag Approvals feature is enabled. Get an environment given a project and key.
        Parameters:
        projectKey - The project 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
      • patchEnvironmentCall

        public okhttp3.Call patchEnvironmentCall​(java.lang.String projectKey,
                                                 java.lang.String environmentKey,
                                                 java.util.List<PatchOperation> patchOperation,
                                                 ApiCallback _callback)
                                          throws ApiException
        Build call for patchEnvironment
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        patchOperation - (required)
        _callback - Callback for upload/download progress
        Returns:
        Call to execute
        Throws:
        ApiException - If fail to serialize the request body object
      • patchEnvironment

        public Environment patchEnvironment​(java.lang.String projectKey,
                                            java.lang.String environmentKey,
                                            java.util.List<PatchOperation> patchOperation)
                                     throws ApiException
        Update environment > ### Approval settings > > The `approvalSettings` key is only returned when the Flag Approvals feature is enabled. > > Only the `canReviewOwnRequest`, `canApplyDeclinedChanges`, `minNumApprovals`, `required` and `requiredApprovalTagsfields` are editable. > > If you try to patch the environment by setting both `required` and `requiredApprovalTags`, it fails and an error appears. Users can specify either required approvals for all flags in an environment or those with specific tags, but not both. Only customers on an Enterprise plan can require approval for flag updates by either mechanism.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        patchOperation - (required)
        Returns:
        Environment
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • patchEnvironmentWithHttpInfo

        public ApiResponse<Environment> patchEnvironmentWithHttpInfo​(java.lang.String projectKey,
                                                                     java.lang.String environmentKey,
                                                                     java.util.List<PatchOperation> patchOperation)
                                                              throws ApiException
        Update environment > ### Approval settings > > The `approvalSettings` key is only returned when the Flag Approvals feature is enabled. > > Only the `canReviewOwnRequest`, `canApplyDeclinedChanges`, `minNumApprovals`, `required` and `requiredApprovalTagsfields` are editable. > > If you try to patch the environment by setting both `required` and `requiredApprovalTags`, it fails and an error appears. Users can specify either required approvals for all flags in an environment or those with specific tags, but not both. Only customers on an Enterprise plan can require approval for flag updates by either mechanism.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        patchOperation - (required)
        Returns:
        ApiResponse<Environment>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • patchEnvironmentAsync

        public okhttp3.Call patchEnvironmentAsync​(java.lang.String projectKey,
                                                  java.lang.String environmentKey,
                                                  java.util.List<PatchOperation> patchOperation,
                                                  ApiCallback<Environment> _callback)
                                           throws ApiException
        Update environment (asynchronously) > ### Approval settings > > The `approvalSettings` key is only returned when the Flag Approvals feature is enabled. > > Only the `canReviewOwnRequest`, `canApplyDeclinedChanges`, `minNumApprovals`, `required` and `requiredApprovalTagsfields` are editable. > > If you try to patch the environment by setting both `required` and `requiredApprovalTags`, it fails and an error appears. Users can specify either required approvals for all flags in an environment or those with specific tags, but not both. Only customers on an Enterprise plan can require approval for flag updates by either mechanism.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        patchOperation - (required)
        _callback - The callback to be executed when the API call finishes
        Returns:
        The request call
        Throws:
        ApiException - If fail to process the API call, e.g. serializing the request body object
      • postEnvironmentCall

        public okhttp3.Call postEnvironmentCall​(java.lang.String projectKey,
                                                EnvironmentPost environmentPost,
                                                ApiCallback _callback)
                                         throws ApiException
        Build call for postEnvironment
        Parameters:
        projectKey - The project key (required)
        environmentPost - (required)
        _callback - Callback for upload/download progress
        Returns:
        Call to execute
        Throws:
        ApiException - If fail to serialize the request body object
      • postEnvironment

        public Environment postEnvironment​(java.lang.String projectKey,
                                           EnvironmentPost environmentPost)
                                    throws ApiException
        Create environment > ### Approval settings > > The `approvalSettings` key is only returned when the Flag Approvals feature is enabled. > > You cannot update approval settings when creating new environments. Update approval settings with the PATCH Environment API. Create a new environment in a specified project with a given name, key, swatch color, and default TTL.
        Parameters:
        projectKey - The project key (required)
        environmentPost - (required)
        Returns:
        Environment
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • postEnvironmentWithHttpInfo

        public ApiResponse<Environment> postEnvironmentWithHttpInfo​(java.lang.String projectKey,
                                                                    EnvironmentPost environmentPost)
                                                             throws ApiException
        Create environment > ### Approval settings > > The `approvalSettings` key is only returned when the Flag Approvals feature is enabled. > > You cannot update approval settings when creating new environments. Update approval settings with the PATCH Environment API. Create a new environment in a specified project with a given name, key, swatch color, and default TTL.
        Parameters:
        projectKey - The project key (required)
        environmentPost - (required)
        Returns:
        ApiResponse<Environment>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • postEnvironmentAsync

        public okhttp3.Call postEnvironmentAsync​(java.lang.String projectKey,
                                                 EnvironmentPost environmentPost,
                                                 ApiCallback<Environment> _callback)
                                          throws ApiException
        Create environment (asynchronously) > ### Approval settings > > The `approvalSettings` key is only returned when the Flag Approvals feature is enabled. > > You cannot update approval settings when creating new environments. Update approval settings with the PATCH Environment API. Create a new environment in a specified project with a given name, key, swatch color, and default TTL.
        Parameters:
        projectKey - The project key (required)
        environmentPost - (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
      • resetEnvironmentMobileKeyCall

        public okhttp3.Call resetEnvironmentMobileKeyCall​(java.lang.String projectKey,
                                                          java.lang.String envKey,
                                                          ApiCallback _callback)
                                                   throws ApiException
        Build call for resetEnvironmentMobileKey
        Parameters:
        projectKey - The project 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
      • resetEnvironmentMobileKey

        public Environment resetEnvironmentMobileKey​(java.lang.String projectKey,
                                                     java.lang.String envKey)
                                              throws ApiException
        Reset environment mobile SDK key Reset an environment's mobile key. The optional expiry for the old key is deprecated for this endpoint, so the old key will always expire immediately.
        Parameters:
        projectKey - The project key (required)
        envKey - The environment key (required)
        Returns:
        Environment
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • resetEnvironmentMobileKeyWithHttpInfo

        public ApiResponse<Environment> resetEnvironmentMobileKeyWithHttpInfo​(java.lang.String projectKey,
                                                                              java.lang.String envKey)
                                                                       throws ApiException
        Reset environment mobile SDK key Reset an environment's mobile key. The optional expiry for the old key is deprecated for this endpoint, so the old key will always expire immediately.
        Parameters:
        projectKey - The project key (required)
        envKey - The environment key (required)
        Returns:
        ApiResponse<Environment>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • resetEnvironmentMobileKeyAsync

        public okhttp3.Call resetEnvironmentMobileKeyAsync​(java.lang.String projectKey,
                                                           java.lang.String envKey,
                                                           ApiCallback<Environment> _callback)
                                                    throws ApiException
        Reset environment mobile SDK key (asynchronously) Reset an environment's mobile key. The optional expiry for the old key is deprecated for this endpoint, so the old key will always expire immediately.
        Parameters:
        projectKey - The project 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
      • resetEnvironmentSDKKeyCall

        public okhttp3.Call resetEnvironmentSDKKeyCall​(java.lang.String projectKey,
                                                       java.lang.String envKey,
                                                       java.lang.Long expiry,
                                                       ApiCallback _callback)
                                                throws ApiException
        Build call for resetEnvironmentSDKKey
        Parameters:
        projectKey - The project key (required)
        envKey - The environment key (required)
        expiry - The time at which you want the old SDK key to expire, in UNIX milliseconds. By default, the key expires immediately. (optional)
        _callback - Callback for upload/download progress
        Returns:
        Call to execute
        Throws:
        ApiException - If fail to serialize the request body object
      • resetEnvironmentSDKKey

        public Environment resetEnvironmentSDKKey​(java.lang.String projectKey,
                                                  java.lang.String envKey,
                                                  java.lang.Long expiry)
                                           throws ApiException
        Reset environment SDK key Reset an environment's SDK key with an optional expiry time for the old key.
        Parameters:
        projectKey - The project key (required)
        envKey - The environment key (required)
        expiry - The time at which you want the old SDK key to expire, in UNIX milliseconds. By default, the key expires immediately. (optional)
        Returns:
        Environment
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • resetEnvironmentSDKKeyWithHttpInfo

        public ApiResponse<Environment> resetEnvironmentSDKKeyWithHttpInfo​(java.lang.String projectKey,
                                                                           java.lang.String envKey,
                                                                           java.lang.Long expiry)
                                                                    throws ApiException
        Reset environment SDK key Reset an environment's SDK key with an optional expiry time for the old key.
        Parameters:
        projectKey - The project key (required)
        envKey - The environment key (required)
        expiry - The time at which you want the old SDK key to expire, in UNIX milliseconds. By default, the key expires immediately. (optional)
        Returns:
        ApiResponse<Environment>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • resetEnvironmentSDKKeyAsync

        public okhttp3.Call resetEnvironmentSDKKeyAsync​(java.lang.String projectKey,
                                                        java.lang.String envKey,
                                                        java.lang.Long expiry,
                                                        ApiCallback<Environment> _callback)
                                                 throws ApiException
        Reset environment SDK key (asynchronously) Reset an environment's SDK key with an optional expiry time for the old key.
        Parameters:
        projectKey - The project key (required)
        envKey - The environment key (required)
        expiry - The time at which you want the old SDK key to expire, in UNIX milliseconds. By default, the key expires immediately. (optional)
        _callback - The callback to be executed when the API call finishes
        Returns:
        The request call
        Throws:
        ApiException - If fail to process the API call, e.g. serializing the request body object