Proxy Settings
Section titled “Proxy Settings”Container-wide proxy root settings control the proxy kill-switch (enable_proxy) and the default allow/deny policy applied to requests that have no explicit rule. These endpoints read and update the root record for a given container and use an ETag / If-Match header pair to support optimistic-concurrency updates.
GET /api/v1/containers/{id}/proxy/settings
Section titled “GET /api/v1/containers/{id}/proxy/settings”Returns the container’s current proxy root settings along with the current etag and file_version. Pass the returned etag back as the If-Match header on subsequent PATCH calls to avoid overwriting concurrent changes.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | Container ID |
curl -X GET https://api.hoody.com/api/v1/containers/container_abc123/proxy/settings \ -H "Authorization: Bearer YOUR_API_TOKEN"const settings = await client.api.proxyDiscovery.getContainerProxySettings({ id: "container_abc123"});{ "statusCode": 200, "message": "Proxy settings retrieved successfully", "data": { "enable_proxy": true, "default": "allow", "file_version": 2, "etag": "file:v2" }}PATCH /api/v1/containers/{id}/proxy/settings
Section titled “PATCH /api/v1/containers/{id}/proxy/settings”Updates one or both of enable_proxy and default. The request must include the If-Match header with the etag value returned by the most recent GET (formatted as file:v). At least one body field must be provided.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | Container ID |
if-match | header | string | No | Optimistic-concurrency precondition; pass the value file:v where N is the current file version |
Request Body
Section titled “Request Body”| Field | Type | Required | Description |
|---|---|---|---|
enable_proxy | boolean | No | Global kill-switch for the container’s proxy |
default | string | No | Default policy when no explicit rule matches. Allowed values: "allow", "deny" |
curl -X PATCH https://api.hoody.com/api/v1/containers/container_abc123/proxy/settings \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: application/json" \ -H "If-Match: file:v2" \ -d '{ "enable_proxy": true, "default": "deny" }'const updated = await client.api.proxyDiscovery.updateContainerProxySettings({ id: "container_abc123", "if-match": "file:v2", data: { enable_proxy: true, default: "deny" }});{ "statusCode": 200, "message": "Proxy settings updated successfully", "data": { "enable_proxy": true, "default": "deny", "file_version": 3, "etag": "file:v3" }}