Skip to content
Hoody.com

The Jobs API queues candidate searches as background jobs and lets you discover, inspect, and cancel them. Use POST /api/v1/run/search/jobs to start an async search and receive a job handle, then poll GET /api/v1/run/jobs/{job_id} to retrieve results, or list recently created jobs with GET /api/v1/run/jobs. Use POST /api/v1/run/jobs/{job_id}/cancel to stop a queued or running search job. The status endpoint supports long-polling with wait=done to block until the job completes or a timeout is reached.

List the async background jobs the service still holds (search jobs for 10 minutes, source syncs for 1 hour after their last status change), newest first. Each entry omits result; read a finished search job’s result with getJobStatus.

NameInTypeRequiredDescription
kindquerystringNoOnly jobs of this kind. One of search-resolve, source-sync
statusquerystringNoOnly jobs in this status. One of queued, running, done, error, cancelled
Terminal window
curl -X GET "https://{projectId}-{containerId}-run-1.{server}.containers.hoody.com/api/v1/run/jobs?kind=search-resolve&status=running" \
-H "Authorization: Bearer <token>"

Live jobs, newest first, without results.

[
{
"job_id": "550e8400-e29b-41d4-a716-446655440000",
"kind": "search-resolve",
"status": "running",
"created_at": "2025-01-15T10:30:00Z",
"updated_at": "2025-01-15T10:30:02Z"
},
{
"job_id": "660e8400-e29b-41d4-a716-446655440001",
"kind": "source-sync",
"status": "queued",
"created_at": "2025-01-15T10:29:50Z",
"updated_at": "2025-01-15T10:29:50Z"
}
]

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

This endpoint takes no parameters.

The request body is a Selector object. Only app is required; all other fields are optional filters and output controls.

NameTypeRequiredDescription
appstringYesPrimary name query (aliases q, name)
osstringNoTarget app runtime OS. One of linux, windows, any
kindstringNoApp kind. One of gui, cli, any
sourcearray of stringNoSource kind filter (repeatable). Empty means no filter (default [])
archstringNoCPU architecture. One of amd64, arm64, any
tagsarray of stringNoFree-form selector tags (default []). Accepted and passed through to sources and recipe templates; they do not filter or rank candidates
profilestringNoNamed profile for default preferences
channelstringNoRelease channel hint (e.g. stable, beta, nightly)
versionstringNoExact version or constraint (provider-defined)
variantstringNoProvider-defined variant (e.g. portable, headless)
publisherstringNoPublisher hint for curated registries
repostringNoRepository hint (e.g. owner/name for GitHub sources)
releasestringNoRelease hint (e.g. tag for release-based sources)
assetstringNoDesired asset name or pattern
pickstringNoSelection mode. One of ask, first, index, id
pick_indexintegerNoCandidate index (required when pick=index)
candidate_idstringNoSpecific candidate ID (required when pick=id)
set_idstringNoBind pick to a specific candidate set to avoid races
terminal_idintegerNoTerminal session ID for execution (default 1)
displaystringNoX11 DISPLAY number (defaults to terminal_id)
originstringNoOrigin identifier for observability propagation
formatstringNoOutput format override. One of json, html. Takes precedence over Accept header
dry_runbooleanNoForce command-only output. hoody-run never executes, so this is always in effect
print_curlstringNoCurl command generation mode. Currently only hoody-run
limitintegerNoMaximum candidates to return (default 25)
Terminal window
curl -X POST "https://{projectId}-{containerId}-run-1.{server}.containers.hoody.com/api/v1/run/search/jobs" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"app": "firefox",
"os": "linux",
"kind": "gui"
}'

Search job accepted. The response includes a job_id that can be polled through the jobs endpoint.

{
"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"
}

Retrieve 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 -X GET "https://{projectId}-{containerId}-run-1.{server}.containers.hoody.com/api/v1/run/jobs/550e8400-e29b-41d4-a716-446655440000?wait=done&timeout_ms=30000" \
-H "Authorization: Bearer <token>"

Job status retrieved successfully.

{
"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"
}

Stop a queued or running search job. The background search is aborted (provider lookups stop and any provider child process is killed) and the job moves to status cancelled, which is final. Source-sync jobs cannot be cancelled.

NameInTypeRequiredDescription
job_idpathstringYesJob identifier (UUID)
Terminal window
curl -X POST "https://{projectId}-{containerId}-run-1.{server}.containers.hoody.com/api/v1/run/jobs/550e8400-e29b-41d4-a716-446655440000/cancel" \
-H "Authorization: Bearer <token>"

The job has been stopped and moved to status cancelled.

{
"job_id": "550e8400-e29b-41d4-a716-446655440000",
"kind": "search-resolve",
"status": "cancelled",
"created_at": "2025-01-15T10:30:00Z",
"updated_at": "2025-01-15T10:30:02Z"
}