dag-hammarskjold-library / dlx-rest

UNDHL Files and Metadata Manager
1 stars 1 forks source link

API endpoint for to pull out deleted records #1457

Open JoelleSciboz opened 3 months ago

JoelleSciboz commented 3 months ago

We use MongoDB Compass to pull out monthly reports of deleted records (auths and bibs). It would be great if we could use the ME API for thise:

Here is what we do:

Accessing MongoDB

Records history in MongoDB

Query MongoDB and export records history

  1. Query to get deleted records between date one and date two:

{'deleted.time': {$gte: ISODate('2023-09-01T00:00:00.000Z'), $lte: ISODate("2023-12-31T23:59:59.999Z")}}

  1. Query to get record created by a user {'created.user': {$eq: 'fekadeselassie'}}