List execution sessions for a schedule
curl --request GET \
--url https://api.example.com/schedule/{schedule_id}/sessions \
--header 'x-user-id: <x-user-id>'import requests
url = "https://api.example.com/schedule/{schedule_id}/sessions"
headers = {"x-user-id": "<x-user-id>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-user-id': '<x-user-id>'}};
fetch('https://api.example.com/schedule/{schedule_id}/sessions', 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.example.com/schedule/{schedule_id}/sessions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-user-id: <x-user-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/schedule/{schedule_id}/sessions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-user-id", "<x-user-id>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/schedule/{schedule_id}/sessions")
.header("x-user-id", "<x-user-id>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/schedule/{schedule_id}/sessions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-user-id"] = '<x-user-id>'
response = http.request(request)
puts response.read_body{
"sessions": [
{
"user_id": "<string>",
"agent_id": "<string>",
"config": {
"workspace_id": "<string>",
"name": "<string>",
"chat_model_config": {
"type": "<string>",
"credential_id": "<string>",
"model": "<string>",
"parameters": {}
},
"fallback_chat_model_config": {
"type": "<string>",
"credential_id": "<string>",
"model": "<string>",
"parameters": {}
}
},
"id": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"source": "user",
"source_schedule_id": "<string>",
"team_id": "<string>",
"state": {
"session_id": "<string>",
"summary": "",
"context": [
{
"name": "<string>",
"content": [
{
"text": "<string>",
"type": "text",
"id": "<string>"
}
],
"id": "<string>",
"metadata": {},
"created_at": "<string>",
"finished_at": "<string>",
"usage": {
"input_tokens": 123,
"output_tokens": 123
}
}
],
"reply_id": "<string>",
"cur_iter": 0,
"permission_context": {
"mode": "default",
"working_directories": {},
"allow_rules": {},
"deny_rules": {},
"ask_rules": {}
},
"tool_context": {
"max_cache_files": 100,
"max_cache_bytes": 25000,
"read_file_cache": [
{
"lines": [
"<string>"
],
"updated_at": 123,
"bytes": 123,
"file_path": "<string>"
}
],
"activated_groups": [
"<string>"
]
},
"tasks_context": {
"tasks": [
{
"subject": "<string>",
"description": "<string>",
"metadata": {},
"created_at": "<string>",
"state": "pending",
"id": "<string>",
"owner": "<string>",
"blocks": [
"<string>"
],
"blocked_by": [
"<string>"
]
}
]
}
}
}
],
"total": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}schedule
List execution sessions for a schedule
Return all sessions triggered by a given schedule.
Args:
schedule_id (str): ID of the schedule.
user_id (str): Authenticated user ID.
storage (StorageBase): Storage instance.
Returns:
ScheduleSessionsResponse:
List of execution sessions ordered by creation time (newest first).
Raises:
HTTPException: 404 if the schedule does not exist.
GET
/
schedule
/
{schedule_id}
/
sessions
List execution sessions for a schedule
curl --request GET \
--url https://api.example.com/schedule/{schedule_id}/sessions \
--header 'x-user-id: <x-user-id>'import requests
url = "https://api.example.com/schedule/{schedule_id}/sessions"
headers = {"x-user-id": "<x-user-id>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-user-id': '<x-user-id>'}};
fetch('https://api.example.com/schedule/{schedule_id}/sessions', 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.example.com/schedule/{schedule_id}/sessions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-user-id: <x-user-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/schedule/{schedule_id}/sessions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-user-id", "<x-user-id>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/schedule/{schedule_id}/sessions")
.header("x-user-id", "<x-user-id>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/schedule/{schedule_id}/sessions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-user-id"] = '<x-user-id>'
response = http.request(request)
puts response.read_body{
"sessions": [
{
"user_id": "<string>",
"agent_id": "<string>",
"config": {
"workspace_id": "<string>",
"name": "<string>",
"chat_model_config": {
"type": "<string>",
"credential_id": "<string>",
"model": "<string>",
"parameters": {}
},
"fallback_chat_model_config": {
"type": "<string>",
"credential_id": "<string>",
"model": "<string>",
"parameters": {}
}
},
"id": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"source": "user",
"source_schedule_id": "<string>",
"team_id": "<string>",
"state": {
"session_id": "<string>",
"summary": "",
"context": [
{
"name": "<string>",
"content": [
{
"text": "<string>",
"type": "text",
"id": "<string>"
}
],
"id": "<string>",
"metadata": {},
"created_at": "<string>",
"finished_at": "<string>",
"usage": {
"input_tokens": 123,
"output_tokens": 123
}
}
],
"reply_id": "<string>",
"cur_iter": 0,
"permission_context": {
"mode": "default",
"working_directories": {},
"allow_rules": {},
"deny_rules": {},
"ask_rules": {}
},
"tool_context": {
"max_cache_files": 100,
"max_cache_bytes": 25000,
"read_file_cache": [
{
"lines": [
"<string>"
],
"updated_at": 123,
"bytes": 123,
"file_path": "<string>"
}
],
"activated_groups": [
"<string>"
]
},
"tasks_context": {
"tasks": [
{
"subject": "<string>",
"description": "<string>",
"metadata": {},
"created_at": "<string>",
"state": "pending",
"id": "<string>",
"owner": "<string>",
"blocks": [
"<string>"
],
"blocked_by": [
"<string>"
]
}
]
}
}
}
],
"total": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Headers
Caller's user ID. Temporary header-based identity; will be replaced by JWT auth.
Path Parameters
⌘I