Set environment variables
curl --request PUT \
--url https://api.arg.ai/api/sites/{id}/env \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"vars": [
{
"name": "<string>",
"value": "<string>"
}
],
"dotenv": "<string>"
}
'import requests
url = "https://api.arg.ai/api/sites/{id}/env"
payload = {
"vars": [
{
"name": "<string>",
"value": "<string>"
}
],
"dotenv": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({vars: [{name: '<string>', value: '<string>'}], dotenv: '<string>'})
};
fetch('https://api.arg.ai/api/sites/{id}/env', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{}{
"detail": "<string>"
}Sites
Set environment variables
Set variables one by one with vars, or paste a whole .env file as dotenv. kind and scope apply to every entry in the request.
PUT
/
api
/
sites
/
{id}
/
env
Set environment variables
curl --request PUT \
--url https://api.arg.ai/api/sites/{id}/env \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"vars": [
{
"name": "<string>",
"value": "<string>"
}
],
"dotenv": "<string>"
}
'import requests
url = "https://api.arg.ai/api/sites/{id}/env"
payload = {
"vars": [
{
"name": "<string>",
"value": "<string>"
}
],
"dotenv": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({vars: [{name: '<string>', value: '<string>'}], dotenv: '<string>'})
};
fetch('https://api.arg.ai/api/sites/{id}/env', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{}{
"detail": "<string>"
}Authorizations
bearerAuthapiKeyAuth
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json
Variables to set.
Show child attributes
Show child attributes
Raw .env file contents to import.
Whether the values are plain variables or secrets. Defaults to plain.
Available options:
plain, secret When the values apply. Defaults to both.
Available options:
build, runtime, both Response
Successful response
The response is of type object.