Proxy Settings
Section titled “Proxy Settings”The proxy root settings control the global container-wide HTTP/HTTPS proxy kill-switch and the default allow/deny policy applied when no per-domain rule matches. Use these endpoints to read the current settings — including the file version and ETag — and to update them with optimistic-concurrency control.
All requests target the control-plane host https://api.hoody.com and require a container ID in the path. The response always includes an etag (formatted as file:v<N>) that must be echoed back in the If-Match header on subsequent writes.
Get container proxy root settings
Section titled “Get container proxy root settings”GET /api/v1/containers/{id}/proxy/settings
Returns the container’s current proxy root settings along with the current file version and ETag. Use the returned ETag to safely update the settings in a later request.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | Container ID |
This endpoint takes no request body.
curl -X GET "https://api.hoody.com/api/v1/containers/{containerId}/proxy/settings" \ -H "Authorization: Bearer <token>"import { HoodyClient } from 'hoody-sdk';
const client = new HoodyClient({ baseURL: 'https://api.hoody.com', token: process.env.HOODY_TOKEN });
await client.api.proxyDiscovery.getContainerProxySettings(containerId);{ "statusCode": 200, "message": "Proxy settings retrieved successfully", "data": { "enable_proxy": true, "default": "allow", "file_version": 7, "etag": "file:v7" }}Update container proxy root settings
Section titled “Update container proxy root settings”PUT /api/v1/containers/{id}/proxy/settings
Updates one or both of enable_proxy and default. The request must include an If-Match header carrying the current ETag (formatted as file:v<N>). The body must include at least one of the supported fields.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | Container ID |
if-match | header | string | No | file:v<N> ETag precondition |
Request Body
Section titled “Request Body”| Field | Type | Required | Description |
|---|---|---|---|
enable_proxy | boolean | No | Global proxy kill-switch. When false, all proxied traffic is bypassed regardless of rules. |
default | string | No | Default policy applied when no rule matches. One of "allow" or "deny". |
The body must contain at least one of the fields above.
curl -X PUT "https://api.hoody.com/api/v1/containers/{containerId}/proxy/settings" \ -H "Authorization: Bearer <token>" \ -H "Content-Type: application/json" \ -H "If-Match: file:v7" \ -d '{ "enable_proxy": false, "default": "deny" }'import { HoodyClient } from 'hoody-sdk';
const client = new HoodyClient({ baseURL: 'https://api.hoody.com', token: process.env.HOODY_TOKEN });
await client.api.proxyDiscovery.updateContainerProxySettings( containerId, { enable_proxy: false, default: 'deny' }, { 'if-match': 'file:v7' });{ "statusCode": 200, "message": "Proxy settings updated", "data": { "enable_proxy": false, "default": "deny", "file_version": 8, "etag": "file:v8" }}