API is designed to be simple, easy to use and will provide access to most of the features of digitalbucket.net. Accessing the API would be through REST (Representational State Transfer) methods.
User’s user name and password are provided in the HTTP User-Authentication header. The User-Authentication header must be send with each request. To prevent the user name and password being read directly by a person, they are encoded as a sequence of base-64 characters before transmission. For example, the user name "Aladdin" and password "open sesame" would be combined as "Aladdin:open sesame" – which is equivalent to QWxhZGRpbjpvcGVuIHNlc2FtZQ== when encoded in base-64.
All communication is carried out over standard HTTP. Each API method has its own URI and parameters are assigned in the query string. Here is an example of a standard API call:
https://www.digitalbucket.net/api/rest/getrootfolder.axd GET /api/rest/getrootfolder.axd Host: www.digitalbucket.net Accept: */* Accept-Language: en-us,en;q=0.5 User-Authentication: QWxhZGRpbjpvcGVuIHNlc2FtZQ== Connection: close
Every call to the API will have the appropriate status code set in the response. If the operation is successful it will return status code 200 with related data in the response body. If operation was not successful a 4xx or 5xx status code would be returned. The status codes are based on HTTP RFC. The response body of each API call (except Get File method) is an xml envelope that differes based on the call. You can find a list of possible responses for each method in this document.