Skip to content
Hoody.com

The Dependency Management API lets you inspect which npm modules ship with the container runtime, verify whether the modules referenced by a script are already installed, and install new ones on demand. Use these endpoints when a script needs packages that are not pre-bundled, or when you want to confirm ahead of time that a workload will resolve every import.

All requests target the execution service running inside the container. The hostname follows the pattern {projectId}-{containerId}-exec-1.{server}.containers.hoody.com.

Returns the npm modules that are pre-installed in the container image, along with a flag indicating whether every bundled module is currently available.

This endpoint takes no parameters.

Terminal window
curl -X GET "https://{projectId}-{containerId}-exec-1.{server}.containers.hoody.com/api/v1/exec/dependencies/bundled" \
-H "Authorization: Bearer $HOODY_TOKEN"

Checks whether the modules referenced by a script are installed. You can submit the source code directly or supply a comma-separated list of module names. The response lists the modules that are installed, the ones that are missing, and either a summary message or per-module detail entries.

This endpoint takes no query, path, or header parameters.

NameTypeRequiredDescription
codestringNoSource code to inspect for module references.
modulesstringNoComma-separated list of module names to check.
Terminal window
curl -X POST "https://{projectId}-{containerId}-exec-1.{server}.containers.hoody.com/api/v1/exec/dependencies/check" \
-H "Authorization: Bearer $HOODY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"code": "import axios from \"axios\";\nimport _ from \"lodash\";\nexport default { axios, _ };",
"modules": "axios,lodash,dayjs"
}'

Installs one or more npm modules inside the container. Submit a single module spec or an array of specs; the runtime installs them in sequence. By default, modules that are already present are reported as already-installed — set force to true to reinstall them.

This endpoint takes no query, path, or header parameters.

NameTypeRequiredDefaultDescription
modulesstring | arrayYesOne npm module spec (e.g. "lodash", "axios@1.2.3") or an array of specs. Array form installs every module in sequence.
forcebooleanNofalseWhen true, reinstall modules that are already present instead of reporting them as already-installed.
Terminal window
curl -X POST "https://{projectId}-{containerId}-exec-1.{server}.containers.hoody.com/api/v1/exec/dependencies/install" \
-H "Authorization: Bearer $HOODY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"modules": ["dayjs@1.11.10", "pino@8.17.2"],
"force": false
}'