question

exonintrendo avatar image
exonintrendo asked

Changes API - deleted nodes

The changes API returns all changed nodes from the last checkpoint. If I save a checkpoint and make an API call, it should return a data structure with the changes since the last checkpoint. If I upload a node, the new node appears in the data structure. If I delete the node, its status is updated to 'TRASH' (from 'AVAILABLE'). However, if I permanently delete a node, nothing is returned. Is there a way to determine which nodes are no longer available at all remotely? Or would I have to run a full refresh (call the changes API starting with no checkpoint) to determine what is no longer there?
amazon drive
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

yadayada avatar image
yadayada answered
The deleted nodes have a 'PURGED' status. Use the 'includePurged' parameter to get them.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

exonintrendo avatar image
exonintrendo answered
It looks like this is a separate API call correct? The docs say that it will include purged items 'as well', however, if I run a call against changes with no checkpoint and includePurged = true, then nothing is returned. Is this right?
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

yadayada avatar image
yadayada answered
You should get a list of your available and trashed nodes and purged ones as well. The parameter must be passed in the body. This is what a purged node should look like: { "createdBy": "DriveAPI-AQ5N1A1KOV6RX", "createdDate": "2015-04-04T10:50:39.436Z", "eTagResponse": "cWZxgGr-auI", "id": "ieIjSUTQRQOGU7w5wYX7-A", "isShared": false, "kind": "FILE", "labels": [], "modifiedDate": "2015-04-04T10:52:31.080Z", "name": "win81.vdi", "parents": [ "PHwiEv53QOKoGFGqYNl8pw" ], "properties": { "CloudDrive": { "s3_bucket": "cd-na-prod-content", "s3_storageKey": "XHJY3YJGHTUZENXLPGJYSP8RESIFCGTNYGR5F0QNSF8JZCDYYZ" } }, "restricted": false, "status": "PURGED", "version": 2 }
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

exonintrendo avatar image
exonintrendo answered
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.