Confirmed users
358
edits
No edit summary |
|||
Line 6: | Line 6: | ||
The storage server hosts a number of independent named '''collections''' for each user. Each collection is a key-value store whose contents can be atomically modified by the client. Each modification of a collection creates a new '''version''' with corresponding version identifier. | The storage server hosts a number of independent named '''collections''' for each user. Each collection is a key-value store whose contents can be atomically modified by the client. Each modification of a collection creates a new '''version''' with corresponding version identifier. | ||
== Authentication == | == Authentication == | ||
Line 15: | Line 14: | ||
* a short-lived id/key pair that can be used to authenticate subsequent requests with Hawk | * a short-lived id/key pair that can be used to authenticate subsequent requests with Hawk | ||
* a URL to which further requests should be directed | * a URL to which further requests should be directed | ||
You can think of this as establishing a "login session" with the server, although we're also tunneling some basic metadata in order to reduce the number of round-trips. | You can think of this as establishing a "login session" with the server, although we're also tunneling some basic metadata in order to reduce the number of round-trips. | ||
Line 42: | Line 42: | ||
The base_url may include a unique identifier for the user, in order to improve RESTful-icity of the API. Or it might point the client to a specific data-center which houses their write master. It's opaque to the client. | The base_url may include a unique identifier for the user, in order to improve RESTful-icity of the API. Or it might point the client to a specific data-center which houses their write master. It's opaque to the client. | ||
== Data Access == | == Data Access == | ||
The client now makes Hawk-authenticated requests to the storage API under its assigned base_url. The following operations are available. | The client now makes Hawk-authenticated requests to the storage API under its assigned base_url. The following operations are available. | ||
=== GET <base-url> === | === GET <base-url> === | ||
Line 65: | Line 63: | ||
< } | < } | ||
< } | < } | ||
=== GET <base-url>/<collection> === | === GET <base-url>/<collection> === | ||
Line 79: | Line 76: | ||
< "version": <version id for this collection> | < "version": <version id for this collection> | ||
< } | < } | ||
=== GET <base-url>/<collection>/<version> === | === GET <base-url>/<collection>/<version> === | ||
Line 151: | Line 147: | ||
* We can't generate a delta from the specified "from" version to the request version | * We can't generate a delta from the specified "from" version to the request version | ||
* The specified "from" version is invalid (e.g. due to lost writes during a rollback) | * The specified "from" version is invalid (e.g. due to lost writes during a rollback) | ||
=== POST <base-url>/<collection>/<version> === | === POST <base-url>/<collection>/<version> === |