Message role: user or assistant.
GET
/api/memory/session BearerGet Session History
Retrieve the complete message history for a specific PocketPaw session. Returns all user and agent messages in chronological order with timestamps and metadata.
Overview
Returns the message history for a specific session. Messages are returned in chronological order with role, content, and timestamp.
Parameters
Query Parameters
id requiredThe session identifier to retrieve messages for.
limitMaximum number of messages to return.
Response
Returns an array of message objects:
role stringcontent stringThe message content (may contain markdown).
timestamp stringISO 8601 timestamp when the message was recorded.
curl -X GET "http://localhost:8000/api/memory/session?id=session_abc123" \ -H "Authorization: Bearer <token>"const response = await fetch("http://localhost:8000/api/memory/session?id=session_abc123", { headers: { "Authorization": "Bearer <token>" }});const data = await response.json();console.log(data);import requests
response = requests.get( "http://localhost:8000/api/memory/session", params={"id": "session_abc123"}, headers={"Authorization": "Bearer <token>"},)print(response.json())[ { "role": "user", "content": "How do I check if a number is prime in Python?", "timestamp": "2024-01-15T10:30:00Z" }, { "role": "assistant", "content": "Here's a function to check if a number is prime...", "timestamp": "2024-01-15T10:30:05Z" }]Was this page helpful?
Request
curl -X GET "http://localhost:8000/api/memory/session" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <token>"const response = await fetch("http://localhost:8000/api/memory/session", {
method: "GET",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer <token>"
},
});
const data = await response.json();
console.log(data);import requests
response = requests.get(
"http://localhost:8000/api/memory/session",
headers={'Content-Type':'application/json','Authorization':'Bearer <token>'},
)
print(response.json())package main
import (
"fmt"
"net/http"
"io"
)
func main() {
req, _ := http.NewRequest("GET", "http://localhost:8000/api/memory/session", nil)
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer <token>")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}Response
Send a request to see the response
Authorization
Headers
Response