Request History
Last updated: November 24, 2025
Request History
REST CLI automatically tracks request and response history for debugging, auditing, and replaying requests.
Overview
History tracking captures:
- Request details (method, URL, headers, body)
- Response data (status, headers, body)
- Execution metadata (timestamp, duration, sizes)
- Errors (if any)
Enabling/Disabling History
Global Setting
History is enabled by default. To disable globally, edit ~/.restcli/.session.json:
{
"historyEnabled": false
}
Or toggle in TUI:
- Press
Cto open configuration viewer - Navigate to history setting
- Press
tto toggle
Per-Profile Control
Override global setting per profile in ~/.restcli/.profiles.json:
{
"name": "Production",
"headers": {
"Authorization": "Bearer {{token}}"
},
"historyEnabled": false
}
Priority:
- Profile setting (if specified)
- Global setting (if profile doesn’t specify)
Use cases for disabling:
- Production profiles - Avoid logging sensitive production data
- High-volume testing - Prevent history buildup during load tests
- Sensitive APIs - Don’t persist API keys or PII in history
- Temporary work - Exploratory testing without logging
Viewing History
TUI Mode
Press H to open history viewer.
History List:
| Key | Action |
|---|---|
↑/k |
Navigate up |
↓/j |
Navigate down |
Enter |
View details |
r |
Replay request |
d |
Delete entry |
D |
Clear all history (with confirmation) |
ESC |
Close viewer |
Details View:
- Full request (method, URL, headers, body)
- Response (status, headers, body)
- Metadata (timestamp, duration, sizes)
File Location
History stored in: ~/.restcli/history/
Files organized by date
Clearing History
Clear All (TUI)
- Press
Hto open history - Press
Dto clear all - Confirm with
yor cancel withn
Confirmation dialog:
┌─ Confirm ─────────────────────────┐
│ Clear all history? │
│ │
│ This will delete all 127 entries │
│ This action cannot be undone. │
│ │
│ [y] Yes [n] No │
└───────────────────────────────────┘
History Entry Structure
{
"timestamp": "2024-11-23T14:30:22Z",
"requestFile": "/path/to/requests.http",
"requestName": "Get User",
"method": "GET",
"url": "https://api.example.com/users/123",
"headers": {
"Authorization": "Bearer token123",
"Content-Type": "application/json"
},
"body": "",
"responseStatus": 200,
"responseStatusText": "200 OK",
"responseHeaders": {
"Content-Type": "application/json"
},
"responseBody": "{\"id\":123,\"name\":\"Alice\"}",
"duration": 245,
"requestSize": 0,
"responseSize": 32,
"error": ""
}
Replaying Requests
From History
- Press
Hto open history - Navigate to desired entry
- Press
rto replay
Replay behavior:
- Uses exact same request (method, URL, headers, body)
- Resolves variables at replay time (may differ from original)
- Captures new response in history
- Useful for:
- Debugging API changes
- Comparing responses over time
- Re-running failed requests