List sessions
curl --request GET \
--url https://ai.data.cloud/api/v1/team/sessions \
--header 'x-pd-api-key: <api-key>'import requests
url = "https://ai.data.cloud/api/v1/team/sessions"
headers = {"x-pd-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-pd-api-key': '<api-key>'}};
fetch('https://ai.data.cloud/api/v1/team/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://ai.data.cloud/api/v1/team/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-pd-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"
"net/http"
"io"
)
func main() {
url := "https://ai.data.cloud/api/v1/team/sessions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-pd-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://ai.data.cloud/api/v1/team/sessions")
.header("x-pd-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://ai.data.cloud/api/v1/team/sessions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-pd-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"code": 0,
"data": {
"total": 8,
"pageSize": 10,
"pageNumber": 1,
"records": [
{
"id": "04b69928-532d-408a-8716-8f5e70fcacc6",
"title": "Finding Your Inner Spark",
"languageType": "AUTO",
"jobMode": "AUTO",
"maxMessagesInContext": 10,
"agentId": "DATA_ANALYSIS_AGENT",
"userId": "tmm-cm5m7khoz52zh07n4m7x1ut60"
},
{
"id": "7e9941af-ad1b-4834-a421-4b37b54aae19",
"title": "session_trade_analyze_001",
"languageType": "EN",
"jobMode": "AUTO",
"maxMessagesInContext": 1,
"agentId": "DATA_ANALYSIS_AGENT",
"userId": "tmm-cm5m7khoz52zh07n4m7x1ut60"
},
{
"id": "a137ecc8-9554-42c3-b042-2458dd2aeb36",
"title": "My first session",
"languageType": "AUTO",
"jobMode": "AUTO",
"maxMessagesInContext": 10,
"agentId": "DATA_ANALYSIS_AGENT",
"userId": "tmm-cm5m7khoz52zh07n4m7x1ut60"
},
{
"id": "4440ab38-3df0-465b-a66c-bf6acb0f1bc2",
"title": "New Title",
"languageType": "EN",
"jobMode": "AUTO",
"maxMessagesInContext": 10,
"agentId": "DATA_ANALYSIS_AGENT",
"userId": "tmm-cm5m7khoz52zh07n4m7x1ut60"
},
{
"id": "3eb5e294-11eb-4bf0-8854-7177c415d15c",
"title": "trade_analyze_001",
"languageType": "ZH-CN",
"jobMode": "AUTO",
"maxMessagesInContext": 10,
"agentId": "DATA_ANALYSIS_AGENT",
"userId": "tmm-cm5m7khoz52zh07n4m7x1ut60"
},
{
"id": "ccca6d34-894f-4f6f-a8b5-c9df93126309",
"title": "lhtest-old",
"languageType": "ZH-CN",
"jobMode": "AUTO",
"maxMessagesInContext": 5,
"agentId": "DATA_ANALYSIS_AGENT",
"userId": "tmm-cm5m7khoz52zh07n4m7x1ut60"
},
{
"id": "c28a1f47-da68-4456-bb0b-e85bf5a0e98e",
"title": "lhtest-newest",
"languageType": "ZH-TW",
"jobMode": "AUTO",
"maxMessagesInContext": 6,
"agentId": "DATA_ANALYSIS_AGENT",
"userId": "tmm-cm5m7khoz52zh07n4m7x1ut60"
},
{
"id": "fbde9b45-69cd-408e-97d1-f874236aadac",
"title": "General-session",
"languageType": "ZH-CN",
"jobMode": "AUTO",
"maxMessagesInContext": 10,
"agentId": "DATA_ANALYSIS_AGENT",
"userId": "tmm-cm5m7khoz52zh07n4m7x1ut60"
}
]
}
}Sessions
List sessions
Lists sessions in your team.
GET
/
v1
/
team
/
sessions
List sessions
curl --request GET \
--url https://ai.data.cloud/api/v1/team/sessions \
--header 'x-pd-api-key: <api-key>'import requests
url = "https://ai.data.cloud/api/v1/team/sessions"
headers = {"x-pd-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-pd-api-key': '<api-key>'}};
fetch('https://ai.data.cloud/api/v1/team/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://ai.data.cloud/api/v1/team/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-pd-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"
"net/http"
"io"
)
func main() {
url := "https://ai.data.cloud/api/v1/team/sessions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-pd-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://ai.data.cloud/api/v1/team/sessions")
.header("x-pd-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://ai.data.cloud/api/v1/team/sessions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-pd-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"code": 0,
"data": {
"total": 8,
"pageSize": 10,
"pageNumber": 1,
"records": [
{
"id": "04b69928-532d-408a-8716-8f5e70fcacc6",
"title": "Finding Your Inner Spark",
"languageType": "AUTO",
"jobMode": "AUTO",
"maxMessagesInContext": 10,
"agentId": "DATA_ANALYSIS_AGENT",
"userId": "tmm-cm5m7khoz52zh07n4m7x1ut60"
},
{
"id": "7e9941af-ad1b-4834-a421-4b37b54aae19",
"title": "session_trade_analyze_001",
"languageType": "EN",
"jobMode": "AUTO",
"maxMessagesInContext": 1,
"agentId": "DATA_ANALYSIS_AGENT",
"userId": "tmm-cm5m7khoz52zh07n4m7x1ut60"
},
{
"id": "a137ecc8-9554-42c3-b042-2458dd2aeb36",
"title": "My first session",
"languageType": "AUTO",
"jobMode": "AUTO",
"maxMessagesInContext": 10,
"agentId": "DATA_ANALYSIS_AGENT",
"userId": "tmm-cm5m7khoz52zh07n4m7x1ut60"
},
{
"id": "4440ab38-3df0-465b-a66c-bf6acb0f1bc2",
"title": "New Title",
"languageType": "EN",
"jobMode": "AUTO",
"maxMessagesInContext": 10,
"agentId": "DATA_ANALYSIS_AGENT",
"userId": "tmm-cm5m7khoz52zh07n4m7x1ut60"
},
{
"id": "3eb5e294-11eb-4bf0-8854-7177c415d15c",
"title": "trade_analyze_001",
"languageType": "ZH-CN",
"jobMode": "AUTO",
"maxMessagesInContext": 10,
"agentId": "DATA_ANALYSIS_AGENT",
"userId": "tmm-cm5m7khoz52zh07n4m7x1ut60"
},
{
"id": "ccca6d34-894f-4f6f-a8b5-c9df93126309",
"title": "lhtest-old",
"languageType": "ZH-CN",
"jobMode": "AUTO",
"maxMessagesInContext": 5,
"agentId": "DATA_ANALYSIS_AGENT",
"userId": "tmm-cm5m7khoz52zh07n4m7x1ut60"
},
{
"id": "c28a1f47-da68-4456-bb0b-e85bf5a0e98e",
"title": "lhtest-newest",
"languageType": "ZH-TW",
"jobMode": "AUTO",
"maxMessagesInContext": 6,
"agentId": "DATA_ANALYSIS_AGENT",
"userId": "tmm-cm5m7khoz52zh07n4m7x1ut60"
},
{
"id": "fbde9b45-69cd-408e-97d1-f874236aadac",
"title": "General-session",
"languageType": "ZH-CN",
"jobMode": "AUTO",
"maxMessagesInContext": 10,
"agentId": "DATA_ANALYSIS_AGENT",
"userId": "tmm-cm5m7khoz52zh07n4m7x1ut60"
}
]
}
}Headers
Query Parameters
Response
200 - application/json