agent-studio
Post Answer
Answer the pending question (option pick or free text).
POST
/
api
/
v1
/
agent-studio
/
sessions
/
{session_id}
/
answer
Post Answer
import requests
url = "https://www.datalab.to/api/v1/agent-studio/sessions/{session_id}/answer"
payload = {
"option_id": "<string>",
"free_text": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)curl --request POST \
--url https://www.datalab.to/api/v1/agent-studio/sessions/{session_id}/answer \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"option_id": "<string>",
"free_text": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({option_id: '<string>', free_text: '<string>'})
};
fetch('https://www.datalab.to/api/v1/agent-studio/sessions/{session_id}/answer', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://www.datalab.to/api/v1/agent-studio/sessions/{session_id}/answer"
payload := strings.NewReader("{\n \"option_id\": \"<string>\",\n \"free_text\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-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))
}{
"id": 123,
"seq": 123,
"kind": "<string>",
"actor": "user",
"ts": "2023-11-07T05:31:56Z",
"text": "<string>",
"payload": {},
"refs": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Path Parameters
Was this page helpful?
⌘I
Post Answer
import requests
url = "https://www.datalab.to/api/v1/agent-studio/sessions/{session_id}/answer"
payload = {
"option_id": "<string>",
"free_text": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)curl --request POST \
--url https://www.datalab.to/api/v1/agent-studio/sessions/{session_id}/answer \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"option_id": "<string>",
"free_text": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({option_id: '<string>', free_text: '<string>'})
};
fetch('https://www.datalab.to/api/v1/agent-studio/sessions/{session_id}/answer', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://www.datalab.to/api/v1/agent-studio/sessions/{session_id}/answer"
payload := strings.NewReader("{\n \"option_id\": \"<string>\",\n \"free_text\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-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))
}{
"id": 123,
"seq": 123,
"kind": "<string>",
"actor": "user",
"ts": "2023-11-07T05:31:56Z",
"text": "<string>",
"payload": {},
"refs": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}