Dependency Management
Section titled “Dependency Management”Inspect, verify, and install the npm modules that an exec script depends on. Use these endpoints before running untrusted or user-supplied scripts to confirm which packages are already available, which are missing, and to install any that are required. All endpoints are scoped to a single container’s exec service.
GET /api/v1/exec/dependencies/bundled
Section titled “GET /api/v1/exec/dependencies/bundled”Return the catalog of modules that ship pre-installed with the exec environment. Use this to determine whether a dependency is available out of the box without performing any installation.
curl -X GET "https://proj1-cnt1-exec-1.eu-west-1.containers.hoody.icu/api/v1/exec/dependencies/bundled" \ -H "Authorization: Bearer <token>"await client.exec.dependencies.listBundled();{ "total": 42, "packages": [ "axios@1.6.2", "lodash@4.17.21", "uuid@9.0.1", "dayjs@1.11.10" ], "allAvailable": true}{ "error": "VALIDATION_ERROR", "code": "VALIDATION_ERROR", "timestamp": "2026-01-15T10:30:00.000Z", "details": { "field": "request", "reason": "Malformed request envelope" }}| Error Code | Title | Description | Resolution |
|---|---|---|---|
VALIDATION_ERROR | Invalid input | Request parameters failed validation | Check parameter format and requirements |
{ "error": "Unable to read bundled manifest", "code": "ERROR_500", "timestamp": "2026-01-15T10:30:00.000Z", "details": { "manifest": "/opt/exec/manifest.json" }}POST /api/v1/exec/dependencies/check
Section titled “POST /api/v1/exec/dependencies/check”Inspect a piece of source code (or an explicit module list) and report which referenced modules are already installed and which are missing. No modules are installed; the response is informational only.
Request Body
Section titled “Request Body”| Name | Type | Required | Description |
|---|---|---|---|
code | string | No | Source code to scan for require / import references |
modules | string | No | A single module spec (e.g. lodash) to check explicitly |
Both fields are optional. Send one or both depending on whether you are scanning code or auditing a known list.
curl -X POST "https://proj1-cnt1-exec-1.eu-west-1.containers.hoody.icu/api/v1/exec/dependencies/check" \ -H "Authorization: Bearer <token>" \ -H "Content-Type: application/json" \ -d '{ "code": "const axios = require(\"axios\"); const _ = require(\"lodash\");", "modules": "dayjs@1.11.10" }'await client.exec.dependencies.check({ code: "const axios = require(\"axios\"); const _ = require(\"lodash\");", modules: "dayjs@1.11.10"});{ "total": 3, "installed": ["axios@1.6.2", "lodash@4.17.21"], "missing": ["dayjs@1.11.10"], "message": "2 modules installed, 1 missing"}The 200 response follows one of two shapes. When code is supplied, the response includes a message summary. When modules is supplied (and code is not), the response includes a details array with per-module status:
{ "total": 1, "installed": [], "missing": ["dayjs@1.11.10"], "details": [ { "module": "dayjs@1.11.10", "status": "missing" } ]}{ "error": "VALIDATION_ERROR", "code": "VALIDATION_ERROR", "timestamp": "2026-01-15T10:30:00.000Z", "details": { "field": "modules", "reason": "Must be a non-empty string or array of strings" }}| Error Code | Title | Description | Resolution |
|---|---|---|---|
VALIDATION_ERROR | Invalid input | Request parameters failed validation | Check parameter format and requirements |
{ "error": "Failed to resolve modules", "code": "ERROR_500", "timestamp": "2026-01-15T10:30:00.000Z", "details": { "cause": "module-resolution-timeout" }}POST /api/v1/exec/dependencies/install
Section titled “POST /api/v1/exec/dependencies/install”Install one or more npm modules into the exec environment. Returns counts of installed and failed modules along with per-module detail entries.
Request Body
Section titled “Request Body”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
modules | string | array | Yes | — | One npm module spec (e.g. lodash, axios@1.2.3) or an array of specs. Array form installs every module in sequence |
force | boolean | No | false | When true, reinstall modules that are already present instead of reporting them as already-installed |
curl -X POST "https://proj1-cnt1-exec-1.eu-west-1.containers.hoody.icu/api/v1/exec/dependencies/install" \ -H "Authorization: Bearer <token>" \ -H "Content-Type: application/json" \ -d '{ "modules": ["lodash@4.17.21", "dayjs@1.11.10", "axios@1.6.2"], "force": false }'await client.exec.dependencies.install({ modules: ["lodash@4.17.21", "dayjs@1.11.10", "axios@1.6.2"], force: false});{ "total": 3, "installed": 2, "failed": 1, "installedModules": ["lodash@4.17.21", "axios@1.6.2"], "failedModules": ["dayjs@1.11.10"], "details": [ { "module": "lodash@4.17.21", "status": "installed", "version": "4.17.21", "durationMs": 1240 }, { "module": "dayjs@1.11.10", "status": "failed", "error": "404 Not Found" }, { "module": "axios@1.6.2", "status": "installed", "version": "1.6.2", "durationMs": 2105 } ]}{ "error": "VALIDATION_ERROR", "code": "VALIDATION_ERROR", "timestamp": "2026-01-15T10:30:00.000Z", "details": { "field": "modules", "reason": "Field is required and must be a non-empty string or array of strings" }}| Error Code | Title | Description | Resolution |
|---|---|---|---|
VALIDATION_ERROR | Invalid input | Request parameters failed validation | Check parameter format and requirements |
{ "error": "Failed to install modules", "code": "ERROR_500", "timestamp": "2026-01-15T10:30:00.000Z", "details": { "cause": "npm-registry-unreachable" }}