Skip to main content

Create a Batch

This endpoint facilitates the creation of a new batch within a project.
object
string
required
The name of the project this batch (and its tasks) belong to.
string
required
Name identifying this batch. Must be unique among all batches belonging to a customer.
string
The full url (including the scheme http:// or https://) or email address of the callback that will be used when the task is completed.

Finalize Batch

Finalizes a batch that was created in staging so its tasks can be worked on. Batches start in staging for Scale Rapid and Studio customers, for accounts configured to start batches in staging, or when the batch is created with staging_batch: true. If the batch is not in staging, calling this endpoint does nothing but still returns a 200 success status code.
object
string
required
Name of the batch to finalize.

Batch Retrieval

This endpoint returns the details of a batch with the name :batchName.
object
string
required
The name of the batch to retrieve.

Batch Status

This endpoint returns the status of a batch with the name :batchName, as well as the counts of its tasks grouped by task status.
object
string
required
The name of the batch to get the status of.

List All Batches

This is a paged endpoint for all of your batches. Batches will be returned in descending order based on created_at. Pagination is based on the limit and offset parameters, which determine the page size and how many results to skip.
object
string
Project name to filter batches by.
string
Status to filter batches by (staging or in_progress or completed).
boolean
Get details about the progress of the batches.
string
The minimum value of created_at for batches to be returned.
string
The maximum value of created_at for batches to be returned.

Batch Prioritization

This endpoint updates the priority of a batch. The batch priority should follow the same parameters as an individual task’s priority, so it must be between 10 (lowest) and 30 (highest). Setting a task’s priority will impact the order in which the task is first picked up, but does not guarantee the order in which a task or set of tasks will be returned to you. As a result, tasks that are not yet started can be reprioritized, but tasks that are already started will not be impacted.
object
string
required
The name of the batch to update.
object
string
required
The new priority for the batch. The priority should be between 10, representing the lowest priority, and 30, representing the highest priority.

Retrieve Batch Quality Scores

The batch quality scores match the Quality Hub’s batches table. Scores are only available for live batches, not test batches, and require a team Admin or Manager API key. Requires scaleapi 2.20.0 or later.
The response contains:
  • tasks: total is the number of non-canceled tasks in the batch, and audited is how many of them have at least one audit. Only the latest audit of each task is scored.
  • scores: whole-batch scores, sorted by name. name is the score type, such as AnnotationPrecision, DetectionPrecision or DetectionRecall; only types that the batch’s audits report are included. For each score type, score is 1 - numerator / denominator (1 when the denominator is 0), where numerator is the total errors and denominator the total possible errors over the latest audit of every audited task.
  • scores_by_stage: only for multistage projects that audit by stage. For each stage name, the average detection_recall, annotation_precision and detection_precision over the stage’s audits. A score that no audit in the stage has is left out.