Skip to content

The Jobs endpoints let you queue candidate searches as async background jobs and poll their status. Use these when a search may take longer than a synchronous request allows. After starting a job, poll its status — or long-poll with wait=done to block until completion.


POST /api/v1/run/search/jobs

Queues a candidate search in the background and returns a job handle that can be polled through the jobs endpoint.

Terminal window
curl -X POST "https://api.hoody.com/api/v1/run/search/jobs" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"app": "firefox",
"os": "linux",
"kind": "gui"
}'

This endpoint takes no parameters.

The request body is a JSON object conforming to the app_Selector schema. The only required field is app (the primary name query). All other fields are optional and control filtering, execution context, and output format.

{
"app": "firefox",
"os": "linux",
"kind": "gui"
}
{
"job_id": "550e8400-e29b-41d4-a716-446655440000",
"kind": "search-resolve",
"status": "queued",
"created_at": "2025-01-15T10:30:00Z",
"updated_at": "2025-01-15T10:30:00Z"
}

GET /api/v1/run/jobs/{job_id}

Retrieves the current status of an async background job. Supports long-polling with wait=done to block until the job completes or a timeout is reached.

NameInTypeRequiredDescription
job_idpathstringYesJob identifier (UUID)
waitquerystringNoSet to 'done' to long-poll until job completes
timeout_msqueryintegerNoLong-poll timeout in milliseconds (default 0, max 120000)
Terminal window
curl "https://api.hoody.com/api/v1/run/jobs/550e8400-e29b-41d4-a716-446655440000?wait=done&timeout_ms=30000" \
-H "Authorization: Bearer <token>"

This endpoint accepts no request body.

{
"job_id": "550e8400-e29b-41d4-a716-446655440000",
"kind": "search-resolve",
"status": "done",
"created_at": "2025-01-15T10:30:00Z",
"updated_at": "2025-01-15T10:30:05Z",
"result_type": "search-response",
"result": {
"candidates": []
}
}

The app_Job object returned on 200 and 202 responses contains the following fields:

FieldTypeRequiredDescription
job_idstring (UUID)YesUnique job identifier
kindenumYesJob type: source-sync, search-resolve
statusenumYesCurrent status: queued, running, done, error
created_atstring (date-time)YesISO 8601 timestamp when the job was created
updated_atstring (date-time)YesISO 8601 timestamp of the last status change
errorstringNoError message (present when status is error)
result_typeenumNoType of inline job result payload: search-response
resultobjectNoInline job result payload when available
progressobjectNoOptional progress metadata for long-running jobs