---
title: Monitoring account activity with the audit log
summary: null
url: >-
  https://www.fastly.com/documentation/guides/account-info/user-and-account-management/monitoring-account-activity-with-the-audit-log
---

The audit log keeps track of events related to your Fastly account, users, and services. You can use the audit log to determine which changes were made and by whom. For example, you can use the audit log to review:

- service configuration changes and who made them (e.g., a user assigned to your account, a Fastly user acting on your behalf)
- authentication and access events (e.g., logins, API token creation, identity provider updates)
- account security settings changes
- product and feature purchases

You must be assigned the [role of superuser](https://www.fastly.com/documentation/guides/account-info/user-and-account-management/about-user-roles-and-permissions) to view the audit log. 

> **HINT:** For information on monitoring events related to a service, check out our guide on the [event log](https://www.fastly.com/documentation/guides/account-info/user-and-account-management/reviewing-service-activity-with-the-event-log). For information on monitoring the data that passes through Fastly, check out our guide on [Fastly's real-time log streaming features](https://www.fastly.com/documentation/guides/integrations/streaming-logs/about-fastlys-realtime-log-streaming-features).

## Accessing the audit log

You can access the audit log using the Fastly control panel or the Fastly API.

### Control panel

Follow these instructions to access the audit log for your account:

1.   Log in to the [Fastly control panel](https://manage.fastly.com).

2. Go to **Account** > [**Audit log**](https://manage.fastly.com/account/audit-log).

   ![Audit log example](/img/audit-log-example.png)

> **HINT:** You can filter audit log events by various criteria, such as event type and date.

### API

The `/events` API endpoint can be used to retrieve the audit log for a Fastly account. For example, you could make the following API call in a terminal application to retrieve a filtered view of all recent audit log events:

```term copy
$ curl -g -H "Fastly-Key: FASTLY_API_TOKEN" "https://api.fastly.com/events?filter[customer_id]=x4xCwxxJxGCx123Rx5xTx&page[number]=1&page[size]=1"
```

The response will look like this:

```json
{
  "data": [
      {
          "attributes": {
              "admin": false,
              "created_at": "2016-06-06T20:05:10Z",
              "customer_id": "x4xCwxxJxGCx123Rx5xTx",
              "description": "Version 2 was activated",
              "event_type": "version.activate",
              "ip": "127.0.0.0",
              "metadata": {
                  "version_number": 2
              },
              "service_id": "SU1Z0isxPaozGVKXdv0eY",
              "user_id": "x9KzsrACXZv8tPwlEDsKb6"
          },
          "id": "5IH1QmNSV1Qi7jXc4oIZlZc",
          "type": "event"
      }
  ],
  "links": {
    "last": "https://api.fastly.com/events?filter[customer_id]=x4xCwxxJxGCx123Rx5xTx&page[number]=1&page[size]=1"
  }
}
```

Check out the [Fastly API documentation](https://www.fastly.com/documentation/reference/api/account/events/) for more information.

> **NOTE:** As of June 22, 2021, audit log data is retained for a period of one year (365 days).

## Related content

- [Reviewing service activity with the event log](https://www.fastly.com/documentation/guides/account-info/user-and-account-management/reviewing-service-activity-with-the-event-log)
- [Event logs API documentation](https://www.fastly.com/documentation/reference/api/account/events/)
