Navigation

Get Auditing Configuration for a Project

Info With Circle IconCreated with Sketch.Note

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.

Info With Circle IconCreated with Sketch.Note
Feature unavailable in Free and Shared-Tier Clusters

This feature is not available for M0 (Free Tier), M2, and M5 clusters. To learn more about which features are unavailable, see Atlas M0 (Free Tier), M2, and M5 Limitations.

The Atlas API authenticates using HTTP Digest Authentication. Provide a programmatic API public key and corresponding private key as the username and password when constructing the HTTP request.

To learn how to configure API access for an Atlas project, see Configure Atlas API Access.

https://cloud.mongodb.com/api/atlas/v1.0

GET /groups/{GROUP-ID}/auditLog
Path ElementRequired/OptionalDescription
GROUP-IDRequired.The unique identifier for the project.
FieldRequired/OptionalDescription
envelopeOptional.

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

Defaults to false.

prettyOptional.

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

Defaults to false.

This endpoint does not use HTTP request body parameters.

NameTypeDescription
auditAuthorizationSuccessbooleanIndicates whether the auditing system captures successful authentication attempts for audit filters using the "atype" : "authCheck" auditing event. For more information, see auditAuthorizationSuccess
auditFilterstringJSON-formatted audit filter used by the project
configurationTypestring

Denotes the configuration 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
enabledbooleanDenotes whether or not the project associated with the {GROUP-ID} has database auditing enabled.
curl -u "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--request GET "https://cloud.mongodb.com/api/atlas/v1.0/groups/{GROUP-ID}/auditLog?pretty=true"
{
"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
}
Give Feedback