Get Auditing Configuration for a Project


Groups and projects are synonymous terms. Your {GROUP-ID} is the same as your project ID. For existing groups, your group/project ID remains the same. The resource and corresponding endpoints use the term groups.


This feature is not available for M0 (Free Tier), M2, and M5 clusters. For more information, see Atlas M0 (Free Tier), M2, and M5 Limitations.

The Atlas API uses HTTP Digest Authentication. Provide your Atlas username and API key as the username and password when constructing the HTTP request.

For complete documentation on configuring API access for an Atlas project, see Configure Atlas API Access.

Base URL:


GET /groups/{GROUP-ID}/auditLog

Request Path Parameters

Path Element Required/Optional Description
GROUP-ID Required. The unique identifier for the project.

Request Query Parameters

Field Required/Optional Description
envelope Optional.

A boolean that specifies whether or not to wrap the response in an envelope.

Defaults to false.

pretty Optional.

A boolean that specifies whether or not to return a “pretty-printed” JSON document.

Defaults to false.

Request Body Parameters

This endpoint does not use HTTP request body parameters.


Name Type Description
auditAuthorizationSuccess boolean Indicates whether the auditing system captures successful authentication attempts for audit filters using the "atype" : "authCheck" auditing event. For more information, see auditAuthorizationSuccess
auditFilter string JSON-formatted audit filter used by the project
configurationType string

Denotes the creation method for the audit filter. Possible values are:

  • NONE - auditing not configured for the project.
  • FILTER_BUILDER - auditing configured via Atlas UI filter builder
  • FILTER_JSON - auditing configured via Atlas custom filter or API
enabled boolean true if the project associated to the {GROUP-ID} has database auditing enabled.

Example Request

curl -u "username:apiKey" --digest \
 --header "Accept: application/json" \
 --header "Content-Type: application/json" \
 --request GET "{GROUP-ID}/auditLog?pretty=true"

Example Response

    "auditAuthorizationSuccess": false,
    "auditFilter": "{\n  \"atype\": \"authenticate\",\n  \"param\": {\n    \"user\": \"auditAdmin\",\n    \"db\": \"admin\",\n    \"mechanism\": \"SCRAM-SHA-1\"\n  }\n}",
    "configurationType": "FILTER_JSON",
    "enabled": true