Class ApprovalsBetaApi


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

      • ApprovalsBetaApi

        public ApprovalsBetaApi()
      • ApprovalsBetaApi

        public ApprovalsBetaApi​(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)
      • deleteApprovalRequestCall

        public okhttp3.Call deleteApprovalRequestCall​(java.lang.String id,
                                                      ApiCallback _callback)
                                               throws ApiException
        Build call for deleteApprovalRequest
        Parameters:
        id - The approval request ID (required)
        _callback - Callback for upload/download progress
        Returns:
        Call to execute
        Throws:
        ApiException - If fail to serialize the request body object
      • deleteApprovalRequest

        public void deleteApprovalRequest​(java.lang.String id)
                                   throws ApiException
        Delete approval request Delete an approval request.
        Parameters:
        id - The approval request ID (required)
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • deleteApprovalRequestWithHttpInfo

        public ApiResponse<java.lang.Void> deleteApprovalRequestWithHttpInfo​(java.lang.String id)
                                                                      throws ApiException
        Delete approval request Delete an approval request.
        Parameters:
        id - The approval request ID (required)
        Returns:
        ApiResponse<Void>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • deleteApprovalRequestAsync

        public okhttp3.Call deleteApprovalRequestAsync​(java.lang.String id,
                                                       ApiCallback<java.lang.Void> _callback)
                                                throws ApiException
        Delete approval request (asynchronously) Delete an approval request.
        Parameters:
        id - The approval request ID (required)
        _callback - The callback to be executed when the API call finishes
        Returns:
        The request call
        Throws:
        ApiException - If fail to process the API call, e.g. serializing the request body object
      • getApprovalRequestCall

        public okhttp3.Call getApprovalRequestCall​(java.lang.String id,
                                                   java.lang.String expand,
                                                   ApiCallback _callback)
                                            throws ApiException
        Build call for getApprovalRequest
        Parameters:
        id - The approval request ID (required)
        expand - A comma-separated list of fields to expand in the response. Supported fields are explained above. (optional)
        _callback - Callback for upload/download progress
        Returns:
        Call to execute
        Throws:
        ApiException - If fail to serialize the request body object
      • getApprovalRequest

        public ExpandableApprovalRequestResponse getApprovalRequest​(java.lang.String id,
                                                                    java.lang.String expand)
                                                             throws ApiException
        Get approval request Get an approval request by approval request ID. ### Expanding approval response LaunchDarkly supports the `expand` query param to include additional fields in the response, with the following fields: - `flag` includes the flag the approval request belongs to - `project` includes the project the approval request belongs to - `environments` includes the environments the approval request relates to For example, `expand=project,flag` includes the `project` and `flag` fields in the response.
        Parameters:
        id - The approval request ID (required)
        expand - A comma-separated list of fields to expand in the response. Supported fields are explained above. (optional)
        Returns:
        ExpandableApprovalRequestResponse
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • getApprovalRequestWithHttpInfo

        public ApiResponse<ExpandableApprovalRequestResponse> getApprovalRequestWithHttpInfo​(java.lang.String id,
                                                                                             java.lang.String expand)
                                                                                      throws ApiException
        Get approval request Get an approval request by approval request ID. ### Expanding approval response LaunchDarkly supports the `expand` query param to include additional fields in the response, with the following fields: - `flag` includes the flag the approval request belongs to - `project` includes the project the approval request belongs to - `environments` includes the environments the approval request relates to For example, `expand=project,flag` includes the `project` and `flag` fields in the response.
        Parameters:
        id - The approval request ID (required)
        expand - A comma-separated list of fields to expand in the response. Supported fields are explained above. (optional)
        Returns:
        ApiResponse<ExpandableApprovalRequestResponse>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • getApprovalRequestAsync

        public okhttp3.Call getApprovalRequestAsync​(java.lang.String id,
                                                    java.lang.String expand,
                                                    ApiCallback<ExpandableApprovalRequestResponse> _callback)
                                             throws ApiException
        Get approval request (asynchronously) Get an approval request by approval request ID. ### Expanding approval response LaunchDarkly supports the `expand` query param to include additional fields in the response, with the following fields: - `flag` includes the flag the approval request belongs to - `project` includes the project the approval request belongs to - `environments` includes the environments the approval request relates to For example, `expand=project,flag` includes the `project` and `flag` fields in the response.
        Parameters:
        id - The approval request ID (required)
        expand - A comma-separated list of fields to expand in the response. Supported fields are explained above. (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
      • getApprovalRequestsCall

        public okhttp3.Call getApprovalRequestsCall​(java.lang.String filter,
                                                    java.lang.String expand,
                                                    java.lang.Long limit,
                                                    java.lang.Long offset,
                                                    ApiCallback _callback)
                                             throws ApiException
        Build call for getApprovalRequests
        Parameters:
        filter - A comma-separated list of filters. Each filter is of the form `field operator value`. Supported fields are explained above. (optional)
        expand - A comma-separated list of fields to expand in the response. Supported fields are explained above. (optional)
        limit - The number of approvals to return. Defaults to -1, which returns all approvals. (optional)
        offset - Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`. (optional)
        _callback - Callback for upload/download progress
        Returns:
        Call to execute
        Throws:
        ApiException - If fail to serialize the request body object
      • getApprovalRequests

        public ExpandableApprovalRequestsResponse getApprovalRequests​(java.lang.String filter,
                                                                      java.lang.String expand,
                                                                      java.lang.Long limit,
                                                                      java.lang.Long offset)
                                                               throws ApiException
        List approval requests Get all approval requests. ### Filtering approvals LaunchDarkly supports the `filter` query param for filtering, with the following fields: - `notifyMemberIds` filters for only approvals that are assigned to a member in the specified list. For example: `filter=notifyMemberIds anyOf [\"memberId1\", \"memberId2\"]`. - `requestorId` filters for only approvals that correspond to the ID of the member who requested the approval. For example: `filter=requestorId equals 457034721476302714390214`. - `resourceId` filters for only approvals that correspond to the the specified resource identifier. For example: `filter=resourceId equals proj/my-project:env/my-environment:flag/my-flag`. - `reviewStatus` filters for only approvals which correspond to the review status in the specified list. The possible values are `approved`, `declined`, and `pending`. For example: `filter=reviewStatus anyOf [\"pending\", \"approved\"]`. - `status` filters for only approvals which correspond to the status in the specified list. The possible values are `pending`, `scheduled`, `failed`, and `completed`. For example: `filter=status anyOf [\"pending\", \"scheduled\"]`. You can also apply multiple filters at once. For example, setting `filter=projectKey equals my-project, reviewStatus anyOf [\"pending\",\"approved\"]` matches approval requests which correspond to the `my-project` project key, and a review status of either `pending` or `approved`. ### Expanding approval response LaunchDarkly supports the `expand` query param to include additional fields in the response, with the following fields: - `flag` includes the flag the approval request belongs to - `project` includes the project the approval request belongs to - `environments` includes the environments the approval request relates to For example, `expand=project,flag` includes the `project` and `flag` fields in the response.
        Parameters:
        filter - A comma-separated list of filters. Each filter is of the form `field operator value`. Supported fields are explained above. (optional)
        expand - A comma-separated list of fields to expand in the response. Supported fields are explained above. (optional)
        limit - The number of approvals to return. Defaults to -1, which returns all approvals. (optional)
        offset - Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`. (optional)
        Returns:
        ExpandableApprovalRequestsResponse
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • getApprovalRequestsWithHttpInfo

        public ApiResponse<ExpandableApprovalRequestsResponse> getApprovalRequestsWithHttpInfo​(java.lang.String filter,
                                                                                               java.lang.String expand,
                                                                                               java.lang.Long limit,
                                                                                               java.lang.Long offset)
                                                                                        throws ApiException
        List approval requests Get all approval requests. ### Filtering approvals LaunchDarkly supports the `filter` query param for filtering, with the following fields: - `notifyMemberIds` filters for only approvals that are assigned to a member in the specified list. For example: `filter=notifyMemberIds anyOf [\"memberId1\", \"memberId2\"]`. - `requestorId` filters for only approvals that correspond to the ID of the member who requested the approval. For example: `filter=requestorId equals 457034721476302714390214`. - `resourceId` filters for only approvals that correspond to the the specified resource identifier. For example: `filter=resourceId equals proj/my-project:env/my-environment:flag/my-flag`. - `reviewStatus` filters for only approvals which correspond to the review status in the specified list. The possible values are `approved`, `declined`, and `pending`. For example: `filter=reviewStatus anyOf [\"pending\", \"approved\"]`. - `status` filters for only approvals which correspond to the status in the specified list. The possible values are `pending`, `scheduled`, `failed`, and `completed`. For example: `filter=status anyOf [\"pending\", \"scheduled\"]`. You can also apply multiple filters at once. For example, setting `filter=projectKey equals my-project, reviewStatus anyOf [\"pending\",\"approved\"]` matches approval requests which correspond to the `my-project` project key, and a review status of either `pending` or `approved`. ### Expanding approval response LaunchDarkly supports the `expand` query param to include additional fields in the response, with the following fields: - `flag` includes the flag the approval request belongs to - `project` includes the project the approval request belongs to - `environments` includes the environments the approval request relates to For example, `expand=project,flag` includes the `project` and `flag` fields in the response.
        Parameters:
        filter - A comma-separated list of filters. Each filter is of the form `field operator value`. Supported fields are explained above. (optional)
        expand - A comma-separated list of fields to expand in the response. Supported fields are explained above. (optional)
        limit - The number of approvals to return. Defaults to -1, which returns all approvals. (optional)
        offset - Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`. (optional)
        Returns:
        ApiResponse<ExpandableApprovalRequestsResponse>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • getApprovalRequestsAsync

        public okhttp3.Call getApprovalRequestsAsync​(java.lang.String filter,
                                                     java.lang.String expand,
                                                     java.lang.Long limit,
                                                     java.lang.Long offset,
                                                     ApiCallback<ExpandableApprovalRequestsResponse> _callback)
                                              throws ApiException
        List approval requests (asynchronously) Get all approval requests. ### Filtering approvals LaunchDarkly supports the `filter` query param for filtering, with the following fields: - `notifyMemberIds` filters for only approvals that are assigned to a member in the specified list. For example: `filter=notifyMemberIds anyOf [\"memberId1\", \"memberId2\"]`. - `requestorId` filters for only approvals that correspond to the ID of the member who requested the approval. For example: `filter=requestorId equals 457034721476302714390214`. - `resourceId` filters for only approvals that correspond to the the specified resource identifier. For example: `filter=resourceId equals proj/my-project:env/my-environment:flag/my-flag`. - `reviewStatus` filters for only approvals which correspond to the review status in the specified list. The possible values are `approved`, `declined`, and `pending`. For example: `filter=reviewStatus anyOf [\"pending\", \"approved\"]`. - `status` filters for only approvals which correspond to the status in the specified list. The possible values are `pending`, `scheduled`, `failed`, and `completed`. For example: `filter=status anyOf [\"pending\", \"scheduled\"]`. You can also apply multiple filters at once. For example, setting `filter=projectKey equals my-project, reviewStatus anyOf [\"pending\",\"approved\"]` matches approval requests which correspond to the `my-project` project key, and a review status of either `pending` or `approved`. ### Expanding approval response LaunchDarkly supports the `expand` query param to include additional fields in the response, with the following fields: - `flag` includes the flag the approval request belongs to - `project` includes the project the approval request belongs to - `environments` includes the environments the approval request relates to For example, `expand=project,flag` includes the `project` and `flag` fields in the response.
        Parameters:
        filter - A comma-separated list of filters. Each filter is of the form `field operator value`. Supported fields are explained above. (optional)
        expand - A comma-separated list of fields to expand in the response. Supported fields are explained above. (optional)
        limit - The number of approvals to return. Defaults to -1, which returns all approvals. (optional)
        offset - Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`. (optional)
        _callback - The callback to be executed when the API call finishes
        Returns:
        The request call
        Throws:
        ApiException - If fail to process the API call, e.g. serializing the request body object
      • postApprovalRequestCall

        public okhttp3.Call postApprovalRequestCall​(CreateApprovalRequestRequest createApprovalRequestRequest,
                                                    ApiCallback _callback)
                                             throws ApiException
        Build call for postApprovalRequest
        Parameters:
        createApprovalRequestRequest - (required)
        _callback - Callback for upload/download progress
        Returns:
        Call to execute
        Throws:
        ApiException - If fail to serialize the request body object
      • postApprovalRequest

        public ApprovalRequestResponse postApprovalRequest​(CreateApprovalRequestRequest createApprovalRequestRequest)
                                                    throws ApiException
        Create approval request Create an approval request. This endpoint currently supports creating an approval request for a flag across all environments with the following instructions: - `addVariation` - `removeVariation` - `updateVariation` - `updateDefaultVariation` For details on using these instructions, read [Update feature flag](/tag/Feature-flags#operation/patchFeatureFlag). To create an approval for a flag specific to an environment, use [Create approval request for a flag](/tag/Approvals#operation/postApprovalRequestForFlag).
        Parameters:
        createApprovalRequestRequest - (required)
        Returns:
        ApprovalRequestResponse
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • postApprovalRequestWithHttpInfo

        public ApiResponse<ApprovalRequestResponse> postApprovalRequestWithHttpInfo​(CreateApprovalRequestRequest createApprovalRequestRequest)
                                                                             throws ApiException
        Create approval request Create an approval request. This endpoint currently supports creating an approval request for a flag across all environments with the following instructions: - `addVariation` - `removeVariation` - `updateVariation` - `updateDefaultVariation` For details on using these instructions, read [Update feature flag](/tag/Feature-flags#operation/patchFeatureFlag). To create an approval for a flag specific to an environment, use [Create approval request for a flag](/tag/Approvals#operation/postApprovalRequestForFlag).
        Parameters:
        createApprovalRequestRequest - (required)
        Returns:
        ApiResponse<ApprovalRequestResponse>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • postApprovalRequestAsync

        public okhttp3.Call postApprovalRequestAsync​(CreateApprovalRequestRequest createApprovalRequestRequest,
                                                     ApiCallback<ApprovalRequestResponse> _callback)
                                              throws ApiException
        Create approval request (asynchronously) Create an approval request. This endpoint currently supports creating an approval request for a flag across all environments with the following instructions: - `addVariation` - `removeVariation` - `updateVariation` - `updateDefaultVariation` For details on using these instructions, read [Update feature flag](/tag/Feature-flags#operation/patchFeatureFlag). To create an approval for a flag specific to an environment, use [Create approval request for a flag](/tag/Approvals#operation/postApprovalRequestForFlag).
        Parameters:
        createApprovalRequestRequest - (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
      • postApprovalRequestApplyCall

        public okhttp3.Call postApprovalRequestApplyCall​(java.lang.String id,
                                                         PostApprovalRequestApplyRequest postApprovalRequestApplyRequest,
                                                         ApiCallback _callback)
                                                  throws ApiException
        Build call for postApprovalRequestApply
        Parameters:
        id - The feature flag approval request ID (required)
        postApprovalRequestApplyRequest - (required)
        _callback - Callback for upload/download progress
        Returns:
        Call to execute
        Throws:
        ApiException - If fail to serialize the request body object
      • postApprovalRequestApply

        public ApprovalRequestResponse postApprovalRequestApply​(java.lang.String id,
                                                                PostApprovalRequestApplyRequest postApprovalRequestApplyRequest)
                                                         throws ApiException
        Apply approval request Apply an approval request that has been approved.
        Parameters:
        id - The feature flag approval request ID (required)
        postApprovalRequestApplyRequest - (required)
        Returns:
        ApprovalRequestResponse
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • postApprovalRequestApplyWithHttpInfo

        public ApiResponse<ApprovalRequestResponse> postApprovalRequestApplyWithHttpInfo​(java.lang.String id,
                                                                                         PostApprovalRequestApplyRequest postApprovalRequestApplyRequest)
                                                                                  throws ApiException
        Apply approval request Apply an approval request that has been approved.
        Parameters:
        id - The feature flag approval request ID (required)
        postApprovalRequestApplyRequest - (required)
        Returns:
        ApiResponse<ApprovalRequestResponse>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • postApprovalRequestApplyAsync

        public okhttp3.Call postApprovalRequestApplyAsync​(java.lang.String id,
                                                          PostApprovalRequestApplyRequest postApprovalRequestApplyRequest,
                                                          ApiCallback<ApprovalRequestResponse> _callback)
                                                   throws ApiException
        Apply approval request (asynchronously) Apply an approval request that has been approved.
        Parameters:
        id - The feature flag approval request ID (required)
        postApprovalRequestApplyRequest - (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
      • postApprovalRequestReviewCall

        public okhttp3.Call postApprovalRequestReviewCall​(java.lang.String id,
                                                          PostApprovalRequestReviewRequest postApprovalRequestReviewRequest,
                                                          ApiCallback _callback)
                                                   throws ApiException
        Build call for postApprovalRequestReview
        Parameters:
        id - The approval request ID (required)
        postApprovalRequestReviewRequest - (required)
        _callback - Callback for upload/download progress
        Returns:
        Call to execute
        Throws:
        ApiException - If fail to serialize the request body object
      • postApprovalRequestReview

        public ApprovalRequestResponse postApprovalRequestReview​(java.lang.String id,
                                                                 PostApprovalRequestReviewRequest postApprovalRequestReviewRequest)
                                                          throws ApiException
        Review approval request Review an approval request by approving or denying changes.
        Parameters:
        id - The approval request ID (required)
        postApprovalRequestReviewRequest - (required)
        Returns:
        ApprovalRequestResponse
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • postApprovalRequestReviewWithHttpInfo

        public ApiResponse<ApprovalRequestResponse> postApprovalRequestReviewWithHttpInfo​(java.lang.String id,
                                                                                          PostApprovalRequestReviewRequest postApprovalRequestReviewRequest)
                                                                                   throws ApiException
        Review approval request Review an approval request by approving or denying changes.
        Parameters:
        id - The approval request ID (required)
        postApprovalRequestReviewRequest - (required)
        Returns:
        ApiResponse<ApprovalRequestResponse>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
      • postApprovalRequestReviewAsync

        public okhttp3.Call postApprovalRequestReviewAsync​(java.lang.String id,
                                                           PostApprovalRequestReviewRequest postApprovalRequestReviewRequest,
                                                           ApiCallback<ApprovalRequestResponse> _callback)
                                                    throws ApiException
        Review approval request (asynchronously) Review an approval request by approving or denying changes.
        Parameters:
        id - The approval request ID (required)
        postApprovalRequestReviewRequest - (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