List recent jobs
const url = 'https://api.surveycoder.io/v2/jobs?status=queued&limit=20';const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.surveycoder.io/v2/jobs?status=queued&limit=20' \ --header 'x-api-key: <x-api-key>'List async jobs for your organization, sorted by creation time (newest first). Optionally filter by status.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ”Filter jobs by status.
Maximum number of jobs to return (1-100).
Responses
Section titled “ Responses ”List of jobs
object
Jobs for this organization.
Abbreviated job info for list views (no result payload).
object
Unique job identifier.
Kind of background work.
Current job status.
Progress counters for the job.
object
Number of items processed so far.
Total number of items to process.
Completion percentage (0-100).
ISO 8601 timestamp when the job was created.
ISO 8601 timestamp of the last status update.
object
Number of jobs returned.
Example
{ "success": true, "data": [ { "type": "codebook_generation", "status": "queued", "progress": { "processed": 120, "total": 500, "percentage": 24 } } ], "meta": { "api_version": "v1" }}Missing or invalid API key.
Standard error envelope.
object
object
Machine-readable error code. See the error reference for the full list.
Human-readable explanation of what went wrong.
Echo of the X-Request-Id header, when provided.
Link to documentation for this specific error code.
Example
{ "success": false, "error": { "code": "UNAUTHORIZED", "message": "x-api-key header is required", "doc_url": "https://docs.surveycoder.io/errors/unauthorized" }}