Automation/Api/V1/Automation/Settings
Update Automation Settings
Update automation settings for the authenticated user.
Authorization
AuthorizationRequiredBearer <token>🚀 OAuth2 authentication via secure identity provider
In: header
Scope: openid, email, profile
AuthorizationRequiredBearer <token>🎫 JWT Bearer token from OAuth2 login or direct token
In: header
Authorization<token>🗝️ API key in format: 'Bearer sk-xxxxxx'
In: header
Request Body
application/jsonRequiredis_enabledboolean | null | nullsession_durationinteger | null | nullResponse Body
Successful Response
TypeScript Definitions
Use the response body type in TypeScript.
is_enabledboolean | null | nullsession_durationinteger | null | nulluser_idRequiredUser Idcreated_atRequiredCreated AtFormat:
"date-time"updated_atRequiredUpdated AtFormat:
"date-time"Validation Error
TypeScript Definitions
Use the response body type in TypeScript.
detailDetailcurl -X PUT "https://example.com/api/v1/automation/settings" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"is_enabled": true,
"session_duration": 3600
}'const body = JSON.stringify({
"is_enabled": true,
"session_duration": 3600
})
fetch("https://example.com/api/v1/automation/settings", {
headers: {
"Authorization": "Bearer <token>"
},
body
})package main
import (
"fmt"
"net/http"
"io/ioutil"
"strings"
)
func main() {
url := "https://example.com/api/v1/automation/settings"
body := strings.NewReader(`{
"is_enabled": true,
"session_duration": 3600
}`)
req, _ := http.NewRequest("PUT", url, body)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/api/v1/automation/settings"
body = {
"is_enabled": true,
"session_duration": 3600
}
response = requests.request("PUT", url, json = body, headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
})
print(response.text){
"is_enabled": true,
"session_duration": 3600
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}How is this guide?