Navigation

Get One Organization Event

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 /orgs/{ORG-ID}/events/{EVENT-ID}
Path ElementRequired/OptionalDescription
ORG-IDRequiredThe unique identifier for the organization whose events you want to retrieve. Use the /orgs endpoint to retrieve all organizations to which the authenticated user has access.
EVENT-IDRequiredThe unique identifier for the event which you want to retrieve.

The following query parameters are optional:

Query ParameterTypeDescriptionDefault
prettybooleanDisplays response in a prettyprint format.false
envelopebooleanSpecifies whether or not to wrap the response in an envelope.false
includeRawboolean

Specifies whether to include the raw document in the output. The raw document contains additional meta information about the event.

Important With Circle IconCreated with Sketch.Important

The values in the raw document are subject to change. Do not rely on raw values for formal monitoring.

false

This endpoint does not use HTTP request body parameters.

NameTypeDescription
alertIdstringUnique identifier for the alert associated to the event.
alertConfigIdstringUnique identifier for the alert configuration associated to the alertId.
apiKeyIdstringUnique identifier for the API Key that triggered the event. If this field is present in the response, Atlas does not return the userId field.
collectionstringName of the collection on which the event occurred. This field can be present when the eventTypeName is either DATA_EXPLORER or DATA_EXPLORER_CRUD.
createddateISO 8601-formatted UTC date when the event occurred.
currentValuedocumentDescribes the value of the metricName at the time of the event.
currentValue.numberintThe value of the metricName at the time of the event.
currentValue.unitsstring

The unit of measurement of the currentValue.number.

Possible values are:

  • RAW
  • BITS
  • BYTES
  • KILOBITS
  • KILOBYTES
  • MEGABITS
  • MEGABYTES
  • GIGABITS
  • GIGABYTES
  • TERABYTES
  • PETABYTES
  • MILLISECONDS
  • SECONDS
  • MINUTES
  • HOURS
  • DAYS
databasestringName of the database on which the event occurred. This field can be present when the eventTypeName is either DATA_EXPLORER or DATA_EXPLORER_CRUD.
eventTypeNamestring

The type of event.

Possible values are:

Alert TargetCondition
Backup
CPS_SNAPSHOT_SUCCESSFUL
Snapshot taken successfully
CPS_SNAPSHOT_FALLBACK_SUCCESSFUL
Fallback snapshot taken
CPS_SNAPSHOT_FALLBACK_FAILED
Fallback snapshot failed
CPS_SNAPSHOT_BEHIND
Snapshot schedule fell behind
CPS_RESTORE_FAILED
Backup restore failed
CPS_RESTORE_SUCCESSFUL
Backup restore succeeded
CPS_SNAPSHOT_DOWNLOAD_REQUEST_FAILED
Snapshot download request failed
Billing
CREDIT_CARD_ABOUT_TO_EXPIRE
Credit card is about to expire
PENDING_INVOICE_OVER_THRESHOLD
Monthly pending invoice ($) total is...
DAILY_BILL_OVER_THRESHOLD
Daily amount billed ($) is...
Encryption Key
AWS_ENCRYPTION_KEY_NEEDS_ROTATION
AWS encryption key elapsed time since last rotation is...
AZURE_ENCRYPTION_KEY_NEEDS_ROTATION
Azure encryption key elapsed time since last rotation is...
GCP_ENCRYPTION_KEY_NEEDS_ROTATION
GCP encryption key elapsed time since last rotation is...
Host
HOST_DOWN
Host is down
OUTSIDE_METRIC_THRESHOLD
Metric occurred outside of the metric threshold. See View Cluster Metrics.
Project
USERS_WITHOUT_MULTIFACTOR_AUTH
Users do not have two-factor authentication enabled
Replica Set
PRIMARY_ELECTED
Replica set elected a new primary
NO_PRIMARY
Replica set has no primary
TOO_MANY_ELECTIONS
Number of election events is...
REPLICATION_OPLOG_WINDOW_RUNNING_OUT
Replication Oplog Window is...
Sharded Cluster
CLUSTER_MONGOS_IS_MISSING
Cluster is missing an active mongos
User
USER_ROLES_CHANGED_AUDIT
User had their role changed
JOINED_GROUP
User joined the project
REMOVED_FROM_GROUP
User left the project
USER_ROLES_CHANGED_AUDIT
User had their role changed
X.509
NDS_X509_USER_AUTHENTICATION_MANAGED_USER_CERTS_EXPIRATION_CHECK
X.509 User Authentication, Client Certificates Expiration Alert when days to expiration is...
NDS_X509_USER_AUTHENTICATION_CUSTOMER_CA_EXPIRATION_CHECK
X.509 User Authentication, Self-Managed CA Expiration Alert when days to expiration is...
groupIdstringThe unique identifier for the project in which the event occurred.
hostnamestringThe hostname of the Atlas host machine associated to the event.
idstringThe unique identifier for the event.
invoiceIdstringThe unique identifier of the invoice associated to the event.
isGlobalAdminbooleanIndicates whether the user who triggered the event is a MongoDB employee.
linksarrayOne or more links to sub-resources and/or related resources. The relation-types between URL s are explained in the Web Linking Specification.
metricNamestringThe name of the metric associated to the alertId.
opTypestringType of operation that occurred. This field is present when the eventTypeName is either DATA_EXPLORER or DATA_EXPLORER_CRUD.
orgIdstringThe unique identifier for the organization in which the event occurred.
paymentIdstringThe unique identifier of the invoice payment associated to the event.
portintThe port on which the mongod or mongos listens.
publicKeystringPublic key associated with the API Key that triggered the event. If this field is present in the response, Atlas does not return the username field.
rawdocument

