Class SegmentsApi


  • public class SegmentsApi
    extends java.lang.Object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void deleteSegment​(java.lang.String projectKey, java.lang.String environmentKey, java.lang.String segmentKey)
      Delete segment Delete a segment.
      okhttp3.Call deleteSegmentAsync​(java.lang.String projectKey, java.lang.String environmentKey, java.lang.String segmentKey, ApiCallback<java.lang.Void> _callback)
      Delete segment (asynchronously) Delete a segment.
      okhttp3.Call deleteSegmentCall​(java.lang.String projectKey, java.lang.String environmentKey, java.lang.String segmentKey, ApiCallback _callback)
      Build call for deleteSegment
      ApiResponse<java.lang.Void> deleteSegmentWithHttpInfo​(java.lang.String projectKey, java.lang.String environmentKey, java.lang.String segmentKey)
      Delete segment Delete a segment.
      ApiClient getApiClient()  
      java.lang.String getCustomBaseUrl()  
      ExpiringTargetGetResponse getExpiringTargetsForSegment​(java.lang.String projectKey, java.lang.String environmentKey, java.lang.String segmentKey)
      Get expiring targets for segment Get a list of a segment's context targets that are scheduled for removal.
      okhttp3.Call getExpiringTargetsForSegmentAsync​(java.lang.String projectKey, java.lang.String environmentKey, java.lang.String segmentKey, ApiCallback<ExpiringTargetGetResponse> _callback)
      Get expiring targets for segment (asynchronously) Get a list of a segment's context targets that are scheduled for removal.
      okhttp3.Call getExpiringTargetsForSegmentCall​(java.lang.String projectKey, java.lang.String environmentKey, java.lang.String segmentKey, ApiCallback _callback)
      Build call for getExpiringTargetsForSegment
      ApiResponse<ExpiringTargetGetResponse> getExpiringTargetsForSegmentWithHttpInfo​(java.lang.String projectKey, java.lang.String environmentKey, java.lang.String segmentKey)
      Get expiring targets for segment Get a list of a segment's context targets that are scheduled for removal.
      ExpiringUserTargetGetResponse getExpiringUserTargetsForSegment​(java.lang.String projectKey, java.lang.String environmentKey, java.lang.String segmentKey)
      Get expiring user targets for segment > ### Contexts are now available > > After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Get expiring targets for segment](/tag/Segments#operation/getExpiringTargetsForSegment) instead of this endpoint.
      okhttp3.Call getExpiringUserTargetsForSegmentAsync​(java.lang.String projectKey, java.lang.String environmentKey, java.lang.String segmentKey, ApiCallback<ExpiringUserTargetGetResponse> _callback)
      Get expiring user targets for segment (asynchronously) > ### Contexts are now available > > After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Get expiring targets for segment](/tag/Segments#operation/getExpiringTargetsForSegment) instead of this endpoint.
      okhttp3.Call getExpiringUserTargetsForSegmentCall​(java.lang.String projectKey, java.lang.String environmentKey, java.lang.String segmentKey, ApiCallback _callback)
      Build call for getExpiringUserTargetsForSegment
      ApiResponse<ExpiringUserTargetGetResponse> getExpiringUserTargetsForSegmentWithHttpInfo​(java.lang.String projectKey, java.lang.String environmentKey, java.lang.String segmentKey)
      Get expiring user targets for segment > ### Contexts are now available > > After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Get expiring targets for segment](/tag/Segments#operation/getExpiringTargetsForSegment) instead of this endpoint.
      int getHostIndex()  
      UserSegment getSegment​(java.lang.String projectKey, java.lang.String environmentKey, java.lang.String segmentKey)
      Get segment Get a single segment by key.
      okhttp3.Call getSegmentAsync​(java.lang.String projectKey, java.lang.String environmentKey, java.lang.String segmentKey, ApiCallback<UserSegment> _callback)
      Get segment (asynchronously) Get a single segment by key.
      okhttp3.Call getSegmentCall​(java.lang.String projectKey, java.lang.String environmentKey, java.lang.String segmentKey, ApiCallback _callback)
      Build call for getSegment
      BigSegmentTarget getSegmentMembershipForContext​(java.lang.String projectKey, java.lang.String environmentKey, java.lang.String segmentKey, java.lang.String contextKey)
      Get Big Segment membership for context Get the membership status (included/excluded) for a given context in this Big Segment.
      okhttp3.Call getSegmentMembershipForContextAsync​(java.lang.String projectKey, java.lang.String environmentKey, java.lang.String segmentKey, java.lang.String contextKey, ApiCallback<BigSegmentTarget> _callback)
      Get Big Segment membership for context (asynchronously) Get the membership status (included/excluded) for a given context in this Big Segment.
      okhttp3.Call getSegmentMembershipForContextCall​(java.lang.String projectKey, java.lang.String environmentKey, java.lang.String segmentKey, java.lang.String contextKey, ApiCallback _callback)
      Build call for getSegmentMembershipForContext
      ApiResponse<BigSegmentTarget> getSegmentMembershipForContextWithHttpInfo​(java.lang.String projectKey, java.lang.String environmentKey, java.lang.String segmentKey, java.lang.String contextKey)
      Get Big Segment membership for context Get the membership status (included/excluded) for a given context in this Big Segment.
      BigSegmentTarget getSegmentMembershipForUser​(java.lang.String projectKey, java.lang.String environmentKey, java.lang.String segmentKey, java.lang.String userKey)
      Get Big Segment membership for user > ### Contexts are now available > > After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Get expiring targets for segment](/tag/Segments#operation/getExpiringTargetsForSegment) instead of this endpoint.
      okhttp3.Call getSegmentMembershipForUserAsync​(java.lang.String projectKey, java.lang.String environmentKey, java.lang.String segmentKey, java.lang.String userKey, ApiCallback<BigSegmentTarget> _callback)
      Get Big Segment membership for user (asynchronously) > ### Contexts are now available > > After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Get expiring targets for segment](/tag/Segments#operation/getExpiringTargetsForSegment) instead of this endpoint.
      okhttp3.Call getSegmentMembershipForUserCall​(java.lang.String projectKey, java.lang.String environmentKey, java.lang.String segmentKey, java.lang.String userKey, ApiCallback _callback)
      Build call for getSegmentMembershipForUser
      ApiResponse<BigSegmentTarget> getSegmentMembershipForUserWithHttpInfo​(java.lang.String projectKey, java.lang.String environmentKey, java.lang.String segmentKey, java.lang.String userKey)
      Get Big Segment membership for user > ### Contexts are now available > > After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Get expiring targets for segment](/tag/Segments#operation/getExpiringTargetsForSegment) instead of this endpoint.
      UserSegments getSegments​(java.lang.String projectKey, java.lang.String environmentKey)
      List segments Get a list of all segments in the given project.
      okhttp3.Call getSegmentsAsync​(java.lang.String projectKey, java.lang.String environmentKey, ApiCallback<UserSegments> _callback)
      List segments (asynchronously) Get a list of all segments in the given project.
      okhttp3.Call getSegmentsCall​(java.lang.String projectKey, java.lang.String environmentKey, ApiCallback _callback)
      Build call for getSegments
      ApiResponse<UserSegments> getSegmentsWithHttpInfo​(java.lang.String projectKey, java.lang.String environmentKey)
      List segments Get a list of all segments in the given project.
      ApiResponse<UserSegment> getSegmentWithHttpInfo​(java.lang.String projectKey, java.lang.String environmentKey, java.lang.String segmentKey)
      Get segment Get a single segment by key.
      ExpiringTargetPatchResponse patchExpiringTargetsForSegment​(java.lang.String projectKey, java.lang.String environmentKey, java.lang.String segmentKey, PatchSegmentRequest patchSegmentRequest)
      Update expiring targets for segment Update expiring context targets for a segment.
      okhttp3.Call patchExpiringTargetsForSegmentAsync​(java.lang.String projectKey, java.lang.String environmentKey, java.lang.String segmentKey, PatchSegmentRequest patchSegmentRequest, ApiCallback<ExpiringTargetPatchResponse> _callback)
      Update expiring targets for segment (asynchronously) Update expiring context targets for a segment.
      okhttp3.Call patchExpiringTargetsForSegmentCall​(java.lang.String projectKey, java.lang.String environmentKey, java.lang.String segmentKey, PatchSegmentRequest patchSegmentRequest, ApiCallback _callback)
      Build call for patchExpiringTargetsForSegment
      ApiResponse<ExpiringTargetPatchResponse> patchExpiringTargetsForSegmentWithHttpInfo​(java.lang.String projectKey, java.lang.String environmentKey, java.lang.String segmentKey, PatchSegmentRequest patchSegmentRequest)
      Update expiring targets for segment Update expiring context targets for a segment.
      ExpiringUserTargetPatchResponse patchExpiringUserTargetsForSegment​(java.lang.String projectKey, java.lang.String environmentKey, java.lang.String segmentKey, PatchSegmentRequest patchSegmentRequest)
      Update expiring user targets for segment > ### Contexts are now available > > After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Update expiring targets for segment](/tag/Segments#operation/patchExpiringTargetsForSegment) instead of this endpoint.
      okhttp3.Call patchExpiringUserTargetsForSegmentAsync​(java.lang.String projectKey, java.lang.String environmentKey, java.lang.String segmentKey, PatchSegmentRequest patchSegmentRequest, ApiCallback<ExpiringUserTargetPatchResponse> _callback)
      Update expiring user targets for segment (asynchronously) > ### Contexts are now available > > After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Update expiring targets for segment](/tag/Segments#operation/patchExpiringTargetsForSegment) instead of this endpoint.
      okhttp3.Call patchExpiringUserTargetsForSegmentCall​(java.lang.String projectKey, java.lang.String environmentKey, java.lang.String segmentKey, PatchSegmentRequest patchSegmentRequest, ApiCallback _callback)
      Build call for patchExpiringUserTargetsForSegment
      ApiResponse<ExpiringUserTargetPatchResponse> patchExpiringUserTargetsForSegmentWithHttpInfo​(java.lang.String projectKey, java.lang.String environmentKey, java.lang.String segmentKey, PatchSegmentRequest patchSegmentRequest)
      Update expiring user targets for segment > ### Contexts are now available > > After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Update expiring targets for segment](/tag/Segments#operation/patchExpiringTargetsForSegment) instead of this endpoint.
      UserSegment patchSegment​(java.lang.String projectKey, java.lang.String environmentKey, java.lang.String segmentKey, PatchWithComment patchWithComment)
      Patch segment Update a segment.
      okhttp3.Call patchSegmentAsync​(java.lang.String projectKey, java.lang.String environmentKey, java.lang.String segmentKey, PatchWithComment patchWithComment, ApiCallback<UserSegment> _callback)
      Patch segment (asynchronously) Update a segment.
      okhttp3.Call patchSegmentCall​(java.lang.String projectKey, java.lang.String environmentKey, java.lang.String segmentKey, PatchWithComment patchWithComment, ApiCallback _callback)
      Build call for patchSegment
      ApiResponse<UserSegment> patchSegmentWithHttpInfo​(java.lang.String projectKey, java.lang.String environmentKey, java.lang.String segmentKey, PatchWithComment patchWithComment)
      Patch segment Update a segment.
      UserSegment postSegment​(java.lang.String projectKey, java.lang.String environmentKey, SegmentBody segmentBody)
      Create segment Create a new segment.
      okhttp3.Call postSegmentAsync​(java.lang.String projectKey, java.lang.String environmentKey, SegmentBody segmentBody, ApiCallback<UserSegment> _callback)
      Create segment (asynchronously) Create a new segment.
      okhttp3.Call postSegmentCall​(java.lang.String projectKey, java.lang.String environmentKey, SegmentBody segmentBody, ApiCallback _callback)
      Build call for postSegment
      ApiResponse<UserSegment> postSegmentWithHttpInfo​(java.lang.String projectKey, java.lang.String environmentKey, SegmentBody segmentBody)
      Create segment Create a new segment.
      void setApiClient​(ApiClient apiClient)  
      void setCustomBaseUrl​(java.lang.String customBaseUrl)  
      void setHostIndex​(int hostIndex)  
      void updateBigSegmentContextTargets​(java.lang.String projectKey, java.lang.String environmentKey, java.lang.String segmentKey, SegmentUserState segmentUserState)
      Update context targets on a Big Segment Update context targets included or excluded in a Big Segment.
      okhttp3.Call updateBigSegmentContextTargetsAsync​(java.lang.String projectKey, java.lang.String environmentKey, java.lang.String segmentKey, SegmentUserState segmentUserState, ApiCallback<java.lang.Void> _callback)
      Update context targets on a Big Segment (asynchronously) Update context targets included or excluded in a Big Segment.
      okhttp3.Call updateBigSegmentContextTargetsCall​(java.lang.String projectKey, java.lang.String environmentKey, java.lang.String segmentKey, SegmentUserState segmentUserState, ApiCallback _callback)
      Build call for updateBigSegmentContextTargets
      ApiResponse<java.lang.Void> updateBigSegmentContextTargetsWithHttpInfo​(java.lang.String projectKey, java.lang.String environmentKey, java.lang.String segmentKey, SegmentUserState segmentUserState)
      Update context targets on a Big Segment Update context targets included or excluded in a Big Segment.
      void updateBigSegmentTargets​(java.lang.String projectKey, java.lang.String environmentKey, java.lang.String segmentKey, SegmentUserState segmentUserState)
      Update user context targets on a Big Segment Update user context targets included or excluded in a Big Segment.
      okhttp3.Call updateBigSegmentTargetsAsync​(java.lang.String projectKey, java.lang.String environmentKey, java.lang.String segmentKey, SegmentUserState segmentUserState, ApiCallback<java.lang.Void> _callback)
      Update user context targets on a Big Segment (asynchronously) Update user context targets included or excluded in a Big Segment.
      okhttp3.Call updateBigSegmentTargetsCall​(java.lang.String projectKey, java.lang.String environmentKey, java.lang.String segmentKey, SegmentUserState segmentUserState, ApiCallback _callback)
      Build call for updateBigSegmentTargets
      ApiResponse<java.lang.Void> updateBigSegmentTargetsWithHttpInfo​(java.lang.String projectKey, java.lang.String environmentKey, java.lang.String segmentKey, SegmentUserState segmentUserState)
      Update user context targets on a Big Segment Update user context targets included or excluded in a Big Segment.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SegmentsApi

        public SegmentsApi()
      • SegmentsApi

        public SegmentsApi​(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)
      • deleteSegmentCall

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

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

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

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

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

        public ExpiringTargetGetResponse getExpiringTargetsForSegment​(java.lang.String projectKey,
                                                                      java.lang.String environmentKey,
                                                                      java.lang.String segmentKey)
                                                               throws ApiException
        Get expiring targets for segment Get a list of a segment's context targets that are scheduled for removal.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        segmentKey - The segment key (required)
        Returns:
        ExpiringTargetGetResponse
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • getExpiringTargetsForSegmentWithHttpInfo

        public ApiResponse<ExpiringTargetGetResponse> getExpiringTargetsForSegmentWithHttpInfo​(java.lang.String projectKey,
                                                                                               java.lang.String environmentKey,
                                                                                               java.lang.String segmentKey)
                                                                                        throws ApiException
        Get expiring targets for segment Get a list of a segment's context targets that are scheduled for removal.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        segmentKey - The segment key (required)
        Returns:
        ApiResponse<ExpiringTargetGetResponse>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • getExpiringTargetsForSegmentAsync

        public okhttp3.Call getExpiringTargetsForSegmentAsync​(java.lang.String projectKey,
                                                              java.lang.String environmentKey,
                                                              java.lang.String segmentKey,
                                                              ApiCallback<ExpiringTargetGetResponse> _callback)
                                                       throws ApiException
        Get expiring targets for segment (asynchronously) Get a list of a segment's context targets that are scheduled for removal.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        segmentKey - The segment 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
      • getExpiringUserTargetsForSegmentCall

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

        public ExpiringUserTargetGetResponse getExpiringUserTargetsForSegment​(java.lang.String projectKey,
                                                                              java.lang.String environmentKey,
                                                                              java.lang.String segmentKey)
                                                                       throws ApiException
        Get expiring user targets for segment > ### Contexts are now available > > After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Get expiring targets for segment](/tag/Segments#operation/getExpiringTargetsForSegment) instead of this endpoint. To learn more, read [Contexts](https://docs.launchdarkly.com/home/contexts). Get a list of a segment's user targets that are scheduled for removal.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        segmentKey - The segment key (required)
        Returns:
        ExpiringUserTargetGetResponse
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • getExpiringUserTargetsForSegmentWithHttpInfo

        public ApiResponse<ExpiringUserTargetGetResponse> getExpiringUserTargetsForSegmentWithHttpInfo​(java.lang.String projectKey,
                                                                                                       java.lang.String environmentKey,
                                                                                                       java.lang.String segmentKey)
                                                                                                throws ApiException
        Get expiring user targets for segment > ### Contexts are now available > > After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Get expiring targets for segment](/tag/Segments#operation/getExpiringTargetsForSegment) instead of this endpoint. To learn more, read [Contexts](https://docs.launchdarkly.com/home/contexts). Get a list of a segment's user targets that are scheduled for removal.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        segmentKey - The segment key (required)
        Returns:
        ApiResponse<ExpiringUserTargetGetResponse>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • getExpiringUserTargetsForSegmentAsync

        public okhttp3.Call getExpiringUserTargetsForSegmentAsync​(java.lang.String projectKey,
                                                                  java.lang.String environmentKey,
                                                                  java.lang.String segmentKey,
                                                                  ApiCallback<ExpiringUserTargetGetResponse> _callback)
                                                           throws ApiException
        Get expiring user targets for segment (asynchronously) > ### Contexts are now available > > After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Get expiring targets for segment](/tag/Segments#operation/getExpiringTargetsForSegment) instead of this endpoint. To learn more, read [Contexts](https://docs.launchdarkly.com/home/contexts). Get a list of a segment's user targets that are scheduled for removal.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        segmentKey - The segment 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
      • getSegmentCall

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

        public UserSegment getSegment​(java.lang.String projectKey,
                                      java.lang.String environmentKey,
                                      java.lang.String segmentKey)
                               throws ApiException
        Get segment Get a single segment by key.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        segmentKey - The segment key (required)
        Returns:
        UserSegment
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • getSegmentWithHttpInfo

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

        public okhttp3.Call getSegmentAsync​(java.lang.String projectKey,
                                            java.lang.String environmentKey,
                                            java.lang.String segmentKey,
                                            ApiCallback<UserSegment> _callback)
                                     throws ApiException
        Get segment (asynchronously) Get a single segment by key.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        segmentKey - The segment 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
      • getSegmentMembershipForContextCall

        public okhttp3.Call getSegmentMembershipForContextCall​(java.lang.String projectKey,
                                                               java.lang.String environmentKey,
                                                               java.lang.String segmentKey,
                                                               java.lang.String contextKey,
                                                               ApiCallback _callback)
                                                        throws ApiException
        Build call for getSegmentMembershipForContext
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        segmentKey - The segment key (required)
        contextKey - The context key (required)
        _callback - Callback for upload/download progress
        Returns:
        Call to execute
        Throws:
        ApiException - If fail to serialize the request body object
      • getSegmentMembershipForContext

        public BigSegmentTarget getSegmentMembershipForContext​(java.lang.String projectKey,
                                                               java.lang.String environmentKey,
                                                               java.lang.String segmentKey,
                                                               java.lang.String contextKey)
                                                        throws ApiException
        Get Big Segment membership for context Get the membership status (included/excluded) for a given context in this Big Segment. This operation does not support standard segments.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        segmentKey - The segment key (required)
        contextKey - The context key (required)
        Returns:
        BigSegmentTarget
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • getSegmentMembershipForContextWithHttpInfo

        public ApiResponse<BigSegmentTarget> getSegmentMembershipForContextWithHttpInfo​(java.lang.String projectKey,
                                                                                        java.lang.String environmentKey,
                                                                                        java.lang.String segmentKey,
                                                                                        java.lang.String contextKey)
                                                                                 throws ApiException
        Get Big Segment membership for context Get the membership status (included/excluded) for a given context in this Big Segment. This operation does not support standard segments.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        segmentKey - The segment key (required)
        contextKey - The context key (required)
        Returns:
        ApiResponse<BigSegmentTarget>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • getSegmentMembershipForContextAsync

        public okhttp3.Call getSegmentMembershipForContextAsync​(java.lang.String projectKey,
                                                                java.lang.String environmentKey,
                                                                java.lang.String segmentKey,
                                                                java.lang.String contextKey,
                                                                ApiCallback<BigSegmentTarget> _callback)
                                                         throws ApiException
        Get Big Segment membership for context (asynchronously) Get the membership status (included/excluded) for a given context in this Big Segment. This operation does not support standard segments.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        segmentKey - The segment key (required)
        contextKey - The context 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
      • getSegmentMembershipForUserCall

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

        public BigSegmentTarget getSegmentMembershipForUser​(java.lang.String projectKey,
                                                            java.lang.String environmentKey,
                                                            java.lang.String segmentKey,
                                                            java.lang.String userKey)
                                                     throws ApiException
        Get Big Segment membership for user > ### Contexts are now available > > After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Get expiring targets for segment](/tag/Segments#operation/getExpiringTargetsForSegment) instead of this endpoint. To learn more, read [Contexts](https://docs.launchdarkly.com/home/contexts). Get the membership status (included/excluded) for a given user in this Big Segment. This operation does not support standard segments.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        segmentKey - The segment key (required)
        userKey - The user key (required)
        Returns:
        BigSegmentTarget
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • getSegmentMembershipForUserWithHttpInfo

        public ApiResponse<BigSegmentTarget> getSegmentMembershipForUserWithHttpInfo​(java.lang.String projectKey,
                                                                                     java.lang.String environmentKey,
                                                                                     java.lang.String segmentKey,
                                                                                     java.lang.String userKey)
                                                                              throws ApiException
        Get Big Segment membership for user > ### Contexts are now available > > After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Get expiring targets for segment](/tag/Segments#operation/getExpiringTargetsForSegment) instead of this endpoint. To learn more, read [Contexts](https://docs.launchdarkly.com/home/contexts). Get the membership status (included/excluded) for a given user in this Big Segment. This operation does not support standard segments.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        segmentKey - The segment key (required)
        userKey - The user key (required)
        Returns:
        ApiResponse<BigSegmentTarget>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • getSegmentMembershipForUserAsync

        public okhttp3.Call getSegmentMembershipForUserAsync​(java.lang.String projectKey,
                                                             java.lang.String environmentKey,
                                                             java.lang.String segmentKey,
                                                             java.lang.String userKey,
                                                             ApiCallback<BigSegmentTarget> _callback)
                                                      throws ApiException
        Get Big Segment membership for user (asynchronously) > ### Contexts are now available > > After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Get expiring targets for segment](/tag/Segments#operation/getExpiringTargetsForSegment) instead of this endpoint. To learn more, read [Contexts](https://docs.launchdarkly.com/home/contexts). Get the membership status (included/excluded) for a given user in this Big Segment. This operation does not support standard segments.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        segmentKey - The segment 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
      • getSegmentsCall

        public okhttp3.Call getSegmentsCall​(java.lang.String projectKey,
                                            java.lang.String environmentKey,
                                            ApiCallback _callback)
                                     throws ApiException
        Build call for getSegments
        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
      • getSegments

        public UserSegments getSegments​(java.lang.String projectKey,
                                        java.lang.String environmentKey)
                                 throws ApiException
        List segments Get a list of all segments in the given project.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        Returns:
        UserSegments
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • getSegmentsWithHttpInfo

        public ApiResponse<UserSegments> getSegmentsWithHttpInfo​(java.lang.String projectKey,
                                                                 java.lang.String environmentKey)
                                                          throws ApiException
        List segments Get a list of all segments in the given project.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        Returns:
        ApiResponse<UserSegments>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • getSegmentsAsync

        public okhttp3.Call getSegmentsAsync​(java.lang.String projectKey,
                                             java.lang.String environmentKey,
                                             ApiCallback<UserSegments> _callback)
                                      throws ApiException
        List segments (asynchronously) Get a list of all segments in the given project.
        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
      • patchExpiringTargetsForSegmentCall

        public okhttp3.Call patchExpiringTargetsForSegmentCall​(java.lang.String projectKey,
                                                               java.lang.String environmentKey,
                                                               java.lang.String segmentKey,
                                                               PatchSegmentRequest patchSegmentRequest,
                                                               ApiCallback _callback)
                                                        throws ApiException
        Build call for patchExpiringTargetsForSegment
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        segmentKey - The segment key (required)
        patchSegmentRequest - (required)
        _callback - Callback for upload/download progress
        Returns:
        Call to execute
        Throws:
        ApiException - If fail to serialize the request body object
      • patchExpiringTargetsForSegment

        public ExpiringTargetPatchResponse patchExpiringTargetsForSegment​(java.lang.String projectKey,
                                                                          java.lang.String environmentKey,
                                                                          java.lang.String segmentKey,
                                                                          PatchSegmentRequest patchSegmentRequest)
                                                                   throws ApiException
        Update expiring targets for segment Update expiring context targets for a segment. Updating a context target expiration 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). If the request is well-formed but any of its instructions failed to process, this operation returns status code `200`. In this case, the response `errors` array will be non-empty. ### Instructions Semantic patch requests support the following `kind` instructions for updating context targets. #### addExpiringTarget Schedules a date and time when LaunchDarkly will remove a context from segment targeting. ##### Parameters - `targetType`: A segment's target type, must be either `included` or `excluded`. - `contextKey`: The context key. - `contextKind`: The kind of context being targeted. - `value`: The date when the context should expire from the segment targeting, in Unix milliseconds. #### updateExpiringTarget Updates the date and time when LaunchDarkly will remove a context from segment targeting. ##### Parameters - `targetType`: A segment's target type, must be either `included` or `excluded`. - `contextKey`: The context key. - `contextKind`: The kind of context being targeted. - `value`: The new date when the context should expire from the segment targeting, in Unix milliseconds. - `version`: The segment version. #### removeExpiringTarget Removes the scheduled expiration for the context in the segment. ##### Parameters - `targetType`: A segment's target type, must be either `included` or `excluded`. - `contextKey`: The context key. - `contextKind`: The kind of context being targeted.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        segmentKey - The segment key (required)
        patchSegmentRequest - (required)
        Returns:
        ExpiringTargetPatchResponse
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • patchExpiringTargetsForSegmentWithHttpInfo

        public ApiResponse<ExpiringTargetPatchResponse> patchExpiringTargetsForSegmentWithHttpInfo​(java.lang.String projectKey,
                                                                                                   java.lang.String environmentKey,
                                                                                                   java.lang.String segmentKey,
                                                                                                   PatchSegmentRequest patchSegmentRequest)
                                                                                            throws ApiException
        Update expiring targets for segment Update expiring context targets for a segment. Updating a context target expiration 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). If the request is well-formed but any of its instructions failed to process, this operation returns status code `200`. In this case, the response `errors` array will be non-empty. ### Instructions Semantic patch requests support the following `kind` instructions for updating context targets. #### addExpiringTarget Schedules a date and time when LaunchDarkly will remove a context from segment targeting. ##### Parameters - `targetType`: A segment's target type, must be either `included` or `excluded`. - `contextKey`: The context key. - `contextKind`: The kind of context being targeted. - `value`: The date when the context should expire from the segment targeting, in Unix milliseconds. #### updateExpiringTarget Updates the date and time when LaunchDarkly will remove a context from segment targeting. ##### Parameters - `targetType`: A segment's target type, must be either `included` or `excluded`. - `contextKey`: The context key. - `contextKind`: The kind of context being targeted. - `value`: The new date when the context should expire from the segment targeting, in Unix milliseconds. - `version`: The segment version. #### removeExpiringTarget Removes the scheduled expiration for the context in the segment. ##### Parameters - `targetType`: A segment's target type, must be either `included` or `excluded`. - `contextKey`: The context key. - `contextKind`: The kind of context being targeted.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        segmentKey - The segment key (required)
        patchSegmentRequest - (required)
        Returns:
        ApiResponse<ExpiringTargetPatchResponse>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • patchExpiringTargetsForSegmentAsync

        public okhttp3.Call patchExpiringTargetsForSegmentAsync​(java.lang.String projectKey,
                                                                java.lang.String environmentKey,
                                                                java.lang.String segmentKey,
                                                                PatchSegmentRequest patchSegmentRequest,
                                                                ApiCallback<ExpiringTargetPatchResponse> _callback)
                                                         throws ApiException
        Update expiring targets for segment (asynchronously) Update expiring context targets for a segment. Updating a context target expiration 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). If the request is well-formed but any of its instructions failed to process, this operation returns status code `200`. In this case, the response `errors` array will be non-empty. ### Instructions Semantic patch requests support the following `kind` instructions for updating context targets. #### addExpiringTarget Schedules a date and time when LaunchDarkly will remove a context from segment targeting. ##### Parameters - `targetType`: A segment's target type, must be either `included` or `excluded`. - `contextKey`: The context key. - `contextKind`: The kind of context being targeted. - `value`: The date when the context should expire from the segment targeting, in Unix milliseconds. #### updateExpiringTarget Updates the date and time when LaunchDarkly will remove a context from segment targeting. ##### Parameters - `targetType`: A segment's target type, must be either `included` or `excluded`. - `contextKey`: The context key. - `contextKind`: The kind of context being targeted. - `value`: The new date when the context should expire from the segment targeting, in Unix milliseconds. - `version`: The segment version. #### removeExpiringTarget Removes the scheduled expiration for the context in the segment. ##### Parameters - `targetType`: A segment's target type, must be either `included` or `excluded`. - `contextKey`: The context key. - `contextKind`: The kind of context being targeted.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        segmentKey - The segment key (required)
        patchSegmentRequest - (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
      • patchExpiringUserTargetsForSegmentCall

        public okhttp3.Call patchExpiringUserTargetsForSegmentCall​(java.lang.String projectKey,
                                                                   java.lang.String environmentKey,
                                                                   java.lang.String segmentKey,
                                                                   PatchSegmentRequest patchSegmentRequest,
                                                                   ApiCallback _callback)
                                                            throws ApiException
        Build call for patchExpiringUserTargetsForSegment
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        segmentKey - The segment key (required)
        patchSegmentRequest - (required)
        _callback - Callback for upload/download progress
        Returns:
        Call to execute
        Throws:
        ApiException - If fail to serialize the request body object
      • patchExpiringUserTargetsForSegment

        public ExpiringUserTargetPatchResponse patchExpiringUserTargetsForSegment​(java.lang.String projectKey,
                                                                                  java.lang.String environmentKey,
                                                                                  java.lang.String segmentKey,
                                                                                  PatchSegmentRequest patchSegmentRequest)
                                                                           throws ApiException
        Update expiring user targets for segment > ### Contexts are now available > > After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Update expiring targets for segment](/tag/Segments#operation/patchExpiringTargetsForSegment) instead of this endpoint. To learn more, read [Contexts](https://docs.launchdarkly.com/home/contexts). Update expiring user targets for a segment. Updating a user target expiration 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). If the request is well-formed but any of its instructions failed to process, this operation returns status code `200`. In this case, the response `errors` array will be non-empty. ### Instructions Semantic patch requests support the following `kind` instructions for updating user targets. #### addExpireUserTargetDate Schedules a date and time when LaunchDarkly will remove a user from segment targeting. ##### Parameters - `targetType`: A segment's target type, must be either `included` or `excluded`. - `userKey`: The user key. - `value`: The date when the user should expire from the segment targeting, in Unix milliseconds. #### updateExpireUserTargetDate Updates the date and time when LaunchDarkly will remove a user from segment targeting. ##### Parameters - `targetType`: A segment's target type, must be either `included` or `excluded`. - `userKey`: The user key. - `value`: The new date when the user should expire from the segment targeting, in Unix milliseconds. - `version`: The segment version. #### removeExpireUserTargetDate Removes the scheduled expiration for the user in the segment. ##### Parameters - `targetType`: A segment's target type, must be either `included` or `excluded`. - `userKey`: The user key.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        segmentKey - The segment key (required)
        patchSegmentRequest - (required)
        Returns:
        ExpiringUserTargetPatchResponse
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • patchExpiringUserTargetsForSegmentWithHttpInfo

        public ApiResponse<ExpiringUserTargetPatchResponse> patchExpiringUserTargetsForSegmentWithHttpInfo​(java.lang.String projectKey,
                                                                                                           java.lang.String environmentKey,
                                                                                                           java.lang.String segmentKey,
                                                                                                           PatchSegmentRequest patchSegmentRequest)
                                                                                                    throws ApiException
        Update expiring user targets for segment > ### Contexts are now available > > After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Update expiring targets for segment](/tag/Segments#operation/patchExpiringTargetsForSegment) instead of this endpoint. To learn more, read [Contexts](https://docs.launchdarkly.com/home/contexts). Update expiring user targets for a segment. Updating a user target expiration 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). If the request is well-formed but any of its instructions failed to process, this operation returns status code `200`. In this case, the response `errors` array will be non-empty. ### Instructions Semantic patch requests support the following `kind` instructions for updating user targets. #### addExpireUserTargetDate Schedules a date and time when LaunchDarkly will remove a user from segment targeting. ##### Parameters - `targetType`: A segment's target type, must be either `included` or `excluded`. - `userKey`: The user key. - `value`: The date when the user should expire from the segment targeting, in Unix milliseconds. #### updateExpireUserTargetDate Updates the date and time when LaunchDarkly will remove a user from segment targeting. ##### Parameters - `targetType`: A segment's target type, must be either `included` or `excluded`. - `userKey`: The user key. - `value`: The new date when the user should expire from the segment targeting, in Unix milliseconds. - `version`: The segment version. #### removeExpireUserTargetDate Removes the scheduled expiration for the user in the segment. ##### Parameters - `targetType`: A segment's target type, must be either `included` or `excluded`. - `userKey`: The user key.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        segmentKey - The segment key (required)
        patchSegmentRequest - (required)
        Returns:
        ApiResponse<ExpiringUserTargetPatchResponse>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • patchExpiringUserTargetsForSegmentAsync

        public okhttp3.Call patchExpiringUserTargetsForSegmentAsync​(java.lang.String projectKey,
                                                                    java.lang.String environmentKey,
                                                                    java.lang.String segmentKey,
                                                                    PatchSegmentRequest patchSegmentRequest,
                                                                    ApiCallback<ExpiringUserTargetPatchResponse> _callback)
                                                             throws ApiException
        Update expiring user targets for segment (asynchronously) > ### Contexts are now available > > After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Update expiring targets for segment](/tag/Segments#operation/patchExpiringTargetsForSegment) instead of this endpoint. To learn more, read [Contexts](https://docs.launchdarkly.com/home/contexts). Update expiring user targets for a segment. Updating a user target expiration 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). If the request is well-formed but any of its instructions failed to process, this operation returns status code `200`. In this case, the response `errors` array will be non-empty. ### Instructions Semantic patch requests support the following `kind` instructions for updating user targets. #### addExpireUserTargetDate Schedules a date and time when LaunchDarkly will remove a user from segment targeting. ##### Parameters - `targetType`: A segment's target type, must be either `included` or `excluded`. - `userKey`: The user key. - `value`: The date when the user should expire from the segment targeting, in Unix milliseconds. #### updateExpireUserTargetDate Updates the date and time when LaunchDarkly will remove a user from segment targeting. ##### Parameters - `targetType`: A segment's target type, must be either `included` or `excluded`. - `userKey`: The user key. - `value`: The new date when the user should expire from the segment targeting, in Unix milliseconds. - `version`: The segment version. #### removeExpireUserTargetDate Removes the scheduled expiration for the user in the segment. ##### Parameters - `targetType`: A segment's target type, must be either `included` or `excluded`. - `userKey`: The user key.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        segmentKey - The segment key (required)
        patchSegmentRequest - (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
      • patchSegmentCall

        public okhttp3.Call patchSegmentCall​(java.lang.String projectKey,
                                             java.lang.String environmentKey,
                                             java.lang.String segmentKey,
                                             PatchWithComment patchWithComment,
                                             ApiCallback _callback)
                                      throws ApiException
        Build call for patchSegment
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        segmentKey - The segment key (required)
        patchWithComment - (required)
        _callback - Callback for upload/download progress
        Returns:
        Call to execute
        Throws:
        ApiException - If fail to serialize the request body object
      • patchSegment

        public UserSegment patchSegment​(java.lang.String projectKey,
                                        java.lang.String environmentKey,
                                        java.lang.String segmentKey,
                                        PatchWithComment patchWithComment)
                                 throws ApiException
        Patch segment Update a segment. The request body must be a valid semantic patch, JSON patch, or JSON merge patch. ### Using semantic patches on a segment 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). The body of a semantic patch request for updating segments requires an `environmentKey` in addition to `instructions` and an optional `comment`. The body of the request takes the following properties: * `comment` (string): (Optional) A description of the update. * `environmentKey` (string): (Required) The key of the LaunchDarkly environment. * `instructions` (array): (Required) A list of actions the update should perform. Each action in the list must be an object with a `kind` property that indicates the instruction. If the action requires parameters, you must include those parameters as additional fields in the object. ### Instructions Semantic patch requests support the following `kind` instructions for updating segments. #### addIncludedTargets Adds context keys to the individual context targets included in the segment for the specified `contextKind`. Returns an error if this causes the same context key to be both included and excluded. ##### Parameters - `contextKind`: The context kind the targets should be added to. - `values`: List of keys. #### addIncludedUsers Adds user keys to the individual user targets included in the segment. Returns an error if this causes the same user key to be both included and excluded. If you are working with contexts, use `addIncludedTargets` instead of this instruction. ##### Parameters - `values`: List of user keys. #### addExcludedTargets Adds context keys to the individual context targets excluded in the segment for the specified `contextKind`. Returns an error if this causes the same context key to be both included and excluded. ##### Parameters - `contextKind`: The context kind the targets should be added to. - `values`: List of keys. #### addExcludedUsers Adds user keys to the individual user targets excluded from the segment. Returns an error if this causes the same user key to be both included and excluded. If you are working with contexts, use `addExcludedTargets` instead of this instruction. ##### Parameters - `values`: List of user keys. #### removeIncludedTargets Removes context keys from the individual context targets included in the segment for the specified `contextKind`. ##### Parameters - `contextKind`: The context kind the targets should be removed from. - `values`: List of keys. #### removeIncludedUsers Removes user keys from the individual user targets included in the segment. If you are working with contexts, use `removeIncludedTargets` instead of this instruction. ##### Parameters - `values`: List of user keys. #### removeExcludedTargets Removes context keys from the individual context targets excluded from the segment for the specified `contextKind`. ##### Parameters - `contextKind`: The context kind the targets should be removed from. - `values`: List of keys. #### removeExcludedUsers Removes user keys from the individual user targets excluded from the segment. If you are working with contexts, use `removeExcludedTargets` instead of this instruction. ##### Parameters - `values`: List of user keys. #### updateName Updates the name of the segment. ##### Parameters - `value`: Name of the segment. ## Using JSON patches on a segment You can also use JSON patch. To learn more, read [Updates using JSON patches](/reference#updates-using-json-patch). For example, to update the description for a segment, use the following request body: ```json { \"patch\": [ { \"op\": \"replace\", \"path\": \"/description\", \"value\": \"new description\" } ] } ``` To update fields in the segment that are arrays, set the `path` to the name of the field and then append `/<array index>`. Using `/0` adds the new entry to the beginning of the array. For example, to add a rule to a segment, use the following request body: ```json { \"patch\":[ { \"op\": \"add\", \"path\": \"/rules/0\", \"value\": { \"clauses\": [{ \"contextKind\": \"user\", \"attribute\": \"email\", \"op\": \"endsWith\", \"values\": [\".edu\"], \"negate\": false }] } } ] } ``` To add or remove targets from segments, we recommend using semantic patch. Semantic patch for segments includes specific instructions for adding and removing both included and excluded targets.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        segmentKey - The segment key (required)
        patchWithComment - (required)
        Returns:
        UserSegment
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • patchSegmentWithHttpInfo

        public ApiResponse<UserSegment> patchSegmentWithHttpInfo​(java.lang.String projectKey,
                                                                 java.lang.String environmentKey,
                                                                 java.lang.String segmentKey,
                                                                 PatchWithComment patchWithComment)
                                                          throws ApiException
        Patch segment Update a segment. The request body must be a valid semantic patch, JSON patch, or JSON merge patch. ### Using semantic patches on a segment 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). The body of a semantic patch request for updating segments requires an `environmentKey` in addition to `instructions` and an optional `comment`. The body of the request takes the following properties: * `comment` (string): (Optional) A description of the update. * `environmentKey` (string): (Required) The key of the LaunchDarkly environment. * `instructions` (array): (Required) A list of actions the update should perform. Each action in the list must be an object with a `kind` property that indicates the instruction. If the action requires parameters, you must include those parameters as additional fields in the object. ### Instructions Semantic patch requests support the following `kind` instructions for updating segments. #### addIncludedTargets Adds context keys to the individual context targets included in the segment for the specified `contextKind`. Returns an error if this causes the same context key to be both included and excluded. ##### Parameters - `contextKind`: The context kind the targets should be added to. - `values`: List of keys. #### addIncludedUsers Adds user keys to the individual user targets included in the segment. Returns an error if this causes the same user key to be both included and excluded. If you are working with contexts, use `addIncludedTargets` instead of this instruction. ##### Parameters - `values`: List of user keys. #### addExcludedTargets Adds context keys to the individual context targets excluded in the segment for the specified `contextKind`. Returns an error if this causes the same context key to be both included and excluded. ##### Parameters - `contextKind`: The context kind the targets should be added to. - `values`: List of keys. #### addExcludedUsers Adds user keys to the individual user targets excluded from the segment. Returns an error if this causes the same user key to be both included and excluded. If you are working with contexts, use `addExcludedTargets` instead of this instruction. ##### Parameters - `values`: List of user keys. #### removeIncludedTargets Removes context keys from the individual context targets included in the segment for the specified `contextKind`. ##### Parameters - `contextKind`: The context kind the targets should be removed from. - `values`: List of keys. #### removeIncludedUsers Removes user keys from the individual user targets included in the segment. If you are working with contexts, use `removeIncludedTargets` instead of this instruction. ##### Parameters - `values`: List of user keys. #### removeExcludedTargets Removes context keys from the individual context targets excluded from the segment for the specified `contextKind`. ##### Parameters - `contextKind`: The context kind the targets should be removed from. - `values`: List of keys. #### removeExcludedUsers Removes user keys from the individual user targets excluded from the segment. If you are working with contexts, use `removeExcludedTargets` instead of this instruction. ##### Parameters - `values`: List of user keys. #### updateName Updates the name of the segment. ##### Parameters - `value`: Name of the segment. ## Using JSON patches on a segment You can also use JSON patch. To learn more, read [Updates using JSON patches](/reference#updates-using-json-patch). For example, to update the description for a segment, use the following request body: ```json { \"patch\": [ { \"op\": \"replace\", \"path\": \"/description\", \"value\": \"new description\" } ] } ``` To update fields in the segment that are arrays, set the `path` to the name of the field and then append `/<array index>`. Using `/0` adds the new entry to the beginning of the array. For example, to add a rule to a segment, use the following request body: ```json { \"patch\":[ { \"op\": \"add\", \"path\": \"/rules/0\", \"value\": { \"clauses\": [{ \"contextKind\": \"user\", \"attribute\": \"email\", \"op\": \"endsWith\", \"values\": [\".edu\"], \"negate\": false }] } } ] } ``` To add or remove targets from segments, we recommend using semantic patch. Semantic patch for segments includes specific instructions for adding and removing both included and excluded targets.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        segmentKey - The segment key (required)
        patchWithComment - (required)
        Returns:
        ApiResponse<UserSegment>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • patchSegmentAsync

        public okhttp3.Call patchSegmentAsync​(java.lang.String projectKey,
                                              java.lang.String environmentKey,
                                              java.lang.String segmentKey,
                                              PatchWithComment patchWithComment,
                                              ApiCallback<UserSegment> _callback)
                                       throws ApiException
        Patch segment (asynchronously) Update a segment. The request body must be a valid semantic patch, JSON patch, or JSON merge patch. ### Using semantic patches on a segment 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). The body of a semantic patch request for updating segments requires an `environmentKey` in addition to `instructions` and an optional `comment`. The body of the request takes the following properties: * `comment` (string): (Optional) A description of the update. * `environmentKey` (string): (Required) The key of the LaunchDarkly environment. * `instructions` (array): (Required) A list of actions the update should perform. Each action in the list must be an object with a `kind` property that indicates the instruction. If the action requires parameters, you must include those parameters as additional fields in the object. ### Instructions Semantic patch requests support the following `kind` instructions for updating segments. #### addIncludedTargets Adds context keys to the individual context targets included in the segment for the specified `contextKind`. Returns an error if this causes the same context key to be both included and excluded. ##### Parameters - `contextKind`: The context kind the targets should be added to. - `values`: List of keys. #### addIncludedUsers Adds user keys to the individual user targets included in the segment. Returns an error if this causes the same user key to be both included and excluded. If you are working with contexts, use `addIncludedTargets` instead of this instruction. ##### Parameters - `values`: List of user keys. #### addExcludedTargets Adds context keys to the individual context targets excluded in the segment for the specified `contextKind`. Returns an error if this causes the same context key to be both included and excluded. ##### Parameters - `contextKind`: The context kind the targets should be added to. - `values`: List of keys. #### addExcludedUsers Adds user keys to the individual user targets excluded from the segment. Returns an error if this causes the same user key to be both included and excluded. If you are working with contexts, use `addExcludedTargets` instead of this instruction. ##### Parameters - `values`: List of user keys. #### removeIncludedTargets Removes context keys from the individual context targets included in the segment for the specified `contextKind`. ##### Parameters - `contextKind`: The context kind the targets should be removed from. - `values`: List of keys. #### removeIncludedUsers Removes user keys from the individual user targets included in the segment. If you are working with contexts, use `removeIncludedTargets` instead of this instruction. ##### Parameters - `values`: List of user keys. #### removeExcludedTargets Removes context keys from the individual context targets excluded from the segment for the specified `contextKind`. ##### Parameters - `contextKind`: The context kind the targets should be removed from. - `values`: List of keys. #### removeExcludedUsers Removes user keys from the individual user targets excluded from the segment. If you are working with contexts, use `removeExcludedTargets` instead of this instruction. ##### Parameters - `values`: List of user keys. #### updateName Updates the name of the segment. ##### Parameters - `value`: Name of the segment. ## Using JSON patches on a segment You can also use JSON patch. To learn more, read [Updates using JSON patches](/reference#updates-using-json-patch). For example, to update the description for a segment, use the following request body: ```json { \"patch\": [ { \"op\": \"replace\", \"path\": \"/description\", \"value\": \"new description\" } ] } ``` To update fields in the segment that are arrays, set the `path` to the name of the field and then append `/<array index>`. Using `/0` adds the new entry to the beginning of the array. For example, to add a rule to a segment, use the following request body: ```json { \"patch\":[ { \"op\": \"add\", \"path\": \"/rules/0\", \"value\": { \"clauses\": [{ \"contextKind\": \"user\", \"attribute\": \"email\", \"op\": \"endsWith\", \"values\": [\".edu\"], \"negate\": false }] } } ] } ``` To add or remove targets from segments, we recommend using semantic patch. Semantic patch for segments includes specific instructions for adding and removing both included and excluded targets.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        segmentKey - The segment key (required)
        patchWithComment - (required)
        _callback - The callback to be executed when the API call finishes
        Returns:
        The request call
        Throws:
        ApiException - If fail to process the API call, e.g. serializing the request body object
      • postSegmentCall

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

        public UserSegment postSegment​(java.lang.String projectKey,
                                       java.lang.String environmentKey,
                                       SegmentBody segmentBody)
                                throws ApiException
        Create segment Create a new segment.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        segmentBody - (required)
        Returns:
        UserSegment
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • postSegmentWithHttpInfo

        public ApiResponse<UserSegment> postSegmentWithHttpInfo​(java.lang.String projectKey,
                                                                java.lang.String environmentKey,
                                                                SegmentBody segmentBody)
                                                         throws ApiException
        Create segment Create a new segment.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        segmentBody - (required)
        Returns:
        ApiResponse<UserSegment>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • postSegmentAsync

        public okhttp3.Call postSegmentAsync​(java.lang.String projectKey,
                                             java.lang.String environmentKey,
                                             SegmentBody segmentBody,
                                             ApiCallback<UserSegment> _callback)
                                      throws ApiException
        Create segment (asynchronously) Create a new segment.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        segmentBody - (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
      • updateBigSegmentContextTargetsCall

        public okhttp3.Call updateBigSegmentContextTargetsCall​(java.lang.String projectKey,
                                                               java.lang.String environmentKey,
                                                               java.lang.String segmentKey,
                                                               SegmentUserState segmentUserState,
                                                               ApiCallback _callback)
                                                        throws ApiException
        Build call for updateBigSegmentContextTargets
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        segmentKey - The segment key (required)
        segmentUserState - (required)
        _callback - Callback for upload/download progress
        Returns:
        Call to execute
        Throws:
        ApiException - If fail to serialize the request body object
      • updateBigSegmentContextTargets

        public void updateBigSegmentContextTargets​(java.lang.String projectKey,
                                                   java.lang.String environmentKey,
                                                   java.lang.String segmentKey,
                                                   SegmentUserState segmentUserState)
                                            throws ApiException
        Update context targets on a Big Segment Update context targets included or excluded in a Big Segment.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        segmentKey - The segment key (required)
        segmentUserState - (required)
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • updateBigSegmentContextTargetsWithHttpInfo

        public ApiResponse<java.lang.Void> updateBigSegmentContextTargetsWithHttpInfo​(java.lang.String projectKey,
                                                                                      java.lang.String environmentKey,
                                                                                      java.lang.String segmentKey,
                                                                                      SegmentUserState segmentUserState)
                                                                               throws ApiException
        Update context targets on a Big Segment Update context targets included or excluded in a Big Segment.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        segmentKey - The segment key (required)
        segmentUserState - (required)
        Returns:
        ApiResponse<Void>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • updateBigSegmentContextTargetsAsync

        public okhttp3.Call updateBigSegmentContextTargetsAsync​(java.lang.String projectKey,
                                                                java.lang.String environmentKey,
                                                                java.lang.String segmentKey,
                                                                SegmentUserState segmentUserState,
                                                                ApiCallback<java.lang.Void> _callback)
                                                         throws ApiException
        Update context targets on a Big Segment (asynchronously) Update context targets included or excluded in a Big Segment.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        segmentKey - The segment key (required)
        segmentUserState - (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
      • updateBigSegmentTargetsCall

        public okhttp3.Call updateBigSegmentTargetsCall​(java.lang.String projectKey,
                                                        java.lang.String environmentKey,
                                                        java.lang.String segmentKey,
                                                        SegmentUserState segmentUserState,
                                                        ApiCallback _callback)
                                                 throws ApiException
        Build call for updateBigSegmentTargets
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        segmentKey - The segment key (required)
        segmentUserState - (required)
        _callback - Callback for upload/download progress
        Returns:
        Call to execute
        Throws:
        ApiException - If fail to serialize the request body object
      • updateBigSegmentTargets

        public void updateBigSegmentTargets​(java.lang.String projectKey,
                                            java.lang.String environmentKey,
                                            java.lang.String segmentKey,
                                            SegmentUserState segmentUserState)
                                     throws ApiException
        Update user context targets on a Big Segment Update user context targets included or excluded in a Big Segment.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        segmentKey - The segment key (required)
        segmentUserState - (required)
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • updateBigSegmentTargetsWithHttpInfo

        public ApiResponse<java.lang.Void> updateBigSegmentTargetsWithHttpInfo​(java.lang.String projectKey,
                                                                               java.lang.String environmentKey,
                                                                               java.lang.String segmentKey,
                                                                               SegmentUserState segmentUserState)
                                                                        throws ApiException
        Update user context targets on a Big Segment Update user context targets included or excluded in a Big Segment.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        segmentKey - The segment key (required)
        segmentUserState - (required)
        Returns:
        ApiResponse<Void>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • updateBigSegmentTargetsAsync

        public okhttp3.Call updateBigSegmentTargetsAsync​(java.lang.String projectKey,
                                                         java.lang.String environmentKey,
                                                         java.lang.String segmentKey,
                                                         SegmentUserState segmentUserState,
                                                         ApiCallback<java.lang.Void> _callback)
                                                  throws ApiException
        Update user context targets on a Big Segment (asynchronously) Update user context targets included or excluded in a Big Segment.
        Parameters:
        projectKey - The project key (required)
        environmentKey - The environment key (required)
        segmentKey - The segment key (required)
        segmentUserState - (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