#List Session Replay

4 messages · Page 1 of 1 (latest)

feral peak
#

How can I make a curl call to list all my projects Session Replays?
How and what Personal Token can I create and use?

inner hornetBOT
#

Hi @feral peak. I'm happy to dig into this for you! I'll check my internal sources for answers to your question! :wave:

#

To list all your projects' Session Replays in Sentry, you can use the Sentry API endpoint for listing an organization's replays. Here’s how you can do it:

1. Create a Personal Auth Token

You need a personal auth token with one of the following scopes: org:read, org:write, or org:admin. The knowledge sources reference the authentication guide for creating a token, but do not provide the exact steps. Typically, you generate a token from your Sentry account settings under "API Keys" or "Auth Tokens"—ensure you select the required scopes.

2. Make the cURL Call

Replace {organization_id_or_slug} with your organization’s slug or ID, and <auth_token> with your personal token:

curl <https://sentry.io/api/0/organizations/{organization_id_or_slug}/replays/> \
 -H 'Authorization: Bearer <auth_token>'

You can add query parameters such as statsPeriod, start, end, project, etc., to filter or paginate results as needed. For example, to get replays from the last day:

curl "<https://sentry.io/api/0/organizations/{organization_id_or_slug}/replays/?statsPeriod=1d"> \
 -H 'Authorization: Bearer <auth_token>'

The response will be a JSON array of replay objects, each containing details like duration, user, browser, errors, and more API: List an Organization's Replays.

Notes