Sessions
Check Session
Check if a session exists and get metadata without retrieving content
Request
projectIdstringpathrequiredThe unique identifier of the project
sessionIdstringpathrequiredThe unique identifier of the session
AuthorizationstringheaderrequiredBearer token for authentication
If-None-MatchstringheaderETag value for conditional requests
Response
This endpoint returns only HTTP status codes and headers, no response body.
Response Headers
| Header | Description |
|---|---|
ETag | Entity tag for the session version |
Last-Modified | Last modification timestamp |
Content-Length | Size of the session content |
Status Codes
| Status | Description |
|---|---|
200 | Session exists |
304 | Not Modified (if ETag matches) |
401 | Unauthorized |
404 | Session not found |
Request Example
curl -I \
-H "Authorization: Bearer YOUR_API_KEY" \
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',
{
method: 'HEAD',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
}
);
// Check status
if (response.ok) {
console.log('Session exists');
console.log('ETag:', response.headers.get('ETag'));
}import requests
response = requests.head(
'https://cloud.specstory.com/api/v1/projects/proj_abc123/sessions/550e8400-e29b-41d4-a716-446655440000',
headers={'Authorization': 'Bearer YOUR_API_KEY'}
)
if response.status_code == 200:
print('Session exists')
print('ETag:', response.headers.get('ETag'))Response Example
HTTP/1.1 200 OK
ETag: W/"3bf2-18d4c5a8f90"
Last-Modified: Mon, 15 Jan 2024 14:45:30 GMT
Content-Length: 15420HTTP/1.1 304 Not Modified
ETag: W/"3bf2-18d4c5a8f90"HTTP/1.1 404 Not Found