Configuration
Update environment config
Update environment variables in the daemon’s configuration.
PUT
/
api
/
config
/
env
cURL
curl -X PUT http://localhost:18080/api/config/env \
-H 'Content-Type: application/json' \
-d '{"envVars": {"ANTHROPIC_API_KEY": "sk-ant-..."}}'const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({envVars: {}})
};
fetch('http://localhost:18080/api/config/env', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "http://localhost:18080/api/config/env"
payload = { "envVars": {} }
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:18080/api/config/env"
payload := strings.NewReader("{\n \"envVars\": {}\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"success": true
}⌘I
cURL
curl -X PUT http://localhost:18080/api/config/env \
-H 'Content-Type: application/json' \
-d '{"envVars": {"ANTHROPIC_API_KEY": "sk-ant-..."}}'const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({envVars: {}})
};
fetch('http://localhost:18080/api/config/env', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "http://localhost:18080/api/config/env"
payload = { "envVars": {} }
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:18080/api/config/env"
payload := strings.NewReader("{\n \"envVars\": {}\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"success": true
}
