Skip to content

History of a Document​

GET
/mongodb/collections/{collectionName}/documents/{documentId}/history

The audit records of a document of a collection declared with audit, newest first (2.3.0). For users who can read the document; administrators of the collection also get the history of deleted documents. 404 for a collection without audit.

Authorizations​

httpAuth
Type
HTTP (bearer)
or
httpAuth1
Type
HTTP (basic)
or
apiKeyAuth
Type
API Key (header: X-AUTH-APIKEY)

Parameters​

Path Parameters

collectionName*

The name of your MongoDb Collection

Type
string
Required
documentId*

DocumentId of the history

Type
string
Required

Query Parameters

rowsPerPage
Type
integer
Format
"int64"
page
Type
integer
Format
"int64"
extendedJson

relaxed (default), canonical or plain, as for the documents.

Type
string
Valid values
"relaxed""canonical""plain"

Responses​

application/json
JSON
[
  
{
  
  
"_id": "string",
  
  
"collection": "string",
  
  
"database": "string",
  
  
"documentId": "string",
  
  
"operation": "insert",
  
  
"user": "string",
  
  
"actedBy": "string",
  
  
"at": {
  
  
  
"additionalProperties": "string"
  
  
},
  
  
"before": {
  
  
  
"additionalProperties": "string"
  
  
},
  
  
"after": {
  
  
  
"additionalProperties": "string"
  
  
},
  
  
"summary": {
  
  
  
"additionalProperties": "string"
  
  
},
  
  
"expiresAt": {
  
  
  
"additionalProperties": "string"
  
  
},
  
  
"restoredFrom": "string"
  
}
]

Playground​

Authorization
Variables
Key
Value

Samples​

Powered by VitePress OpenAPI

Released under the MIT License.