perkeep/doc/protocol/discovery.txt

58 lines
1.6 KiB
Plaintext
Raw Normal View History

Discovery is the process of asking the server for its configuration.
You send the discovery HTTP request to the URL the user has
configured. If the user hasn't specified a path, use "/".
Then make a GET request to that URL with either Accept header set to
"text/x-camli-configuration" or the the URL query parameter
"camli.mode" set to "config":
GET /some/user/?camli.mode=config HTTP/1.1
Host: camlihost.example.com
Or:
GET / HTTP1.1
Host: 127.0.0.1
Accept: text/x-camli-configuration
The response is a JSON document:
{
"blobRoot": "/bs-and-maybe-also-index/",
"directoryHelper": "/ui/tree/",
"downloadHelper": "/ui/download/",
"jsonSignRoot": "/sighelper/",
"ownerName": "The User Name",
"publishRoots": {},
"searchRoot": "/my-search/",
"signing": {
"publicKey": "/sighelper/camli/sha1-f72d9090b61b70ee6501cceacc9d81a0801d32f6",
"publicKeyBlobRef": "sha1-f72d9090b61b70ee6501cceacc9d81a0801d32f6",
"publicKeyId": "94DE83C46401800C",
"signHandler": "/sighelper/camli/sig/sign",
"verifyHandler": "/sighelper/camli/sig/verify"
},
"statusRoot": "/status/",
"storageGeneration": "231ceff7a04a77cdf881b0422ea733334eee3b8f",
"storageInitTime": "2012-11-30T03:34:47Z",
"syncHandlers": [
{
"from": "/bs/",
"to": "/index-mysql/",
"toIndex": true
},
{
"from": "/bs/",
"to": "/sto-s3/",
"toIndex": false
}
],
"thumbVersion": "2",
"uiRoot": "/ui/",
"uploadHelper": "/ui/?camli.mode=uploadhelper",
"wsAuthToken": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
TODO: document these more