Class AsyncWorkflowRunsClient


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

      • AsyncWorkflowRunsClient

        public AsyncWorkflowRunsClient​(ClientOptions clientOptions)
    • Method Detail

      • list

        public java.util.concurrent.CompletableFuture<WorkflowRunsListResponse> list()
        List runs of a Workflow. Workflows are sequences of steps that process files and data in a specific order to achieve a desired outcome. A WorkflowRun represents a single execution of a workflow against a file.
      • list

        public java.util.concurrent.CompletableFuture<WorkflowRunsListResponse> list​(RequestOptions requestOptions)
        List runs of a Workflow. Workflows are sequences of steps that process files and data in a specific order to achieve a desired outcome. A WorkflowRun represents a single execution of a workflow against a file.
      • list

        public java.util.concurrent.CompletableFuture<WorkflowRunsListResponse> list​(WorkflowRunsListRequest request)
        List runs of a Workflow. Workflows are sequences of steps that process files and data in a specific order to achieve a desired outcome. A WorkflowRun represents a single execution of a workflow against a file.
      • list

        public java.util.concurrent.CompletableFuture<WorkflowRunsListResponse> list​(WorkflowRunsListRequest request,
                                                                                     RequestOptions requestOptions)
        List runs of a Workflow. Workflows are sequences of steps that process files and data in a specific order to achieve a desired outcome. A WorkflowRun represents a single execution of a workflow against a file.
      • create

        public java.util.concurrent.CompletableFuture<WorkflowRun> create​(WorkflowRunsCreateRequest request)
        Run a workflow. A workflow is a sequence of steps that process files and data in a specific order to achieve a desired outcome.

        Pass file for a single document use case (more common), or package to process 2-50 files together as one package in a single run where context across files is used together to determine final output. Exactly one of file or package must be provided.

        The request returns immediately with a PROCESSING status. Use webhooks or poll the Get Workflow Run endpoint for results.

      • create

        public java.util.concurrent.CompletableFuture<WorkflowRun> create​(WorkflowRunsCreateRequest request,
                                                                          RequestOptions requestOptions)
        Run a workflow. A workflow is a sequence of steps that process files and data in a specific order to achieve a desired outcome.

        Pass file for a single document use case (more common), or package to process 2-50 files together as one package in a single run where context across files is used together to determine final output. Exactly one of file or package must be provided.

        The request returns immediately with a PROCESSING status. Use webhooks or poll the Get Workflow Run endpoint for results.

      • retrieve

        public java.util.concurrent.CompletableFuture<WorkflowRun> retrieve​(java.lang.String id)
        Once a workflow has been run, you can check the status and output of a specific WorkflowRun.
      • retrieve

        public java.util.concurrent.CompletableFuture<WorkflowRun> retrieve​(java.lang.String id,
                                                                            RequestOptions requestOptions)
        Once a workflow has been run, you can check the status and output of a specific WorkflowRun.
      • retrieve

        public java.util.concurrent.CompletableFuture<WorkflowRun> retrieve​(java.lang.String id,
                                                                            WorkflowRunsRetrieveRequest request)
        Once a workflow has been run, you can check the status and output of a specific WorkflowRun.
      • retrieve

        public java.util.concurrent.CompletableFuture<WorkflowRun> retrieve​(java.lang.String id,
                                                                            WorkflowRunsRetrieveRequest request,
                                                                            RequestOptions requestOptions)
        Once a workflow has been run, you can check the status and output of a specific WorkflowRun.
      • update

        public java.util.concurrent.CompletableFuture<WorkflowRun> update​(java.lang.String id)
        You can update the name and metadata of an in progress WorkflowRun at any time using this endpoint.
      • update

        public java.util.concurrent.CompletableFuture<WorkflowRun> update​(java.lang.String id,
                                                                          RequestOptions requestOptions)
        You can update the name and metadata of an in progress WorkflowRun at any time using this endpoint.
      • update

        public java.util.concurrent.CompletableFuture<WorkflowRun> update​(java.lang.String id,
                                                                          WorkflowRunsUpdateRequest request)
        You can update the name and metadata of an in progress WorkflowRun at any time using this endpoint.
      • update

        public java.util.concurrent.CompletableFuture<WorkflowRun> update​(java.lang.String id,
                                                                          WorkflowRunsUpdateRequest request,
                                                                          RequestOptions requestOptions)
        You can update the name and metadata of an in progress WorkflowRun at any time using this endpoint.
      • delete

        public java.util.concurrent.CompletableFuture<WorkflowRunsDeleteResponse> delete​(java.lang.String id)
        Delete a workflow run and all associated data from Extend. This operation is permanent and cannot be undone.

        This endpoint can be used if you'd like to manage data retention on your own rather than automated data retention policies. Or make one-off deletions for your downstream customers.

      • delete

        public java.util.concurrent.CompletableFuture<WorkflowRunsDeleteResponse> delete​(java.lang.String id,
                                                                                         RequestOptions requestOptions)
        Delete a workflow run and all associated data from Extend. This operation is permanent and cannot be undone.

        This endpoint can be used if you'd like to manage data retention on your own rather than automated data retention policies. Or make one-off deletions for your downstream customers.

      • delete

        public java.util.concurrent.CompletableFuture<WorkflowRunsDeleteResponse> delete​(java.lang.String id,
                                                                                         WorkflowRunsDeleteRequest request)
        Delete a workflow run and all associated data from Extend. This operation is permanent and cannot be undone.

        This endpoint can be used if you'd like to manage data retention on your own rather than automated data retention policies. Or make one-off deletions for your downstream customers.

      • delete

        public java.util.concurrent.CompletableFuture<WorkflowRunsDeleteResponse> delete​(java.lang.String id,
                                                                                         WorkflowRunsDeleteRequest request,
                                                                                         RequestOptions requestOptions)
        Delete a workflow run and all associated data from Extend. This operation is permanent and cannot be undone.

        This endpoint can be used if you'd like to manage data retention on your own rather than automated data retention policies. Or make one-off deletions for your downstream customers.

      • cancel

        public java.util.concurrent.CompletableFuture<WorkflowRun> cancel​(java.lang.String id)
        Cancel a running workflow run by its ID. This endpoint allows you to stop a workflow run that is currently in progress.

        Note: Only workflow runs with a status of PROCESSING or PENDING can be cancelled. Workflow runs that are completed, failed, in review, rejected, or already cancelled cannot be cancelled.

      • cancel

        public java.util.concurrent.CompletableFuture<WorkflowRun> cancel​(java.lang.String id,
                                                                          RequestOptions requestOptions)
        Cancel a running workflow run by its ID. This endpoint allows you to stop a workflow run that is currently in progress.

        Note: Only workflow runs with a status of PROCESSING or PENDING can be cancelled. Workflow runs that are completed, failed, in review, rejected, or already cancelled cannot be cancelled.

      • cancel

        public java.util.concurrent.CompletableFuture<WorkflowRun> cancel​(java.lang.String id,
                                                                          WorkflowRunsCancelRequest request)
        Cancel a running workflow run by its ID. This endpoint allows you to stop a workflow run that is currently in progress.

        Note: Only workflow runs with a status of PROCESSING or PENDING can be cancelled. Workflow runs that are completed, failed, in review, rejected, or already cancelled cannot be cancelled.

      • cancel

        public java.util.concurrent.CompletableFuture<WorkflowRun> cancel​(java.lang.String id,
                                                                          WorkflowRunsCancelRequest request,
                                                                          RequestOptions requestOptions)
        Cancel a running workflow run by its ID. This endpoint allows you to stop a workflow run that is currently in progress.

        Note: Only workflow runs with a status of PROCESSING or PENDING can be cancelled. Workflow runs that are completed, failed, in review, rejected, or already cancelled cannot be cancelled.

      • createBatch

        public java.util.concurrent.CompletableFuture<WorkflowRunsCreateBatchResponse> createBatch​(WorkflowRunsCreateBatchRequest request)
        This endpoint allows you to efficiently initiate large batches of workflow runs in a single request (up to 1,000 in a single request, but you can queue up multiple batches in rapid succession). It accepts an array of inputs, each containing a file and metadata pair. The primary use case for this endpoint is for doing large bulk runs of >1000 files at a time that can process over the course of a few hours without needing to manage rate limits that would likely occur using the primary run endpoint.

        Unlike the single Run Workflow endpoint which returns the details of the created workflow runs immediately, this batch endpoint returns a batchId.

        Our recommended usage pattern is to integrate with Webhooks for consuming results, using the metadata and batchId to match up results to the original inputs in your downstream systems. However, you can integrate in a polling mechanism by using a combination of the List Workflow Runs endpoint to fetch all runs via a batch, and then Get Workflow Run to fetch the full outputs each run.

        Priority: By default, workflow runs created through this batch endpoint are assigned a priority of 90. You can override this by passing an optional priority value (1–100) in the request body — lower values run first.

        Processing and Monitoring: Upon successful submission, the endpoint returns a batchId. The individual workflow runs are then queued for processing.

        • Monitoring: Track the progress and consume results of individual runs using Webhooks. Subscribe to events like workflow_run.completed, workflow_run.failed, etc. The webhook payload for these events will include the corresponding batchId and the metadata you provided for each input.
        • Fetching Results: You can also use the List Workflow Runs endpoint and filter using the batchId query param.
      • createBatch

        public java.util.concurrent.CompletableFuture<WorkflowRunsCreateBatchResponse> createBatch​(WorkflowRunsCreateBatchRequest request,
                                                                                                   RequestOptions requestOptions)
        This endpoint allows you to efficiently initiate large batches of workflow runs in a single request (up to 1,000 in a single request, but you can queue up multiple batches in rapid succession). It accepts an array of inputs, each containing a file and metadata pair. The primary use case for this endpoint is for doing large bulk runs of >1000 files at a time that can process over the course of a few hours without needing to manage rate limits that would likely occur using the primary run endpoint.

        Unlike the single Run Workflow endpoint which returns the details of the created workflow runs immediately, this batch endpoint returns a batchId.

        Our recommended usage pattern is to integrate with Webhooks for consuming results, using the metadata and batchId to match up results to the original inputs in your downstream systems. However, you can integrate in a polling mechanism by using a combination of the List Workflow Runs endpoint to fetch all runs via a batch, and then Get Workflow Run to fetch the full outputs each run.

        Priority: By default, workflow runs created through this batch endpoint are assigned a priority of 90. You can override this by passing an optional priority value (1–100) in the request body — lower values run first.

        Processing and Monitoring: Upon successful submission, the endpoint returns a batchId. The individual workflow runs are then queued for processing.

        • Monitoring: Track the progress and consume results of individual runs using Webhooks. Subscribe to events like workflow_run.completed, workflow_run.failed, etc. The webhook payload for these events will include the corresponding batchId and the metadata you provided for each input.
        • Fetching Results: You can also use the List Workflow Runs endpoint and filter using the batchId query param.