Hey everyone,
We’ve added two new API endpoints and a minor tweak to an existing one for everybody to use.
-
File upload endpoint: POST to /api/v1/upload
Request: { “filename”: string, “content_type”: string, “data”: string (base64) }
Example: { “filename”: “Test.txt”, “content_type”: “text/plain”, “data”: “VGVzdCBkYXRh”}
Response: { “url”: “URL to access file” } -
Document versioning: reading a document now gives you the “version” (long integer) field, which can be used with the next API endpoint to determine if a document has changed.
-
Document check for updates endpoint: POST to /api/v1/doc/check_for_updates
Request: { “file_ids”: [ array of string ] }
Response: { “versions”: { map of file_id (string) to version number (long integer) } }
Note: any inaccessible document or non-existent document will simply be dropped and not show up in the response.
The API documentation site has not YET been updated, we’ll make a deployment to the site in the next few days with the new documentation.
Let me know if you guys run into problems with any of these new endpoints.