Sessions
Get Session
Retrieve a specific session with its content and metadata
Request
projectIdstringpathrequiredThe unique identifier of the project
sessionIdstringpathrequiredThe unique identifier of the session
AuthorizationstringheaderrequiredBearer token for authentication
AcceptstringheaderContent type for response. Options:
application/json(default) - Returns structured JSONtext/markdown- Returns raw markdown content
If-None-MatchstringheaderETag value for conditional requests
Response
successbooleanIndicates if the request was successful
dataobjectRequest Example
curl -H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json" \
https://cloud.specstory.com/api/v1/projects/proj_abc123/sessions/550e8400-e29b-41d4-a716-446655440000const response = await fetch(
'https://cloud.specstory.com/api/v1/projects/proj_abc123/sessions/550e8400-e29b-41d4-a716-446655440000',
{
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Accept': 'application/json'
}
}
);
const data = await response.json();import requests
response = requests.get(
'https://cloud.specstory.com/api/v1/projects/proj_abc123/sessions/550e8400-e29b-41d4-a716-446655440000',
headers={
'Authorization': 'Bearer YOUR_API_KEY',
'Accept': 'application/json'
}
)
data = response.json()Response Example
{
"success": true,
"data": {
"session": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Bug Fix Discussion",
"markdownContent": "## Session Summary\n\n**User**: I'm having an issue with authentication...\n\n**Assistant**: Let me help you debug that...",
"markdownSize": 15420,
"metadata": {
"clientName": "Cursor",
"clientVersion": "2.0.0",
"agentName": "SpecStory Agent",
"deviceId": "device123",
"gitBranches": ["main", "feature-auth"],
"llmModels": ["claude-3-opus"],
"tags": ["bug-fix", "authentication"]
},
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T14:45:30.000Z",
"startedAt": "2024-01-15T10:30:00.000Z",
"endedAt": "2024-01-15T14:45:30.000Z",
"project": {
"id": "proj_abc123",
"name": "My Web App",
"icon": "Code2",
"color": "blue"
}
}
}
}// No body - session hasn't changed since If-None-Match ETag{
"success": false,
"error": "Session not found"
}