API Guide
This document outlines the API endpoints for the RnR service, which provides functionalities to capture, replay, and manage database events.
All requests should include Content-Type: application/json
and Accept: application/json
headers.
Endpoints
1. Initialize Replay
Init a new playback session
Request
POST {{ENDPOINT}}/v1/replay/init
Body
{
"replay_requested_timestamp": "2025-02-12T08:12:00Z",
"replay_end_timestamp": "2025-02-12T08:45:00Z",
"tenant_id": "512b1730-8f15-4ae4-bf57-fe1bc9cd4f63"
}
replay_requested_timestamp
(datime RFC3339): session start timereplay_end_timestamp
(datime RFC3339): session end timetenant_id
: UUID
2. Start Replay
Request
Start replayid
playback session
PUT {{ENDPOINT}}/v1/replay/:replayid/start
Body
{
"replay_speed": 2
}
replay_speed
(float): speed to running playback session.
3. Stop Replay
Stop/Pause replayid
playback session.
Request
PUT {{ENDPOINT}}/v1/replay/:replayid/stop
4. End Replay
End replayid
playback session.
Request
PUT {{ENDPOINT}}/v1/replay/:replayid/end
Body
{
"tenant_id": "6d3b0069-73ad-4d47-b1cd-e77a9398e275"
}
5. Reset Replay
Reset playback session (if the session being stuck )
Request
POST {{ENDPOINT}}/v1/replay/reset
6. Update Snapshot Interval
- Update Backup scheudlejob frequently.
Request
PUT {{ENDPOINT}}/v1/configuration/snapshot-interval
Body
{
"snapshot_interval": ""
}
snapshot_interval
: following schedule expression.
7. Update Snapshot List Tables
- Update list tables need to take snapshot
Request
PUT {{ENDPOINT}}/v1/configuration/snapshot-list-tables
Body
{
"list_tables": "public.table"
}
list_tables
: allow list tables, separate by comma,
character, each table should have 2 parts:schema
.table
8. Get current session
- Able to get the current session information
Request
GET {{ENDPOINT}}/v1/replay/current-session
Response
{
"data": {
"id": "<uuid>",
"status": "<status>",
"display_status": "<display_status>",
"replay_start_timestamp": "<replay_start_timestamp>",
"replay_end_timestamp": "<replay_end_timestamp>",
"replay_last_timestamp": "<replay_last_timestamp>"
},
"sent_at": "<sent_at>"
}
id
: session idstatus
: session statusdisplay_status
: session display statusreplay_start_timestamp
: session start timestamp (RFC3339 format)replay_end_timestamp
: session end timestamp (RFC3339 format)replay_last_timestamp
: session last timestamp (RFC3339 format)sent_at
: session sent at timestamp (RFC3339 format)