Close an open batch job
spicrawl_batch_closeStop an open batch job accepting items, so it completes once its queued work drains. Idempotent (closing a closed job succeeds). Returns the job object.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"job_id": "<job_id>"
},
"name": "spicrawl_batch_close"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| job_id | Yes | The batch job id returned by spicrawl_batch_submit or spicrawl_batch_list. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Job id. Pass it as `job_id` to the other spicrawl_batch_* tools. | |
| name | No | The label given at submission, if any. | |
| open | No | True while the job accepts appended items (it will not complete until closed). | |
| params | No | The job-level scrape settings as stored. | |
| status | No | Lifecycle: queued, running, paused, cancelling, completed, failed or cancelled. Keep polling while queued/running/paused/cancelling; stop at completed, failed or cancelled. | |
| priority | No | Effective scheduling priority. | |
| progress | No | Live item counters and the credits charged so far. | |
| warnings | No | Decisions made on the caller's behalf at submission (a clamped concurrency, items not yet queued). | |
| error_code | No | Machine code of a job-level failure. | |
| project_id | No | Project the API key belongs to. | |
| started_at | No | ISO-8601 time the first item started. | |
| status_url | No | API path to poll for this job: /v1/batch/{id}. | |
| concurrency | No | Effective per-job concurrency after the server's clamping. | |
| finished_at | No | ISO-8601 time the job reached a terminal status. | |
| results_url | No | API path of the job's results: /v1/batch/{id}/results. | |
| total_items | No | Number of items in the job. | |
| max_attempts | No | Effective attempts per item. | |
| submitted_at | No | ISO-8601 time the job was accepted. | |
| error_message | No | Human-readable job-level failure reason. | |
| estimated_credits | No | Credits reserved at submission (a hold, not a charge; compare with progress.credits_charged). | |
| failure_threshold | No | Failed-item count that aborts the job, when set. | |
| results_expire_at | No | ISO-8601 deadline after which results answer 410 Gone. | |
| cancel_requested_at | No | ISO-8601 time a cancel was accepted. | |
| estimated_credits_micro | No | Same as estimated_credits in micro-credits. |