SessionsList Sessions

Sessions

List Sessions

List all sessions for a specific project

Request

projectIdstringpathrequired

The unique identifier of the project

Authorizationstringheaderrequired

Bearer token for authentication

Response

successboolean

Indicates if the request was successful

dataobject

Request Example

curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://cloud.specstory.com/api/v1/projects/proj_abc123/sessions
const response = await fetch('https://cloud.specstory.com/api/v1/projects/proj_abc123/sessions', {
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY'
  }
});

const data = await response.json();
import requests

response = requests.get(
    'https://cloud.specstory.com/api/v1/projects/proj_abc123/sessions',
    headers={'Authorization': 'Bearer YOUR_API_KEY'}
)

data = response.json()

Response Example

{
  "success": true,
  "data": {
    "sessions": [
      {
        "id": "550e8400-e29b-41d4-a716-446655440000",
        "projectId": "proj_abc123",
        "name": "Bug Fix Discussion",
        "markdownSize": 15420,
        "rawDataSize": 28956,
        "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",
        "metadata": {
          "clientName": "Cursor",
          "clientVersion": "1.0.0",
          "agentName": "Test Agent",
          "deviceId": "device123",
          "gitBranches": ["main"],
          "llmModels": ["claude-3-opus", "gpt-4"],
          "tags": ["bug-fix", "authentication"]
        },
        "etag": "W/\"3bf2-18d4c5a8f90\""
      }
    ],
    "total": 1,
    "projectId": "proj_abc123"
  }
}
{
  "success": false,
  "error": "Invalid or missing authentication token"
}