https://www.growthbook.io/ logo
#ask-questions
Title
# ask-questions
s

square-crowd-4186

11/15/2023, 1:20 PM
Hi, What is the retention period of the audit logs ?
r

rhythmic-agent-34208

11/15/2023, 1:20 PM
Our official support hours are 6:30am - 5pm Pacific Time, Monday through Friday. You may occasionally hear from us outside of these hours. Your support request has been logged in our system. Our support team will get back to you very soon!
b

brief-honey-45610

11/15/2023, 3:15 PM
Hi Mohammed, I'm checking on this and will get back to you
s

square-crowd-4186

11/15/2023, 4:07 PM
And one more question addition to this that, is there were way get this logs via api or some other means, we are looking a way to automatically pull the logs from growth book and push it to the elaticsearch instance, where we have our whole application's log.
b

brief-honey-45610

11/15/2023, 6:15 PM
Hi Mohammed, I spoke with one of our engineers and we don't currently have an official retention period (we keep everything indefinitely). However, this won't always be the case, and eventually we will create an official retention period that may vary based on which plan you're on (Pro vs. Enterprise).
s

square-crowd-4186

11/16/2023, 5:16 AM
Currently we are on Pro, but https://app.growthbook.io/events shows only last two days logs.
Also is there an api endpoint through which we can download the logs ?
r

rhythmic-agent-34208

11/16/2023, 3:22 PM
OK, what data retention period are you hoping for? I can ask the team if working on the Audit Logs is on our roadmap for the near future. There is no API endpoint for Audit Logs. This is not an official recommendation, but perhaps you could do something with web scraping in the mean time to scrape the logs you need from your dashboard.
s

square-crowd-4186

11/16/2023, 3:24 PM
I can see that only latest 50 logs/events are displayed here, how to access the rest of them.
One more question related to logs In what format does the "export" button in the below screenshot, exports the logs ? Can I get sample logs of an exported logs and glimpse of the UI and options available for exporting.
r

rhythmic-agent-34208

11/16/2023, 11:50 PM
We did a little digging and found that the logs are exportable in JSON format, and the resulting JSON file contains many, many more logs than what is shown in the dashboard. Here is the format:
Copy code
[
    {
        "id": "event-62d2a67d-5372-4853-a602-55cb9181211e",
        "dateCreated": "2023-11-16T22:13:29.269Z",
        "organizationId": "redacted",
        "object": "user",
        "event": "user.login",
        "data": {
            "object": "user",
            "event": "user.login",
            "user": {
                "type": "dashboard",
                "email": "redacted",
                "id": "redacted",
                "name": "redacted"
            },
            "data": {
                "current": {
                    "email": "redacted",
                    "id": "redacted",
                    "name": "redacted",
                    "ip": "redacted",
                    "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10­_15­_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36",
                    "os": "\"macOS\"",
                    "device": "\"Google Chrome\";v=\"119\", \"Chromium\";v=\"119\", \"Not?A­_Brand\";v=\"24\""
                }
            }
        }
    },
    etc...
]
I don't have a screenshot of the export UI, but it's a link or a button at the bottom of the Events page.
s

square-crowd-4186

11/17/2023, 6:37 AM
Thank You
I can see the button, I wanted to the see UI for export because to see whether is there any option to supply a date range within which we can download the logs. Is there any such option ?
b

brief-honey-45610

11/17/2023, 2:59 PM
Ah, apologies, I misunderstood what you were asking for. Yes, I’ll put together a screenshot for you
👍 1
r

rhythmic-agent-34208

11/17/2023, 7:51 PM
Hi Mohammed, I learned there is no UI for the export. Clicking the export button immediately downloads the JSON file. There isn't the ability to filter the logs before export. As far as I can tell, the export file exports all events that we have on file.
14 Views