cURL
curl --request GET \ --url https://api.example.com/{collection}/{id}/diff/{v1}/{v2}
{ "400": {}, "401": {}, "403": {}, "404": {}, "500": {}, "501": {}, "from_version": 123, "to_version": 123, "changes": [ { "field": "<string>", "from": "<any>", "to": "<any>" } ] }
Compare two versions and get the changes between them
GET /{collection}/{id}/diff/{v1}/{v2}
read
address.city
curl -X GET "https://api.example.com/employees/emp_12345/diff/1/3" \ -H "Authorization: Bearer <token>"
{ "from_version": 1, "to_version": 3, "changes": [ { "field": "department", "from": "Engineering", "to": "Marketing" }, { "field": "salary", "from": 70000, "to": 85000 }, { "field": "manager_id", "from": "mgr_001", "to": "mgr_002" }, { "field": "skills", "from": ["JavaScript", "React"], "to": ["JavaScript", "React", "Node.js"] } ] }
{ "field": "phone", "from": null, "to": "+1-555-0123" }
{ "field": "temporary_access", "from": true, "to": null }
{ "field": "status", "from": "active", "to": "inactive" }
{ "field": "address.city", "from": "San Francisco", "to": "New York" }
{ "field": "tags", "from": ["developer", "frontend"], "to": ["developer", "frontend", "lead"] }
[ { "field": "address.street", "from": "123 Main St", "to": "456 Oak Ave" }, { "field": "address.city", "from": "Boston", "to": "Seattle" } ]
from: null
to: null
{ "error": { "code": "BAD_REQUEST", "message": "v1 must be less than v2", "details": { "v1": 5, "v2": 3 } } }
{ "error": { "code": "VERSION_NOT_FOUND", "message": "One or both versions not found", "details": { "collection": "employees", "id": "emp_12345", "v1": 1, "v2": 99 } } }