API reference

Recover sessions, turns, and generated files.

Use session endpoints after saving `response.metadata.session_id` from the stream.

Endpoints

  • GET /v1/sessions?harness={id}&limit=20
  • GET /v1/sessions/{session_id}
  • GET /v1/sessions/{session_id}/turns
  • GET /v1/sessions/{session_id}/files
  • GET /v1/sessions/{session_id}/files?changed=true
  • GET /v1/containers/{session_id}/files/{file_id}/content
  • GET /v1/sessions/{session_id}/files/archive
  • DELETE /v1/sessions/{session_id}

Archive

The archive endpoint returns generated artifacts as one zip while preserving folder hierarchy. Use ?changed=true for only the latest turn, or ?files=fid1,fid2 for an explicit file set.

Delete a session

Delete a task for good: its transcript, its trace, its working folder and every file in it, its responses and outputs. Not undoable; a running turn is cancelled first.

Returns { "id": "hsess...", "object": "session", "deleted": true }.

Delete a session
DELETE /v1/sessions/{session_id}
Authorization: Bearer $HR_API_KEY
Open standard

Listing sessions and reading turns after a dropped stream uses the inspection endpoints (GET /v1/sessions, /{id}, and /{id}/turns) that UHP defines at conformance class Extended. See the UHP Sessions chapter.

Create API Key

Ready to run this against a live workspace? Keys take under a minute.