palbaseDocs

Palbase ai · API

POST/ai/env/{key}/hosts

Allow a secret a host

The owner's Allow, for one of the project's variables: the host is added to a sealed secret's hosts (32 at most), and the asks it now allows are marked allowed. A sealed secret sent to it from the proxy's next renewal carries the value. Allow only a host you know the secret belongs to: an agent can be led to send a secret anywhere. A person's alone: an owner or an admin of the organization signed in, never a key or a token, the secret key included (403 person_required; an environment's token, token_out_of_scope).

Called by your server, with the project's secret key.

Path

keystring · requiredThe variable's name: upper-case letters, digits and _, starting with a letter, at most 128; not PALBASE_AI_….

Request body

hoststring · requiredAn exact DNS name or *. and one, as hosts takes them.
curl
curl -X POST "https://<your-ref>.palbase.studio/ai/env/<key>/hosts" \
  -H "apikey: $PALBASE_SECRET_KEY" \
  -H "content-type: application/json" \
  -d '{"host":"string"}'

Responses

200The variable, without its value

400The request is malformed, or names what this module does not offer (the error names which)

401No valid credential

403A publishable key or a user's session: everything here is the project's server's, called with the secret key

404No such response, job or provider in this project

409The response's state refuses it

defaultAn error: the envelope names it (`error`) and explains it (`error_description`).

Operation AllowEnvHost of ai's contract.