---
title: "Dequeue next pending batch (internal)"
method: POST
path: "/appModeling/run/{application_id}/batch/dequeue"
tags: ["AppModeling"]
---

# Dequeue next pending batch (internal)

`POST /appModeling/run/{application_id}/batch/dequeue`

Returns the next pending test invariant IDs for the coordinator to process and
transitions the run status to RUNNING. Called internally by the TypeScript
dequeueNextAppModelingBatch handler.

## Path parameters

- `application_id` string, required

## Query parameters

- `workspaceId` string, required

## Request body

- AppModelingDequeueInternalRequest — Request body for the internal dequeue endpoint.
  - `batch_size` integer, required — Number of test invariant IDs to dequeue.

## Response `200`

Next batch, or exhausted signal

- AppModelingDequeueInternalResponse — Response from the internal dequeue endpoint.
  - `exhausted` boolean, required — True when the frontier is fully attempted and there is nothing left.
  - `batch_item_count` integer — Number of test invariant IDs in this batch. Echo token passed back to markAppModelingBatchCompleteInternal.
  - `test_invariant_ids` string[] — Test invariant IDs in this batch. Empty when exhausted is true.

## Other responses

- `400` — Invalid or missing parameter
- `401` — User not authenticated
- `404` — Coordinator row not found for this application
- `default` — Unknown error

---

[API](https://skmtc.net/mabl/apis/mabl-api.md) · [All operations](https://skmtc.net/mabl/apis/mabl-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mabl/mabl-api/revisions/d0fc0114da66/schema)
