Class AsyncExtractRunsClient
- java.lang.Object
-
- ai.extend.resources.extractruns.AsyncExtractRunsClient
-
public class AsyncExtractRunsClient extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected ClientOptionsclientOptions
-
Constructor Summary
Constructors Constructor Description AsyncExtractRunsClient(ClientOptions clientOptions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.concurrent.CompletableFuture<ExtractRun>cancel(java.lang.String id)Cancel an in-progress extract run.java.util.concurrent.CompletableFuture<ExtractRun>cancel(java.lang.String id, RequestOptions requestOptions)Cancel an in-progress extract run.java.util.concurrent.CompletableFuture<ExtractRun>cancel(java.lang.String id, ExtractRunsCancelRequest request)Cancel an in-progress extract run.java.util.concurrent.CompletableFuture<ExtractRun>cancel(java.lang.String id, ExtractRunsCancelRequest request, RequestOptions requestOptions)Cancel an in-progress extract run.java.util.concurrent.CompletableFuture<ExtractRun>create()Extract structured data from a file using an existing extractor or an inline configuration.java.util.concurrent.CompletableFuture<ExtractRun>create(RequestOptions requestOptions)Extract structured data from a file using an existing extractor or an inline configuration.java.util.concurrent.CompletableFuture<ExtractRun>create(ExtractRunsCreateRequest request)Extract structured data from a file using an existing extractor or an inline configuration.java.util.concurrent.CompletableFuture<ExtractRun>create(ExtractRunsCreateRequest request, RequestOptions requestOptions)Extract structured data from a file using an existing extractor or an inline configuration.java.util.concurrent.CompletableFuture<BatchRun>createBatch(ExtractRunsCreateBatchRequest request)Submit up to 1,000 files for extraction in a single request.java.util.concurrent.CompletableFuture<BatchRun>createBatch(ExtractRunsCreateBatchRequest request, RequestOptions requestOptions)Submit up to 1,000 files for extraction in a single request.java.util.concurrent.CompletableFuture<ExtractRunsDeleteResponse>delete(java.lang.String id)Delete an extract run and all associated data from Extend.java.util.concurrent.CompletableFuture<ExtractRunsDeleteResponse>delete(java.lang.String id, RequestOptions requestOptions)Delete an extract run and all associated data from Extend.java.util.concurrent.CompletableFuture<ExtractRunsDeleteResponse>delete(java.lang.String id, ExtractRunsDeleteRequest request)Delete an extract run and all associated data from Extend.java.util.concurrent.CompletableFuture<ExtractRunsDeleteResponse>delete(java.lang.String id, ExtractRunsDeleteRequest request, RequestOptions requestOptions)Delete an extract run and all associated data from Extend.java.util.concurrent.CompletableFuture<ExtractRunsListResponse>list()List all extract runs.java.util.concurrent.CompletableFuture<ExtractRunsListResponse>list(RequestOptions requestOptions)List all extract runs.java.util.concurrent.CompletableFuture<ExtractRunsListResponse>list(ExtractRunsListRequest request)List all extract runs.java.util.concurrent.CompletableFuture<ExtractRunsListResponse>list(ExtractRunsListRequest request, RequestOptions requestOptions)List all extract runs.java.util.concurrent.CompletableFuture<ExtractRun>retrieve(java.lang.String id)Retrieve details about a specific extract run, including its status, outputs, and any edits made during review.java.util.concurrent.CompletableFuture<ExtractRun>retrieve(java.lang.String id, RequestOptions requestOptions)Retrieve details about a specific extract run, including its status, outputs, and any edits made during review.java.util.concurrent.CompletableFuture<ExtractRun>retrieve(java.lang.String id, ExtractRunsRetrieveRequest request)Retrieve details about a specific extract run, including its status, outputs, and any edits made during review.java.util.concurrent.CompletableFuture<ExtractRun>retrieve(java.lang.String id, ExtractRunsRetrieveRequest request, RequestOptions requestOptions)Retrieve details about a specific extract run, including its status, outputs, and any edits made during review.AsyncRawExtractRunsClientwithRawResponse()Get responses with HTTP metadata like headers
-
-
-
Field Detail
-
clientOptions
protected final ClientOptions clientOptions
-
-
Constructor Detail
-
AsyncExtractRunsClient
public AsyncExtractRunsClient(ClientOptions clientOptions)
-
-
Method Detail
-
withRawResponse
public AsyncRawExtractRunsClient withRawResponse()
Get responses with HTTP metadata like headers
-
list
public java.util.concurrent.CompletableFuture<ExtractRunsListResponse> list()
List all extract runs.Returns a summary of each run. Use
GET /extract_runs/{id}to retrieve the full object includingoutputandconfig.
-
list
public java.util.concurrent.CompletableFuture<ExtractRunsListResponse> list(RequestOptions requestOptions)
List all extract runs.Returns a summary of each run. Use
GET /extract_runs/{id}to retrieve the full object includingoutputandconfig.
-
list
public java.util.concurrent.CompletableFuture<ExtractRunsListResponse> list(ExtractRunsListRequest request)
List all extract runs.Returns a summary of each run. Use
GET /extract_runs/{id}to retrieve the full object includingoutputandconfig.
-
list
public java.util.concurrent.CompletableFuture<ExtractRunsListResponse> list(ExtractRunsListRequest request, RequestOptions requestOptions)
List all extract runs.Returns a summary of each run. Use
GET /extract_runs/{id}to retrieve the full object includingoutputandconfig.
-
create
public java.util.concurrent.CompletableFuture<ExtractRun> create()
Extract structured data from a file using an existing extractor or an inline configuration.The request returns immediately with a
PROCESSINGstatus. Use webhooks or poll the Get Extract Run endpoint for results.
-
create
public java.util.concurrent.CompletableFuture<ExtractRun> create(RequestOptions requestOptions)
Extract structured data from a file using an existing extractor or an inline configuration.The request returns immediately with a
PROCESSINGstatus. Use webhooks or poll the Get Extract Run endpoint for results.
-
create
public java.util.concurrent.CompletableFuture<ExtractRun> create(ExtractRunsCreateRequest request)
Extract structured data from a file using an existing extractor or an inline configuration.The request returns immediately with a
PROCESSINGstatus. Use webhooks or poll the Get Extract Run endpoint for results.
-
create
public java.util.concurrent.CompletableFuture<ExtractRun> create(ExtractRunsCreateRequest request, RequestOptions requestOptions)
Extract structured data from a file using an existing extractor or an inline configuration.The request returns immediately with a
PROCESSINGstatus. Use webhooks or poll the Get Extract Run endpoint for results.
-
retrieve
public java.util.concurrent.CompletableFuture<ExtractRun> retrieve(java.lang.String id)
Retrieve details about a specific extract run, including its status, outputs, and any edits made during review.A common use case for this endpoint is to poll for the status and final output of an extract run when using the Create Extract Run endpoint. For instance, if you do not want to not configure webhooks to receive the output via completion/failure events.
-
retrieve
public java.util.concurrent.CompletableFuture<ExtractRun> retrieve(java.lang.String id, RequestOptions requestOptions)
Retrieve details about a specific extract run, including its status, outputs, and any edits made during review.A common use case for this endpoint is to poll for the status and final output of an extract run when using the Create Extract Run endpoint. For instance, if you do not want to not configure webhooks to receive the output via completion/failure events.
-
retrieve
public java.util.concurrent.CompletableFuture<ExtractRun> retrieve(java.lang.String id, ExtractRunsRetrieveRequest request)
Retrieve details about a specific extract run, including its status, outputs, and any edits made during review.A common use case for this endpoint is to poll for the status and final output of an extract run when using the Create Extract Run endpoint. For instance, if you do not want to not configure webhooks to receive the output via completion/failure events.
-
retrieve
public java.util.concurrent.CompletableFuture<ExtractRun> retrieve(java.lang.String id, ExtractRunsRetrieveRequest request, RequestOptions requestOptions)
Retrieve details about a specific extract run, including its status, outputs, and any edits made during review.A common use case for this endpoint is to poll for the status and final output of an extract run when using the Create Extract Run endpoint. For instance, if you do not want to not configure webhooks to receive the output via completion/failure events.
-
delete
public java.util.concurrent.CompletableFuture<ExtractRunsDeleteResponse> delete(java.lang.String id)
Delete an extract 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<ExtractRunsDeleteResponse> delete(java.lang.String id, RequestOptions requestOptions)
Delete an extract 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<ExtractRunsDeleteResponse> delete(java.lang.String id, ExtractRunsDeleteRequest request)
Delete an extract 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<ExtractRunsDeleteResponse> delete(java.lang.String id, ExtractRunsDeleteRequest request, RequestOptions requestOptions)
Delete an extract 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<ExtractRun> cancel(java.lang.String id)
Cancel an in-progress extract run.Note: Only extract runs with a status of
"PROCESSING"can be cancelled. Extractor runs that have already completed, failed, or been cancelled cannot be cancelled again.
-
cancel
public java.util.concurrent.CompletableFuture<ExtractRun> cancel(java.lang.String id, RequestOptions requestOptions)
Cancel an in-progress extract run.Note: Only extract runs with a status of
"PROCESSING"can be cancelled. Extractor runs that have already completed, failed, or been cancelled cannot be cancelled again.
-
cancel
public java.util.concurrent.CompletableFuture<ExtractRun> cancel(java.lang.String id, ExtractRunsCancelRequest request)
Cancel an in-progress extract run.Note: Only extract runs with a status of
"PROCESSING"can be cancelled. Extractor runs that have already completed, failed, or been cancelled cannot be cancelled again.
-
cancel
public java.util.concurrent.CompletableFuture<ExtractRun> cancel(java.lang.String id, ExtractRunsCancelRequest request, RequestOptions requestOptions)
Cancel an in-progress extract run.Note: Only extract runs with a status of
"PROCESSING"can be cancelled. Extractor runs that have already completed, failed, or been cancelled cannot be cancelled again.
-
createBatch
public java.util.concurrent.CompletableFuture<BatchRun> createBatch(ExtractRunsCreateBatchRequest request)
Submit up to 1,000 files for extraction in a single request. Each file is processed as an independent extract run using the same extractor and configuration.Unlike the single Extract File (Async) endpoint, this batch endpoint accepts an
inputsarray and immediately returns aBatchRunobject containing a batchidand aPENDINGstatus. The individual runs are then queued and processed asynchronously.Monitoring results:
- Webhooks (recommended): Subscribe to
batch_processor_run.processedandbatch_processor_run.failedevents. The webhook payload indicates the batch has finished — fetch individual run results usingGET /extract_runs?batchId={id}. - Polling: Call
GET /batch_runs/{id}to check the overall batch status, and useGET /extract_runsfiltered bybatchIdto retrieve individual run results.
Notes:
- A processor reference (
extractor.id) is required — inlineconfigis not supported for batch requests. inputsmust contain between 1 and 1,000 items.- All inputs in a batch use the same extractor version and override config.
- Webhooks (recommended): Subscribe to
-
createBatch
public java.util.concurrent.CompletableFuture<BatchRun> createBatch(ExtractRunsCreateBatchRequest request, RequestOptions requestOptions)
Submit up to 1,000 files for extraction in a single request. Each file is processed as an independent extract run using the same extractor and configuration.Unlike the single Extract File (Async) endpoint, this batch endpoint accepts an
inputsarray and immediately returns aBatchRunobject containing a batchidand aPENDINGstatus. The individual runs are then queued and processed asynchronously.Monitoring results:
- Webhooks (recommended): Subscribe to
batch_processor_run.processedandbatch_processor_run.failedevents. The webhook payload indicates the batch has finished — fetch individual run results usingGET /extract_runs?batchId={id}. - Polling: Call
GET /batch_runs/{id}to check the overall batch status, and useGET /extract_runsfiltered bybatchIdto retrieve individual run results.
Notes:
- A processor reference (
extractor.id) is required — inlineconfigis not supported for batch requests. inputsmust contain between 1 and 1,000 items.- All inputs in a batch use the same extractor version and override config.
- Webhooks (recommended): Subscribe to
-
-