Class AsyncWorkflowRunsClient
- java.lang.Object
-
- ai.extend.resources.workflowruns.AsyncWorkflowRunsClient
-
public class AsyncWorkflowRunsClient extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected ClientOptionsclientOptions
-
Constructor Summary
Constructors Constructor Description AsyncWorkflowRunsClient(ClientOptions clientOptions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.concurrent.CompletableFuture<WorkflowRun>cancel(java.lang.String id)Cancel a running workflow run by its ID.java.util.concurrent.CompletableFuture<WorkflowRun>cancel(java.lang.String id, RequestOptions requestOptions)Cancel a running workflow run by its ID.java.util.concurrent.CompletableFuture<WorkflowRun>cancel(java.lang.String id, WorkflowRunsCancelRequest request)Cancel a running workflow run by its ID.java.util.concurrent.CompletableFuture<WorkflowRun>cancel(java.lang.String id, WorkflowRunsCancelRequest request, RequestOptions requestOptions)Cancel a running workflow run by its ID.java.util.concurrent.CompletableFuture<WorkflowRun>create(WorkflowRunsCreateRequest request)Run a workflow.java.util.concurrent.CompletableFuture<WorkflowRun>create(WorkflowRunsCreateRequest request, RequestOptions requestOptions)Run a workflow.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).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).java.util.concurrent.CompletableFuture<WorkflowRunsDeleteResponse>delete(java.lang.String id)Delete a workflow run and all associated data from Extend.java.util.concurrent.CompletableFuture<WorkflowRunsDeleteResponse>delete(java.lang.String id, RequestOptions requestOptions)Delete a workflow run and all associated data from Extend.java.util.concurrent.CompletableFuture<WorkflowRunsDeleteResponse>delete(java.lang.String id, WorkflowRunsDeleteRequest request)Delete a workflow run and all associated data from Extend.java.util.concurrent.CompletableFuture<WorkflowRunsDeleteResponse>delete(java.lang.String id, WorkflowRunsDeleteRequest request, RequestOptions requestOptions)Delete a workflow run and all associated data from Extend.java.util.concurrent.CompletableFuture<WorkflowRunsListResponse>list()List runs of a Workflow.java.util.concurrent.CompletableFuture<WorkflowRunsListResponse>list(RequestOptions requestOptions)List runs of a Workflow.java.util.concurrent.CompletableFuture<WorkflowRunsListResponse>list(WorkflowRunsListRequest request)List runs of a Workflow.java.util.concurrent.CompletableFuture<WorkflowRunsListResponse>list(WorkflowRunsListRequest request, RequestOptions requestOptions)List runs of a Workflow.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.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.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.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.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.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.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.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.AsyncRawWorkflowRunsClientwithRawResponse()Get responses with HTTP metadata like headers
-
-
-
Field Detail
-
clientOptions
protected final ClientOptions clientOptions
-
-
Constructor Detail
-
AsyncWorkflowRunsClient
public AsyncWorkflowRunsClient(ClientOptions clientOptions)
-
-
Method Detail
-
withRawResponse
public AsyncRawWorkflowRunsClient withRawResponse()
Get responses with HTTP metadata like headers
-
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
filefor a single document, orpackageto process 2-50 files together as one package in a single run. Exactly one offileorpackagemust be provided.The request returns immediately with a
PROCESSINGstatus. 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
filefor a single document, orpackageto process 2-50 files together as one package in a single run. Exactly one offileorpackagemust be provided.The request returns immediately with a
PROCESSINGstatus. 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
PROCESSINGorPENDINGcan 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
PROCESSINGorPENDINGcan 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
PROCESSINGorPENDINGcan 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
PROCESSINGorPENDINGcan 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
metadataandbatchIdto 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
priorityvalue (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 correspondingbatchIdand themetadatayou provided for each input. - Fetching Results: You can also use the List Workflow Runs endpoint and filter using the
batchIdquery param.
- Monitoring: Track the progress and consume results of individual runs using Webhooks. Subscribe to events like
-
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
metadataandbatchIdto 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
priorityvalue (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 correspondingbatchIdand themetadatayou provided for each input. - Fetching Results: You can also use the List Workflow Runs endpoint and filter using the
batchIdquery param.
- Monitoring: Track the progress and consume results of individual runs using Webhooks. Subscribe to events like
-
-