agent-studio
Publish Session
Promote the latest committed version to published (1.x) and return the API address. Gated on the green board (no in-flight or failing runs pinned to the candidate).
POST
/
api
/
v1
/
agent-studio
/
sessions
/
{session_id}
/
publish
Publish Session
import requests
url = "https://www.datalab.to/api/v1/agent-studio/sessions/{session_id}/publish"
headers = {"X-API-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)curl --request POST \
--url https://www.datalab.to/api/v1/agent-studio/sessions/{session_id}/publish \
--header 'X-API-Key: <api-key>'const options = {method: 'POST', headers: {'X-API-Key': '<api-key>'}};
fetch('https://www.datalab.to/api/v1/agent-studio/sessions/{session_id}/publish', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://www.datalab.to/api/v1/agent-studio/sessions/{session_id}/publish"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"version": {
"label": "<string>",
"state": "draft",
"contract": {
"goal": "<string>",
"output_shape": "parse",
"output_schema": "<string>",
"rules": [
{
"id": "<string>",
"text": "<string>",
"source": "user"
}
],
"parse_params": {},
"knobs": {
"max_turns": 2,
"timeout_s": 2,
"model": "<string>"
}
},
"checks": [
{
"id": "<string>",
"label": "<string>",
"kind": "code",
"description": "",
"blocking": false,
"source": "base",
"modified_from_base": true
}
],
"caused_by": {},
"created": "2023-11-07T05:31:56Z"
},
"processor_id": "<string>",
"address": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Path Parameters
Was this page helpful?
⌘I
Publish Session
import requests
url = "https://www.datalab.to/api/v1/agent-studio/sessions/{session_id}/publish"
headers = {"X-API-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)curl --request POST \
--url https://www.datalab.to/api/v1/agent-studio/sessions/{session_id}/publish \
--header 'X-API-Key: <api-key>'const options = {method: 'POST', headers: {'X-API-Key': '<api-key>'}};
fetch('https://www.datalab.to/api/v1/agent-studio/sessions/{session_id}/publish', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://www.datalab.to/api/v1/agent-studio/sessions/{session_id}/publish"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"version": {
"label": "<string>",
"state": "draft",
"contract": {
"goal": "<string>",
"output_shape": "parse",
"output_schema": "<string>",
"rules": [
{
"id": "<string>",
"text": "<string>",
"source": "user"
}
],
"parse_params": {},
"knobs": {
"max_turns": 2,
"timeout_s": 2,
"model": "<string>"
}
},
"checks": [
{
"id": "<string>",
"label": "<string>",
"kind": "code",
"description": "",
"blocking": false,
"source": "base",
"modified_from_base": true
}
],
"caused_by": {},
"created": "2023-11-07T05:31:56Z"
},
"processor_id": "<string>",
"address": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}