Sessions
Get Recent Sessions
Retrieve the most recent sessions across all projects
Request
limitintegerqueryNumber of sessions to return (1-100)
AuthorizationstringheaderrequiredBearer token for authentication
Response
successbooleanIndicates if the request was successful
dataobjectRequest Example
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://cloud.specstory.com/api/v1/sessions/recent?limit=10"const response = await fetch('https://cloud.specstory.com/api/v1/sessions/recent?limit=10', {
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
const data = await response.json();import requests
response = requests.get(
'https://cloud.specstory.com/api/v1/sessions/recent',
headers={'Authorization': 'Bearer YOUR_API_KEY'},
params={'limit': 10}
)
data = response.json()Response Example
{
"success": true,
"data": {
"sessions": [
{
"id": "550e8400-e29b-41d4-a716-446655440001",
"projectId": "proj_abc123",
"name": "Feature Implementation",
"markdownSize": 22340,
"rawDataSize": 45678,
"createdAt": "2024-01-20T16:30:00.000Z",
"updatedAt": "2024-01-20T18:45:30.000Z",
"startedAt": "2024-01-20T16:30:00.000Z",
"endedAt": "2024-01-20T18:45:30.000Z",
"metadata": {
"clientName": "VSCode",
"clientVersion": "1.85.0",
"agentName": "SpecStory Agent",
"deviceId": "device456",
"gitBranches": ["feature-branch"],
"llmModels": ["claude-3-sonnet"],
"tags": ["feature", "api"]
}
},
{
"id": "550e8400-e29b-41d4-a716-446655440002",
"projectId": "proj_def456",
"name": "Debug Session",
"markdownSize": 8765,
"rawDataSize": 15432,
"createdAt": "2024-01-20T14:00:00.000Z",
"updatedAt": "2024-01-20T15:30:00.000Z",
"startedAt": "2024-01-20T14:00:00.000Z",
"endedAt": "2024-01-20T15:30:00.000Z",
"metadata": {
"clientName": "Cursor",
"clientVersion": "2.0.0",
"agentName": "Debug Agent",
"deviceId": "device789",
"gitBranches": ["debug-fix"],
"llmModels": ["gpt-4"],
"tags": ["debugging"]
}
}
],
"total": 2
}
}{
"success": false,
"error": "Invalid or missing authentication token"
}