canmove, Confirmed users
1,173
edits
No edit summary |
No edit summary |
||
Line 106: | Line 106: | ||
<br>'''DELETE''': No applicable function. | <br>'''DELETE''': No applicable function. | ||
http://server/prefix/version/user/collection/since/timestamp | http://server/prefix/version/user/collection/since/timestamp | ||
= Payloads = | |||
Payloads 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 Key == | |||
Public Key payloads must be unencrypted. Note that the key itself is still passphrase protected. | |||
*key_data (required) - the private key, passphrase encrypted. | |||
*public_key (required) - the URI to the public key associated with this private key. | |||
Sample Private Key payload: | |||
<pre> | |||
"payload": | |||
{ | |||
"type: "private_key", | |||
"key_data": "nviuwc023nd210o3idn120x283cm...", | |||
"public_key": "A24349145-5AB-2YX-9526" | |||
} | |||
</pre> | |||
== Public Key == | |||
Public Key objects must be unencrypted. | |||
*key_data (required) - the public key | |||
*private_key (required) - the URI to the private key associated with this public key. | |||
Sample Public Key payload: | |||
<pre> "payload": | |||
{ | |||
"type: "public_key", | |||
"key_data": "nviuwc023nd210o3idn120x283cm...", | |||
"private_key": "B24349145-5AB-2YX-9526" | |||
} | |||
</pre> | |||
== Cryptometa == | |||
Cryptometa objects (type: "cryptometa") must be unencrypted. | |||
*algorithm (required) - A hash, containing a "name" key and associated value, and any additional data required for the algorithm, such as "salt" or "iv". | |||
*keyring (required) - a hash in which the keys are URLs to publickey WERs and the values are the encryption string used with that key to encrypt this record. The keys may be fully qualified URLs, or relative to the id level (thus, just the id is acceptable) | |||
Sample crypto-meta payload: | |||
<pre> | |||
"payload": | |||
{ | |||
"type: "cryptometa", | |||
"algorithm": | |||
{ | |||
name: "aes-256-cbc", | |||
"salt": "234imasd9f8w23m7", | |||
"iv": "2w3kmv9821maz985" | |||
} | |||
"keyring": | |||
{ | |||
"B24349145-5AB-2YX-9526": "m29f2mnvwiecvnw0ev...", | |||
} | |||
} | |||
</pre> |