What value actually need to provide {item-path} in view.delta OneDrive for Business API -
i using /drive/root:/{item-path}:/view.delta
getting changes of file in onedrive business in root folder. have tried path /drive/root:/files/filename:/view.delta
response resource not found. can please explain value ?
the link following below.
the error suggest /files/filename
not exist, if did you'd run limitation of how view.delta
works onedrive business. make long story short, it's limited working on root of drive, i.e. /drive/root/view.delta
. using path you'll changes items within drive, not 1 you're interested in.
given you're trying detect changes in single file may want consider standard metadata request if-none-match
header contains etag of last state application saw.
for example, you'd first make request without additional headers initial state:
request:
get /_api/v2.0/drive/root:/file/filename
response:
200 ok { ... "name": "filename", "etag": "\"aasdfasdf\"", "modifieddatetime": "2016-01-01t00:00:00z", ... }
at point in future you'd make call using etag value in if-none-match
header:
request:
get /_api/v2.0/drive/root:/file/filename if-none-match: "aasdfasdf"
response:
304 not modified
if file has changed you'd new response.
request:
get /_api/v2.0/drive/root:/file/filename if-none-match: "aasdfasdf"
response:
200 ok { ... "name": "filename", "etag": "\"poihklhjl\"", "modifieddatetime": "2016-04-19t00:00:00z", ... }
Comments
Post a Comment