Narrow where a secret goes, without its value.
Sets the secret's hosts and/or rules to ones that let the value go nowhere new: every host one of its hosts names (a.example.com or *.a.example.com under *.example.com), and every method and path a rule allows one its rules allow now (a secret without rules allows every request, so any rules narrow it). Either left out stays as it is. Anything wider is refused (400, invalid_request): a new place could learn the value, so widening needs the value (PUT /v1/egress-secrets/{name}). Recorded in the audit log as an update with narrowed. Takes effect on new connections within seconds.
Request
- Base URL: https://api.withruntime.com
- URL: https://api.withruntime.com/v1/egress-secrets/{name}/rules
- Auth: HTTP bearer
Path parameters
The environment variable the placeholder is in, inside every sandbox of the organization. Upper case letters, digits and underscores.
Headers
Replaying the same key with the same request within 24 hours returns the first result and never repeats the effect. A refusal is not kept: a request refused before it ran (no_capacity, busy, a limit) runs afresh when sent again with its key. The SDKs send one automatically; the server makes one when absent and returns it in the idempotency-key response header.
Request body
Example request
{
"hosts": [
"api.openai.com"
],
"rules": [
{
"methods": [
"GET",
"HEAD"
],
"paths": [
"/v1/chat/completions"
]
}
]
}Response
Success
Example response
{
"rules": [
{
"methods": [
"GET",
"HEAD"
],
"paths": [
"/v1/chat/completions"
]
}
],
"only": {
"labels": [
{
"role": "hub"
}
]
}
}Changes
No recorded changes to this operation across all 1 revision of this API.