Skip to content
Hoody.com

The Sources API manages the package sources that Hoody Run uses to resolve and search packages. Use these endpoints to list configured sources, add new entries, partially update or delete existing ones, trigger sync jobs for one source or all sources, and read runtime health diagnostics for troubleshooting.

All endpoints run against the Run service inside your container. Substitute {projectId}, {containerId}, and {server} in the base URL with your actual identifiers, and authenticate by sending a Bearer token in the Authorization header.

Returns every configured package source, including its provider, type, 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 <token>"

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

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

Returns runtime health and observability data for a single source, including recent search and sync timing, the most recent error, and provider-specific details.

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 <token>"

Adds a new package source. The source is appended to the existing list and is immediately available for searches if enabled is true.

This endpoint takes no parameters.

Send a SourceConfig object as JSON. The required fields are source_id, enabled, priority, provider, and source_type.

{
"source_id": "nixpkgs-unstable",
"enabled": true,
"priority": 80,
"provider": "nix",
"source_type": "nix-flake",
"pin": {
"url": "https://github.com/NixOS/nixpkgs/archive/nixpkgs-unstable.tar.gz"
},
"config": {
"flake": "nixpkgs-unstable"
}
}
Terminal window
curl -X POST https://{projectId}-{containerId}-run-1.{server}.containers.hoody.com/api/v1/run/sources \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"source_id": "nixpkgs-unstable",
"enabled": true,
"priority": 80,
"provider": "nix",
"source_type": "nix-flake",
"config": {
"flake": "nixpkgs-unstable"
}
}'

Partially updates a source configuration. Supports merging enabled, priority, pin, and config fields without touching other settings.

NameInTypeRequiredDescription
source_idpathstringYesSource identifier

Send any subset of SourceConfig fields you want to update. The body is a free-form object; only fields you supply are merged into the existing configuration.

{
"enabled": false,
"priority": 120
}
Terminal window
curl -X PATCH https://{projectId}-{containerId}-run-1.{server}.containers.hoody.com/api/v1/run/sources/nixpkgs \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"enabled": false,
"priority": 120
}'

Removes a package source by its ID. Returns 204 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 <token>"

Triggers a sync operation for the specified source. Returns immediately with a job handle; poll the Jobs API to track progress and completion.

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 <token>"

Triggers a sync operation for every enabled source. Returns immediately with a job handle. Poll for completion with GET /api/v1/run/jobs/{job_id}?wait=done&timeout_ms=30000.

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 <token>"