curl --request GET \
--url https://api.example.com/{collection}/{id}/versions{
"400": {},
"401": {},
"403": {},
"404": {},
"501": {},
"version": 123,
"updated_by": "<string>",
"updated_at": "<string>",
"change_reason": "<string>"
}Retrieve all versions of a document
curl --request GET \
--url https://api.example.com/{collection}/{id}/versions{
"400": {},
"401": {},
"403": {},
"404": {},
"501": {},
"version": 123,
"updated_by": "<string>",
"updated_at": "<string>",
"change_reason": "<string>"
}Retrieves a list of all versions for a specific document, including metadata about when each version was created and by whom.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/KTS-o7/permission-mongo/llms.txt
Use this file to discover all available pages before exploring further.
GET /{collection}/{id}/versions
read permission on the collection and access to the specific document.
curl -X GET "https://api.example.com/employees/emp_12345/versions" \
-H "Authorization: Bearer <token>"
[
{
"version": 3,
"updated_by": "user_789",
"updated_at": "2024-03-15T10:30:00Z",
"change_reason": "Updated salary information"
},
{
"version": 2,
"updated_by": "user_456",
"updated_at": "2024-02-20T14:22:00Z",
"change_reason": "Changed department"
},
{
"version": 1,
"updated_by": "user_123",
"updated_at": "2024-01-10T09:15:00Z"
}
]
_pm_versions collection with the following structure:
data fieldchanges array (version 1 is always full mode)full or diff){
"error": {
"code": "BAD_REQUEST",
"message": "Document ID is required"
}
}
{
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication required"
}
}
{
"error": {
"code": "FORBIDDEN",
"message": "You don't have permission to access this document",
"details": {
"action": "read",
"collection": "employees"
}
}
}
{
"error": {
"code": "DOCUMENT_NOT_FOUND",
"message": "Document not found",
"details": {
"collection": "employees",
"id": "emp_12345"
}
}
}
{
"error": {
"code": "VERSIONING_NOT_ENABLED",
"message": "Versioning is not enabled"
}
}
[] is returned