FieldDB / FieldDB

An offline/online field database which adapts to its user's terminology and I-Language. http://fielddb.github.io
http://lingsync.org
79 stars 45 forks source link

Standardize the fielddb API #1045

Closed cesine closed 11 years ago

cesine commented 11 years ago

Read these about a RESTful Web service API:

then change the current API to something like this:

The right way to include pagination details today is using the Link header introduced by RFC 5988.

rate limiting to an API. RFC 6585 introduced a HTTP status code 429 Too Many Requests to accommodate this.

X-Rate-Limit-Limit - The number of allowed requests in the current period X-Rate-Limit-Remaining - The number of remaining requests in the current period X-Rate-Limit-Reset - The number of seconds left in the current period

the authentication credentials can be simplified to a randomly generated access token that is delivered in the user name field of HTTP Basic Auth. The great thing about this is that it's completely browser explorable - the browser will just popup a prompt asking for credentials if it receives a 401 Unauthorized status code from the server. OAuth 2 uses Bearer tokens & also depends on SSL for its underlying transport encryption.

http://qzaidi.github.io/2013/07/20/surprises/

cesine commented 10 years ago

http://api.lingsync.org

screen shot 2014-09-15 at 4 47 09 pm