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

no edit summary
(New page: = Weave 0.3 API = Release Date: TBD = Weave Basic Object (WBO) = A Weave Basic Object is the generic wrapper around all items passed into and out of the Weave server. The Weave Basic Obje...)
 
No edit summary
Line 4: Line 4:
= Weave Basic Object (WBO) =
= Weave Basic Object (WBO) =
A Weave Basic Object is the generic wrapper around all items passed into and out of the Weave server. The Weave Basic Object has the following fields:
A Weave Basic Object is the generic wrapper around all items passed into and out of the Weave server. The Weave Basic Object has the following fields:


{| width="100%" cellpadding="3"
{| width="100%" cellpadding="3"
|- style="background-color: #efefef;"
|- style="background-color: #efefef;"
| style="background-color: #efefef;" | '''Parameter'''
| style="background-color: #efefef;" | '''Parameter'''
| style="background-color: #efefef; width: 160px" | '''Default'''  
| style="background-color: #efefef; width: 100px" | '''Default'''  
| '''Description'''
| '''Description'''
|- valign="top"
|- valign="top"
Line 37: Line 36:
payload (required) - The (possibly encrypted) JSON structure encapsualting the data of the record. This structure is defined separately for each WBO type.
payload (required) - The (possibly encrypted) JSON structure encapsualting the data of the record. This structure is defined separately for each WBO type.
|}
|}
== Sample: ==
<pre>
{
"type": ["object", "cryptowrapper"],
"id": "B1549145-55CB-4A6B-9526-70D370821BB5",
"parent": "88C3865F-05A6-4E5C-8867-0FAC9AE264FC",
"modified": "2454725.98283",
"encrytpion: "http://server/prefix/version/user/crypto-meta/B1549145-55CB-4A6B-9526-70D370821BB5",
"encoding": "shift-JIS",
"payload": "a89sdmawo58aqlva.8vj2w9fmq2af8vamva98fgqamff..."
}
</pre>
= URL Semantics =
{| width="100%" cellpadding="3"
|- style="background-color: #efefef;"
| '''Term'''
| '''Description'''
|- valign="top"
| server
| The name of the Weave server.
|- valign="top"
| prefix
| Any added path prefix that defines the Weave namespace on that server.
|- valign="top"
| version
| The Weave API version.
|- valign="top"
| user
| The userid of the Weave user.
|- valign="top"
| collection
| A defined grouping of objects into a set. All basic objects will be a member of one collection, and it will be the access point for those objects.
|- valign="top"
| id
| The Weave Basic Object id.
|- valign="top"
| timestamp
| A Julian date.
|}
A WBO will always be accessible at the following URL. All URLs will have REST semantics:
https://''server''/''prefix''/''version''/''user''/''collection''/''id''
'''GET''': Retrieve the object.
<br>'''PUT''': Add/update the object.
<br>'''DELETE''': Delete the object.
Other URLs will allow for structured access. All these support the 'start' and 'limit' parameters to allow for pagination:
https://''server''/''prefix''/''version''/''user''/''collection''
'''GET''': Returns a list of ids associated with the collection.
<br>'''PUT''': Takes an array of WBOs and adds/updates them within the collection. Identical to looping over a series of /id urls.
<br>'''DELETE''': Deletes all objects in this collection.
https://''server''/''prefix''/''version''/''user''/''collection''/parent/''id''
'''GET''': Returns a list of ids that are children of the specified id.
<br>'''PUT''': No applicable function.
<br>'''DELETE''': Deletes the object in the collection with this ID and all of its children.
https://''server''/''prefix''/''version''/''user''/''collection''/since/''timestamp''
'''GET''': Returns a list of ids modified within the collection since the timestamp given.
<br>'''PUT''': No applicable function.
<br>'''DELETE''': No applicable function.
http://server/prefix/version/user/collection/since/timestamp
canmove, Confirmed users
1,173

edits