You may want to get the raw event data out of SAFR so you can open it in Excel or put it in a SQL database to do reporting. There are several ways to do this such as:
- Use SAFR Actions to log every event to a CSV file.
- Use python scripts and pandas to convert JSON event data (obtained through REST API calls) to XLS or CSV format.
- Use the REST API to download the JSON event data and then convert the data to CSV format with online tools. (This process is described in detail below.)
This page will walk you through option #3.
- Go to the SAFR Download Portal.
- Go to the "Developers" tab.
- Scroll to "SAFR Web API Reference" and click on "Events Service (CVEV) API".
- Click "Authorize" and enter your user and password in this format: <username>:<password>
- Note: Type carefully. If the credentials are typed incorrectly you'll get a 401 error when submitting API calls.
- Click the "Authorize" button and then close.
- Expand the "Get /events" API.
- Click the "Try it out" button.
- Enter sinceTime (and if needed untilTime) as the start and end times you want events from.
- Click "Execute".
- The events will be listed in the response body. Click "Download" to get the JSON file.
- Use an online tool (e.g. this one) to convert the JSON data to CSV.