Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision |
dev:web_api:v3:syncing [2019/03/10 05:48] – dstillman | dev:web_api:v3:syncing [2019/03/10 16:57] – dstillman |
---|
=== Last-Modified-Version === | === Last-Modified-Version === |
| |
The ''Last-Modified-Version'' response header indicates the current version of either a library (for multi-object requests) or an individual object (for single-object requests). If changes are made to a library in a write request, the library's version number will be increased, any objects modified in the same request will be set to the new version number, and the new version number will be returned in the ''Last-Modified-Version'' header. Since modified objects always receive the newly increased library version, the returned ''Last-Modified-Version'' will be the same whether an item is modified as part of a multi-object or single-object request. | The ''Last-Modified-Version'' response header indicates the current version of either a library (for multi-object requests) or an individual object (for single-object requests). If changes are made to a library in a write request, the library's version number will be increased, any objects modified in the same request will be set to the new version number, and the new version number will be returned in the ''Last-Modified-Version'' header. |
| |
=== If-Modified-Since-Version === | === If-Modified-Since-Version === |
GET <userOrGroupPrefix>/items?since=<version>&format=versions&includeTrashed=1 | GET <userOrGroupPrefix>/items?since=<version>&format=versions&includeTrashed=1 |
| |
''<version>'' is the ''[[#last-modified-version|Last-Modified-Version]]'' returned from the API for the last successfully completed sync process, or ''0'' when syncing a library for the first time. | ''<version>'' is the final ''[[#last-modified-version|Last-Modified-Version]]'' returned from the API for the last successfully completed sync process, or ''0'' when syncing a library for the first time. |
| |
(The ''since'' parameter can also be used on ''.../tags'' requests (without ''format=versions'') by clients that don't download all items and wish to keep a list of all tags in a library up-to-date. It isn't necessary for clients that download all items to request updated tags directly, as item objects contain all associated tags.) | (The ''since'' parameter can also be used on ''.../tags'' requests (without ''format=versions'') by clients that don't download all items and wish to keep a list of all tags in a library up-to-date. It isn't necessary for clients that download all items to request updated tags directly, as item objects contain all associated tags.) |