检索批处理

Retrieves a batch.

get
/batches/{batch_id}
Authorizations
x-portkey-api-keystringRequired
x-portkey-virtual-keystringRequired
Path parameters
batch_idstringRequired

The ID of the batch to retrieve.

Responses
chevron-right
200

Batch retrieved successfully.

application/json
idstringRequired
objectstring · enumRequired

The object type, which is always batch.

Possible values:
endpointstringRequired

The Portkey API endpoint used by the batch.

input_file_idstringRequired

The ID of the input file for the batch.

completion_windowstringRequired

The time frame within which the batch should be processed.

statusstring · enumRequired

The current status of the batch.

Possible values:
output_file_idstringOptional

The ID of the file containing the outputs of successfully executed requests.

error_file_idstringOptional

The ID of the file containing the outputs of requests with errors.

created_atintegerRequired

The Unix timestamp (in seconds) for when the batch was created.

in_progress_atintegerOptional

The Unix timestamp (in seconds) for when the batch started processing.

expires_atintegerOptional

The Unix timestamp (in seconds) for when the batch will expire.

finalizing_atintegerOptional

The Unix timestamp (in seconds) for when the batch started finalizing.

completed_atintegerOptional

The Unix timestamp (in seconds) for when the batch was completed.

failed_atintegerOptional

The Unix timestamp (in seconds) for when the batch failed.

expired_atintegerOptional

The Unix timestamp (in seconds) for when the batch expired.

cancelling_atintegerOptional

The Unix timestamp (in seconds) for when the batch started cancelling.

cancelled_atintegerOptional

The Unix timestamp (in seconds) for when the batch was cancelled.

metadataobject · nullableOptional

Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.

get
/batches/{batch_id}
200

Batch retrieved successfully.

Last updated