Start an asynchronous job
Example body: {"type":"report","durationSeconds":10} Returns 202 with a Location header pointing at the job and a Retry-After hint. Poll that URL; the job is queued for 2 seconds, then runs for durationSeconds. When it completes, fetch resultUrl.
Request body
Optional. application/json, text/json, application/*+json, application/xml, text/xml, application/*+xml. Model: JobsControllerJobRequest. Job type and duration. An empty body starts a 10-second report job.
{"type": "report", "durationSeconds": 10}Responses
- 200
- OK
- 202
- Job accepted; poll the Location URL.
- 400
- Unknown type or duration out of range.
Example
curl -X POST "https://api.testingapis.com/api/jobs" \
-H "Content-Type: application/json" \
-d '{"type": "report", "durationSeconds": 10}' \
-H "X-TestingApis-Key: YOUR_API_KEY"Location: /api/jobs/job_1002
Retry-After: 2
{
"message": "Job accepted. Poll the Location URL for status.",
"data": {
"id": "job_1002",
"type": "report",
"status": "queued",
"progress": 0,
"durationSeconds": 10,
"createdAt": "2026-09-30T18:26:45Z",
"startedAt": null,
"finishedAt": null,
"statusUrl": "/api/jobs/job_1002",
"resultUrl": null,
"error": null
… (1 more lines)Sign in to see the details
The parameters, request and response examples and the live Try it panel for this endpoint are for signed-in members. Accounts are free and take a few seconds to create.