Update Eval Config
curl --request PUT \
--url https://api.lightsage.com/v1/api-performance/config \
--header 'Content-Type: application/json' \
--header 'X-Lightsage-Api-Key: <api-key>' \
--data '
{
"models": [
"<string>"
],
"targets": [
{
"execution_platform": "<string>",
"model_id": "<string>",
"id": "<string>",
"source_id": "<string>",
"frequency": "daily",
"enabled": true,
"next_run_at": "<string>",
"last_run_at": "<string>",
"last_skipped_at": "<string>",
"skip_reason": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
}
],
"operation_ids": [
"<string>"
],
"custom_eval_ids": [
"<string>"
],
"env_vars": {},
"env_profiles": [
{
"id": "<string>",
"name": "<string>",
"env_vars": {}
}
],
"default_env_profile_id": "<string>",
"source_id": "<string>",
"api_base_url": "<string>"
}
'import requests
url = "https://api.lightsage.com/v1/api-performance/config"
payload = {
"models": ["<string>"],
"targets": [
{
"execution_platform": "<string>",
"model_id": "<string>",
"id": "<string>",
"source_id": "<string>",
"frequency": "daily",
"enabled": True,
"next_run_at": "<string>",
"last_run_at": "<string>",
"last_skipped_at": "<string>",
"skip_reason": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
}
],
"operation_ids": ["<string>"],
"custom_eval_ids": ["<string>"],
"env_vars": {},
"env_profiles": [
{
"id": "<string>",
"name": "<string>",
"env_vars": {}
}
],
"default_env_profile_id": "<string>",
"source_id": "<string>",
"api_base_url": "<string>"
}
headers = {
"X-Lightsage-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-Lightsage-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
models: ['<string>'],
targets: [
{
execution_platform: '<string>',
model_id: '<string>',
id: '<string>',
source_id: '<string>',
frequency: 'daily',
enabled: true,
next_run_at: '<string>',
last_run_at: '<string>',
last_skipped_at: '<string>',
skip_reason: '<string>',
created_at: '<string>',
updated_at: '<string>'
}
],
operation_ids: ['<string>'],
custom_eval_ids: ['<string>'],
env_vars: {},
env_profiles: [{id: '<string>', name: '<string>', env_vars: {}}],
default_env_profile_id: '<string>',
source_id: '<string>',
api_base_url: '<string>'
})
};
fetch('https://api.lightsage.com/v1/api-performance/config', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lightsage.com/v1/api-performance/config",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'models' => [
'<string>'
],
'targets' => [
[
'execution_platform' => '<string>',
'model_id' => '<string>',
'id' => '<string>',
'source_id' => '<string>',
'frequency' => 'daily',
'enabled' => true,
'next_run_at' => '<string>',
'last_run_at' => '<string>',
'last_skipped_at' => '<string>',
'skip_reason' => '<string>',
'created_at' => '<string>',
'updated_at' => '<string>'
]
],
'operation_ids' => [
'<string>'
],
'custom_eval_ids' => [
'<string>'
],
'env_vars' => [
],
'env_profiles' => [
[
'id' => '<string>',
'name' => '<string>',
'env_vars' => [
]
]
],
'default_env_profile_id' => '<string>',
'source_id' => '<string>',
'api_base_url' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Lightsage-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.lightsage.com/v1/api-performance/config"
payload := strings.NewReader("{\n \"models\": [\n \"<string>\"\n ],\n \"targets\": [\n {\n \"execution_platform\": \"<string>\",\n \"model_id\": \"<string>\",\n \"id\": \"<string>\",\n \"source_id\": \"<string>\",\n \"frequency\": \"daily\",\n \"enabled\": true,\n \"next_run_at\": \"<string>\",\n \"last_run_at\": \"<string>\",\n \"last_skipped_at\": \"<string>\",\n \"skip_reason\": \"<string>\",\n \"created_at\": \"<string>\",\n \"updated_at\": \"<string>\"\n }\n ],\n \"operation_ids\": [\n \"<string>\"\n ],\n \"custom_eval_ids\": [\n \"<string>\"\n ],\n \"env_vars\": {},\n \"env_profiles\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"env_vars\": {}\n }\n ],\n \"default_env_profile_id\": \"<string>\",\n \"source_id\": \"<string>\",\n \"api_base_url\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-Lightsage-Api-Key", "<api-key>")
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))
}HttpResponse<String> response = Unirest.put("https://api.lightsage.com/v1/api-performance/config")
.header("X-Lightsage-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"models\": [\n \"<string>\"\n ],\n \"targets\": [\n {\n \"execution_platform\": \"<string>\",\n \"model_id\": \"<string>\",\n \"id\": \"<string>\",\n \"source_id\": \"<string>\",\n \"frequency\": \"daily\",\n \"enabled\": true,\n \"next_run_at\": \"<string>\",\n \"last_run_at\": \"<string>\",\n \"last_skipped_at\": \"<string>\",\n \"skip_reason\": \"<string>\",\n \"created_at\": \"<string>\",\n \"updated_at\": \"<string>\"\n }\n ],\n \"operation_ids\": [\n \"<string>\"\n ],\n \"custom_eval_ids\": [\n \"<string>\"\n ],\n \"env_vars\": {},\n \"env_profiles\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"env_vars\": {}\n }\n ],\n \"default_env_profile_id\": \"<string>\",\n \"source_id\": \"<string>\",\n \"api_base_url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lightsage.com/v1/api-performance/config")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Lightsage-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"models\": [\n \"<string>\"\n ],\n \"targets\": [\n {\n \"execution_platform\": \"<string>\",\n \"model_id\": \"<string>\",\n \"id\": \"<string>\",\n \"source_id\": \"<string>\",\n \"frequency\": \"daily\",\n \"enabled\": true,\n \"next_run_at\": \"<string>\",\n \"last_run_at\": \"<string>\",\n \"last_skipped_at\": \"<string>\",\n \"skip_reason\": \"<string>\",\n \"created_at\": \"<string>\",\n \"updated_at\": \"<string>\"\n }\n ],\n \"operation_ids\": [\n \"<string>\"\n ],\n \"custom_eval_ids\": [\n \"<string>\"\n ],\n \"env_vars\": {},\n \"env_profiles\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"env_vars\": {}\n }\n ],\n \"default_env_profile_id\": \"<string>\",\n \"source_id\": \"<string>\",\n \"api_base_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"models": [
"<string>"
],
"operation_ids": [
"<string>"
],
"targets": [
{
"execution_platform": "<string>",
"model_id": "<string>",
"id": "<string>",
"source_id": "<string>",
"frequency": "daily",
"enabled": true,
"next_run_at": "<string>",
"last_run_at": "<string>",
"last_skipped_at": "<string>",
"skip_reason": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
}
],
"custom_eval_ids": [
"<string>"
],
"env_var_keys": [
"<string>"
],
"env_profiles": [
{
"id": "<string>",
"name": "<string>",
"env_var_keys": [
"<string>"
]
}
],
"default_env_profile_id": "<string>",
"source_id": "<string>",
"api_base_url": "<string>",
"can_configure_per_model_schedules": false
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}API Performance
Update Eval Config
PUT
/
v1
/
api-performance
/
config
Update Eval Config
curl --request PUT \
--url https://api.lightsage.com/v1/api-performance/config \
--header 'Content-Type: application/json' \
--header 'X-Lightsage-Api-Key: <api-key>' \
--data '
{
"models": [
"<string>"
],
"targets": [
{
"execution_platform": "<string>",
"model_id": "<string>",
"id": "<string>",
"source_id": "<string>",
"frequency": "daily",
"enabled": true,
"next_run_at": "<string>",
"last_run_at": "<string>",
"last_skipped_at": "<string>",
"skip_reason": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
}
],
"operation_ids": [
"<string>"
],
"custom_eval_ids": [
"<string>"
],
"env_vars": {},
"env_profiles": [
{
"id": "<string>",
"name": "<string>",
"env_vars": {}
}
],
"default_env_profile_id": "<string>",
"source_id": "<string>",
"api_base_url": "<string>"
}
'import requests
url = "https://api.lightsage.com/v1/api-performance/config"
payload = {
"models": ["<string>"],
"targets": [
{
"execution_platform": "<string>",
"model_id": "<string>",
"id": "<string>",
"source_id": "<string>",
"frequency": "daily",
"enabled": True,
"next_run_at": "<string>",
"last_run_at": "<string>",
"last_skipped_at": "<string>",
"skip_reason": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
}
],
"operation_ids": ["<string>"],
"custom_eval_ids": ["<string>"],
"env_vars": {},
"env_profiles": [
{
"id": "<string>",
"name": "<string>",
"env_vars": {}
}
],
"default_env_profile_id": "<string>",
"source_id": "<string>",
"api_base_url": "<string>"
}
headers = {
"X-Lightsage-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-Lightsage-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
models: ['<string>'],
targets: [
{
execution_platform: '<string>',
model_id: '<string>',
id: '<string>',
source_id: '<string>',
frequency: 'daily',
enabled: true,
next_run_at: '<string>',
last_run_at: '<string>',
last_skipped_at: '<string>',
skip_reason: '<string>',
created_at: '<string>',
updated_at: '<string>'
}
],
operation_ids: ['<string>'],
custom_eval_ids: ['<string>'],
env_vars: {},
env_profiles: [{id: '<string>', name: '<string>', env_vars: {}}],
default_env_profile_id: '<string>',
source_id: '<string>',
api_base_url: '<string>'
})
};
fetch('https://api.lightsage.com/v1/api-performance/config', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lightsage.com/v1/api-performance/config",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'models' => [
'<string>'
],
'targets' => [
[
'execution_platform' => '<string>',
'model_id' => '<string>',
'id' => '<string>',
'source_id' => '<string>',
'frequency' => 'daily',
'enabled' => true,
'next_run_at' => '<string>',
'last_run_at' => '<string>',
'last_skipped_at' => '<string>',
'skip_reason' => '<string>',
'created_at' => '<string>',
'updated_at' => '<string>'
]
],
'operation_ids' => [
'<string>'
],
'custom_eval_ids' => [
'<string>'
],
'env_vars' => [
],
'env_profiles' => [
[
'id' => '<string>',
'name' => '<string>',
'env_vars' => [
]
]
],
'default_env_profile_id' => '<string>',
'source_id' => '<string>',
'api_base_url' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Lightsage-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.lightsage.com/v1/api-performance/config"
payload := strings.NewReader("{\n \"models\": [\n \"<string>\"\n ],\n \"targets\": [\n {\n \"execution_platform\": \"<string>\",\n \"model_id\": \"<string>\",\n \"id\": \"<string>\",\n \"source_id\": \"<string>\",\n \"frequency\": \"daily\",\n \"enabled\": true,\n \"next_run_at\": \"<string>\",\n \"last_run_at\": \"<string>\",\n \"last_skipped_at\": \"<string>\",\n \"skip_reason\": \"<string>\",\n \"created_at\": \"<string>\",\n \"updated_at\": \"<string>\"\n }\n ],\n \"operation_ids\": [\n \"<string>\"\n ],\n \"custom_eval_ids\": [\n \"<string>\"\n ],\n \"env_vars\": {},\n \"env_profiles\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"env_vars\": {}\n }\n ],\n \"default_env_profile_id\": \"<string>\",\n \"source_id\": \"<string>\",\n \"api_base_url\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-Lightsage-Api-Key", "<api-key>")
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))
}HttpResponse<String> response = Unirest.put("https://api.lightsage.com/v1/api-performance/config")
.header("X-Lightsage-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"models\": [\n \"<string>\"\n ],\n \"targets\": [\n {\n \"execution_platform\": \"<string>\",\n \"model_id\": \"<string>\",\n \"id\": \"<string>\",\n \"source_id\": \"<string>\",\n \"frequency\": \"daily\",\n \"enabled\": true,\n \"next_run_at\": \"<string>\",\n \"last_run_at\": \"<string>\",\n \"last_skipped_at\": \"<string>\",\n \"skip_reason\": \"<string>\",\n \"created_at\": \"<string>\",\n \"updated_at\": \"<string>\"\n }\n ],\n \"operation_ids\": [\n \"<string>\"\n ],\n \"custom_eval_ids\": [\n \"<string>\"\n ],\n \"env_vars\": {},\n \"env_profiles\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"env_vars\": {}\n }\n ],\n \"default_env_profile_id\": \"<string>\",\n \"source_id\": \"<string>\",\n \"api_base_url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lightsage.com/v1/api-performance/config")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Lightsage-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"models\": [\n \"<string>\"\n ],\n \"targets\": [\n {\n \"execution_platform\": \"<string>\",\n \"model_id\": \"<string>\",\n \"id\": \"<string>\",\n \"source_id\": \"<string>\",\n \"frequency\": \"daily\",\n \"enabled\": true,\n \"next_run_at\": \"<string>\",\n \"last_run_at\": \"<string>\",\n \"last_skipped_at\": \"<string>\",\n \"skip_reason\": \"<string>\",\n \"created_at\": \"<string>\",\n \"updated_at\": \"<string>\"\n }\n ],\n \"operation_ids\": [\n \"<string>\"\n ],\n \"custom_eval_ids\": [\n \"<string>\"\n ],\n \"env_vars\": {},\n \"env_profiles\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"env_vars\": {}\n }\n ],\n \"default_env_profile_id\": \"<string>\",\n \"source_id\": \"<string>\",\n \"api_base_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"models": [
"<string>"
],
"operation_ids": [
"<string>"
],
"targets": [
{
"execution_platform": "<string>",
"model_id": "<string>",
"id": "<string>",
"source_id": "<string>",
"frequency": "daily",
"enabled": true,
"next_run_at": "<string>",
"last_run_at": "<string>",
"last_skipped_at": "<string>",
"skip_reason": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
}
],
"custom_eval_ids": [
"<string>"
],
"env_var_keys": [
"<string>"
],
"env_profiles": [
{
"id": "<string>",
"name": "<string>",
"env_var_keys": [
"<string>"
]
}
],
"default_env_profile_id": "<string>",
"source_id": "<string>",
"api_base_url": "<string>",
"can_configure_per_model_schedules": false
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Body
application/json
Legacy flat model selection. Prefer targets for v0.3.0.
Scheduled text/agent targets. Use frequency='manual' to keep a target available but unscheduled.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
Successful Response
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I