Additional meta information about the event. This field only appears when the includeRaw query parameter is true.

Important With Circle IconCreated with Sketch.Important

The values in the raw document are subject to change. Do not rely on raw values for formal monitoring.

remoteAddressstringIP address of the userId Atlas user who triggered the event.
replicaSetNamestringThe name of the replica set associated to the event.
shardNamestringThe name of the shard associated to the event.
targetPublicKeystringThe public key of the API Key targeted by the event.
targetUsernamestringThe username for the Atlas user targeted by the event.
teamIdstringThe unique identifier for the Atlas team associated to the event.
userIdstringThe unique identifier for the Atlas user who triggered the event. If this field is present in the response, Atlas does not return the apiKeyId field.
usernamestringThe username for the Atlas user who triggered the event. If this field is present in the response, Atlas does not return the publicKey field.
whitelistEntrystringThe white list entry of the API Key targeted by the event.
curl --user "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest --include \
--header "Content-Type: application/json" \
"https://cloud.mongodb.com/api/atlas/v1.0/orgs/5b478b3afc4625789ce616a3/events/5b48f4d2d7e33a1c0c60597e"
{
"created": "2018-06-19T15:06:15Z",
"eventTypeName": "JOINED_ORG",
"id": "5b48f4d2d7e33a1c0c60597e",
"isGlobalAdmin": false,
"links": [
{
"href": "https://cloud.mongodb.com/api/atlas/v1.0/orgs/5b478b3afc4625789ce616a3",
"rel": "http://mms.mongodb.com/org"
},
{
"href": "https://cloud.mongodb.com/api/atlas/v1.0/users/6b610e1087d9d66b272f0c86",
"rel": "http://mms.mongodb.com/user"
},
{
"href": "https://cloud.mongodb.com/api/atlas/v1.0/orgs/5b478b3afc4625789ce616a3/events/5b48f4d2d7e33a1c0c60597e",
"rel": "self"
}
],
"orgId": "5b478b3afc4625789ce616a3",
"remoteAddress": "198.51.100.64",
"targetUsername": "j.doe@example.com",
"userId": "6b610e1087d9d66b272f0c86",
"username": "j.doe@example.com"
}
Give Feedback