agent-studio
Reject Diff
Clear the pending proposal without applying it.
POST
/
api
/
v1
/
agent-studio
/
sessions
/
{session_id}
/
diff
/
reject
Reject Diff
import requests
url = "https://www.datalab.to/api/v1/agent-studio/sessions/{session_id}/diff/reject"
payload = { "diff_id": "<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}/diff/reject \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"diff_id": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({diff_id: '<string>'})
};
fetch('https://www.datalab.to/api/v1/agent-studio/sessions/{session_id}/diff/reject', 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}/diff/reject"
payload := strings.NewReader("{\n \"diff_id\": \"<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))
}{
"applied": true,
"stale": true,
"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>"
}
},
"draft_checks": [
{
"id": "<string>",
"label": "<string>",
"kind": "code",
"description": "",
"blocking": false,
"source": "base",
"modified_from_base": true
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Path Parameters
Body
application/json
The proposal being decided; stale ids are idempotent no-ops (plan §4a S3).
Was this page helpful?
⌘I
Reject Diff
import requests
url = "https://www.datalab.to/api/v1/agent-studio/sessions/{session_id}/diff/reject"
payload = { "diff_id": "<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}/diff/reject \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"diff_id": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({diff_id: '<string>'})
};
fetch('https://www.datalab.to/api/v1/agent-studio/sessions/{session_id}/diff/reject', 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}/diff/reject"
payload := strings.NewReader("{\n \"diff_id\": \"<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))
}{
"applied": true,
"stale": true,
"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>"
}
},
"draft_checks": [
{
"id": "<string>",
"label": "<string>",
"kind": "code",
"description": "",
"blocking": false,
"source": "base",
"modified_from_base": true
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}