Services/Sync/Server/Archived/0.3/API: Difference between revisions

Delete now takes GET extra parameters
m (three forgotten ", this looked awful!)
(Delete now takes GET extra parameters)
Line 103: Line 103:
'''GET''': Returns a list of ids associated with the collection.  
'''GET''': Returns a list of ids associated with the collection.  
<br>'''POST''': Takes a JSON array of WBOs and adds/updates them within the collection. Identical to doing a set of PUTs over /id urls. Returns a list of successfully stored objects (with modified timestamps) and failed ones.
<br>'''POST''': Takes a JSON array of WBOs and adds/updates them within the collection. Identical to doing a set of PUTs over /id urls. Returns a list of successfully stored objects (with modified timestamps) and failed ones.
<br>'''DELETE''': Deletes all objects in this collection.
<br>'''DELETE''': Deletes all objects in this collection (may be further refined by additional parameters below).


Note that a POST response will return a 200 even if some or all of the objects are invalid. The body will contain lists of successful and failed individual objects.
Note that a POST response will return a 200 even if some or all of the objects are invalid. The body will contain lists of successful and failed individual objects.
Line 109: Line 109:
If a wbo is submitted without a payload, the server will assume that the object contains metadata to be updated and will not touch fields that are not contained in the wbo object.
If a wbo is submitted without a payload, the server will assume that the object contains metadata to be updated and will not touch fields that are not contained in the wbo object.


Optional '''GET''' parameters:
Optional '''GET''' and '''DELETE''' parameters:
{| width="100%" cellpadding="3"
{| width="100%" cellpadding="3"
|- style="background-color: #efefef;"
|- style="background-color: #efefef;"
Line 125: Line 125:
|- valign="top"
|- valign="top"
| full
| full
| If defined, returns the full objects, rather than a group of ids.
| If defined, returns the full objects, rather than a group of ids. '''GET''' only
|- valign="top"
|- valign="top"
| limit
| limit
canmove, Confirmed users
1,173

edits