Using the NetWorker rest API, I am able to retrieve the backups using the GET /backups method. However, it seems that the output will contain all the backups in the database.
I would like to be able to "filter by date", i.e. only get the backup since last time I made the call. So I would like to be able to filter, say, on the backup creation date being more recent than a certain date.
The REST API reference doesn't hint at any filtering capabilities. However, the REST API Getting Started guide clearly indicates that filtering exists. It gives a few examples to filter on fields ("Viewing only selected fields for all clients") or to filter on field values ("Searching for clients"). But the filter query feature doesn't seem to be specified.
Does anybody know how to filter on the backup creation date being before or after an arbitrary date?
As I said in previous thread, didn't try it, but by looking quickly at docs, would something like GET /nwrestapi/v2/global/Backup?fl=clientHostname,name,level&q=creationTime:>=MM/DD/YYYY make sense?
It makes sense of course and I tried it but it looks like queries only expect a ":"
Also, I could try many formats for specifying the date and miss the only one that would (possibly) be allowed so I am hoping someone at EMC would know how to do it and give an example.
I was working with the NetWorker 9.2 REST-API today and figured out the following solution to the date filtering on the backups endpoint:
https://networker-server-hostname:9090/nwrestapi/v3/global/backups?q=saveTime:['2019-01-01T10:00:00' TO '2019-01-01T10:15:00']
Make sure not to forget the qoutes around the dates.
Stefan Schröder/Schmitz RZ Consult GmbH
BACKUP EAGLE Reporting for NetWorker/www.backup-eagle.com