Services/Sync/Server/Archived/0.3/API
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 Object has the following fields:
| Parameter | Default | Description |
| id | required | An identifying string. For a user, the id must be unique for a WBO within a collection, though objects in different collections may have the same ID. |
| type | none | A hint to the system as to the type of object contained in the WBO payload. |
| parentid | none | The id of a parent object in the same collection. This allows for the creation of hierarchical structures (such as folders). |
| modified | time submitted | The last-modified date, in Julian date format. |
| encryption | none | The URL of a Weave Encryption Record (WER) that defines how the payload is encrypted. No URL means that the payload is being sent unencrypted. |
| encoding | utf-8 | The character set of the decrypted payload.
payload (required) - The (possibly encrypted) JSON structure encapsualting the data of the record. This structure is defined separately for each WBO type. |
Sample:
{
"id": "B1549145-55CB-4A6B-9526-70D370821BB5",
"type": "bookmark",
"parentid": "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..."
}
URL Semantics
| Term | Description | ||||||||||||||||||||||||||||||||||||||||||||
| server | The name of the Weave server. | ||||||||||||||||||||||||||||||||||||||||||||
| prefix | Any added path prefix that defines the Weave namespace on that server. | ||||||||||||||||||||||||||||||||||||||||||||
| version | The Weave API version. | ||||||||||||||||||||||||||||||||||||||||||||
| user | The userid of the Weave user. | ||||||||||||||||||||||||||||||||||||||||||||
| 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. | ||||||||||||||||||||||||||||||||||||||||||||
| id | The Weave Basic Object id. | }
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.
Batch processing can be done with: https://server/prefix/version/user/collection GET: Returns a list of ids associated with the collection.
Optional parameters:
PayloadsPayloads are a hash with a required "type" key that defines the object type of the payload. Other keys will be required based on this type. Here are some defined Payload Structures: Bookmarks(needs defining) History(needs defining) Private KeyPublic Key payloads must be unencrypted. Note that the key itself is still passphrase protected.
Sample "payload":
{
"type: "private_key",
"key_data": "nviuwc023nd210o3idn120x283cm...",
"public_key": "A24349145-5AB-2YX-9526"
}
Public KeyPublic Key objects must be unencrypted.
Sample "payload":
{
"type: "public_key",
"key_data": "nviuwc023nd210o3idn120x283cm...",
"private_key": "B24349145-5AB-2YX-9526"
}
CryptometaCryptometa objects (type: "cryptometa") must be unencrypted.
Sample "payload":
{
"type: "cryptometa",
"algorithm":
{
name: "aes-256-cbc",
"salt": "234imasd9f8w23m7",
"iv": "2w3kmv9821maz985"
}
"keyring":
{
"B24349145-5AB-2YX-9526": "m29f2mnvwiecvnw0ev...",
}
}
|