Store a secret
curl --request POST \
--url https://api.compute.anonalabs.com/v1/vault/secrets \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "openai_key",
"value": "sk-..."
}
'import requests
url = "https://api.compute.anonalabs.com/v1/vault/secrets"
payload = {
"name": "openai_key",
"value": "sk-..."
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'openai_key', value: 'sk-...'})
};
fetch('https://api.compute.anonalabs.com/v1/vault/secrets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"name": "<string>",
"version": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"bindings": [
{
"id": "<string>",
"secret": "<string>",
"scope": "tenant_default",
"scopeID": "<string>",
"host": "<string>",
"header": "<string>",
"format": "Bearer ${SECRET}",
"createdAt": "2023-11-07T05:31:56Z"
}
]
}{
"code": 123,
"message": "<string>",
"error_code": "<string>"
}{
"code": 123,
"message": "<string>",
"error_code": "<string>"
}{
"code": 123,
"message": "<string>",
"error_code": "<string>"
}{
"code": 123,
"message": "<string>",
"error_code": "<string>"
}Credential vault
Store a secret
Stores a secret, encrypted at rest. Reference it from a network rule as
${vault.<name>}; the egress proxy adds it to requests to that host, and
the sandbox never sees the value. Owners and admins, or unrestricted keys.
POST
/
v1
/
vault
/
secrets
Store a secret
curl --request POST \
--url https://api.compute.anonalabs.com/v1/vault/secrets \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "openai_key",
"value": "sk-..."
}
'import requests
url = "https://api.compute.anonalabs.com/v1/vault/secrets"
payload = {
"name": "openai_key",
"value": "sk-..."
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'openai_key', value: 'sk-...'})
};
fetch('https://api.compute.anonalabs.com/v1/vault/secrets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"name": "<string>",
"version": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"bindings": [
{
"id": "<string>",
"secret": "<string>",
"scope": "tenant_default",
"scopeID": "<string>",
"host": "<string>",
"header": "<string>",
"format": "Bearer ${SECRET}",
"createdAt": "2023-11-07T05:31:56Z"
}
]
}{
"code": 123,
"message": "<string>",
"error_code": "<string>"
}{
"code": 123,
"message": "<string>",
"error_code": "<string>"
}{
"code": 123,
"message": "<string>",
"error_code": "<string>"
}{
"code": 123,
"message": "<string>",
"error_code": "<string>"
}Authorizations
ApiKeyAuthBearerAuth
An Anona Compute API key (e2b_ followed by lowercase hex).
Body
application/json