Class WorkflowRunsClient

  • Direct Known Subclasses:
    WorkflowRunsClient

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

      • WorkflowRunsClient

        public WorkflowRunsClient​(ClientOptions clientOptions)
    • Method Detail

      • withRawResponse

        public RawWorkflowRunsClient withRawResponse()
        Get responses with HTTP metadata like headers
      • list

        public 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 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 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 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 WorkflowRun create​(WorkflowRunsCreateRequest request)
        Run a workflow with a file. A workflow is a sequence of steps that process files and data in a specific order to achieve a desired outcome.

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

      • create

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

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

      • retrieve

        public 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 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.
      • update

        public 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 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 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.
      • delete

        public 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 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.

      • cancel

        public 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 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.

      • createBatch

        public 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: All workflow runs created through this batch endpoint are automatically assigned a priority of 90.

        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 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: All workflow runs created through this batch endpoint are automatically assigned a priority of 90.

        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.