Record a session
Get an API key in the Quickstart. Sendrecording: true when you open the session.
recordingStatus set to recording and recordingAvailable set to true. Use the session as usual, then close it. The video is made after the session stops. The close answer has recordingStatus set to processing.
Read the recording
GET /v1/browser/{session_id}/recording returns the status and, when it is ready, a link to the video.
recordingUrl needs no API key and works for 15 minutes, so you can open it in a browser or a player. It answered 200 with video/mp4, 168,664 bytes. Read the recording again for a new link. recordingTruncated is true when the video ends early because the session showed more than a recording can hold. A ready video is kept 7 days.
Delete the recording
DELETE /v1/browser/{session_id}/recording removes the video at once.
404 notFound with This browser session has no recording. Deleting the video does not remove the replay.
Read the replay
A closed session keeps a replay for 24 hours.GET /v1/browser/{session_id}/replay lists the pages it visited, in order, with the steps run on each. You do not need recording for it.
at is when the page was shown, in milliseconds since 1970. steps are the calls your code made on that page.
GET /v1/browser/{session_id}/replay/{page_id} reads one page and adds its screenshot, a Base64 JPEG. This real answer is cut.
Options
Limits and errors
recordingwithzeroDataRetentionreturns400 invalidRequest:zeroDataRetention keeps nothing from the session, so it cannot be recorded. Send one of them.A session withzeroDataRetentionhas no replay.- Reading a recording of a session that was not recorded returns
404 notFound. - Deleting a video that is still being made returns
409 invalidRequest:The video is not ready yet. Delete it when recordingStatus is ready or failed.Deleting when there is none returns404 notFound. - A replay page id that does not exist returns
404 notFoundwithNo replay page with that id.
Related
- Browser sessions opens and closes the session.
- Execute runs the steps a replay lists.
- Zero data retention keeps nothing, including replays.
- Recording reference and replay reference list every field.