Skip to main content
GET
Get Bulk Calculate Batch

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Authorization
string
required

The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Path Parameters

projectId
string<uuid>
required

Project UUID

batchId
string<uuid>
required

The batchId returned when the batch was accepted.

Response

The batch's current status; items is present only once the batch is terminal.

A bulk-calculate batch. The same body is returned when the batch is accepted and on every poll; items is null until state is terminal. Clients must tolerate state values not listed here.

batchId
string<uuid>
required

Identifier to poll.

type
string
required

Always bulk-calculate.

state
string
required

processing while sheets are being created and solved. completed once every item has an outcome; items that could not be solved carry their own error, so a completed batch can have summary.solved of 0. failed when the batch itself could not run, or when it stopped before finishing and will not resume (see error). Treat an unrecognised value as still in progress.

progressPercent
integer
required

Whole-number share of the batch's own sheets solved so far, 0 to 100, while processing. Set to 100 when the batch reaches completed, whatever summary.solved is; read summary for the outcome. Frozen where it stopped when failed.

Required range: 0 <= x <= 100
projectId
string<uuid>
required
itemCount
integer
required

Number of items requested.

summary
object
required

Counts over the items. pending is total - solved - errored - stale and is 0 once the batch is terminal, where every item is solved or carries an error. The three non-solved counters answer different questions and are never folded together, because the remedy differs: errored counts items the batch could not produce results for, where retrying is the fix; stale counts items it did solve whose inputs have changed since, where nothing failed and re-solving the sheet is the fix; checkErrored counts items that solved but whose governing check produced no verdict, and those are also counted in solved. To confirm every item is usable, check errored, stale and checkErrored are all 0. state is the completion signal. While processing the counts are progress, and pending can read 0 in the moments between the last sheet solving and the batch reaching a terminal state; do not use it to detect completion. On a terminal batch the counters are recomputed from the sheets' current state on every poll, so the same batchId can report different counts later if its sheets are edited or deleted.

createdAt
string<date-time>
required
completedAt
string<date-time> | null
required

null until the batch is terminal.

durationSeconds
number | null
required

How long the batch took. Set when the batch reached a terminal state and the duration was recorded; null otherwise. A batch the worker had to mark failed as a last resort can be failed with durationSeconds null.

error
object | null
required

Why the batch itself failed. Set when the batch failed and the reason was recorded; null otherwise. A batch the worker had to mark failed as a last resort can be failed with error null.

items
object[] | null
required

One entry per requested item, in request order. null until the batch is terminal.