Skip to content
Hoody.com

: Sources

Manage the package sources that back the Hoody runtime. List configured sources, inspect runtime diagnostics, add or modify sources, remove them, and trigger manual syncs against one or all sources.

List all configured package sources with their type, provider, priority, enabled state, and provider-specific configuration.

This endpoint takes no parameters.

Terminal window
curl https://{projectId}-{containerId}-run-1.{server}.containers.hoody.com/api/v1/run/sources \
-H "Authorization: Bearer $HOODY_TOKEN"

GET /api/v1/run/sources/{source_id}/diagnostics

Section titled “GET /api/v1/run/sources/{source_id}/diagnostics”

Return runtime health and observability data for a single source, including recent search or sync failures, the last measured latency, and a hint about cache freshness.

NameInTypeRequiredDescription
source_idpathstringYesSource identifier
Terminal window
curl https://{projectId}-{containerId}-run-1.{server}.containers.hoody.com/api/v1/run/sources/nixpkgs/diagnostics \
-H "Authorization: Bearer $HOODY_TOKEN"

Add a new package source configuration. The source is appended to the existing list and is immediately available for searches when enabled is true.

The request body follows the run_SourceConfig schema and configures the new source. Fields supplied are persisted as the new source record.

Terminal window
curl -X POST https://{projectId}-{containerId}-run-1.{server}.containers.hoody.com/api/v1/run/sources \
-H "Authorization: Bearer $HOODY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"source_id": "nixpkgs",
"enabled": true,
"priority": 100,
"provider": "nix",
"source_type": "nix-flake",
"config": {
"flake": "nixpkgs"
}
}'

Partially update a source configuration. The request body follows the run_SourceUpdate schema; only the fields supplied are merged, and fields absent from the body keep their stored value. The merged source is re-validated before it is committed, so a patch that would downgrade a signed remote index is refused.

NameInTypeRequiredDescription
source_idpathstringYesSource identifier

The request body follows the run_SourceUpdate schema. All fields are optional. Only the fields present in the body are applied; everything else keeps its stored value.

NameTypeRequiredDescription
enabledbooleanNoWhether this source is active for searches
priorityintegerNoSource priority (higher values are searched first and ranked higher)
pinobjectNoPin to apply. Send null to clear the pin; omit the field to keep the stored one.
configobjectNoProvider-specific configuration. Replaces the stored object as a unit.
Terminal window
curl -X PATCH https://{projectId}-{containerId}-run-1.{server}.containers.hoody.com/api/v1/run/sources/nixpkgs \
-H "Authorization: Bearer $HOODY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"enabled": false,
"priority": 80
}'

Remove a package source by its source_id. The endpoint returns no body on success.

NameInTypeRequiredDescription
source_idpathstringYesSource identifier
Terminal window
curl -X DELETE https://{projectId}-{containerId}-run-1.{server}.containers.hoody.com/api/v1/run/sources/nixpkgs \
-H "Authorization: Bearer $HOODY_TOKEN"

Sync endpoints dispatch background work and return a job handle immediately. Track progress through the jobs endpoint, for example with GET /api/v1/run/jobs/{job_id}?wait=done&timeout_ms=30000.

Trigger a sync operation for every enabled source. Returns immediately with a job handle for tracking progress.

This endpoint takes no parameters.

Terminal window
curl -X POST https://{projectId}-{containerId}-run-1.{server}.containers.hoody.com/api/v1/run/sources/sync \
-H "Authorization: Bearer $HOODY_TOKEN"

Trigger a sync operation for a single source. Returns immediately with a job handle for tracking progress.

NameInTypeRequiredDescription
source_idpathstringYesSource identifier
Terminal window
curl -X POST https://{projectId}-{containerId}-run-1.{server}.containers.hoody.com/api/v1/run/sources/nixpkgs/sync \
-H "Authorization: Bearer $HOODY_TOKEN"