Skip to content
Andreas Gohr edited this page Jan 29, 2018 · 20 revisions

This is the interesting API. The current endpoint is document-storage-production-dot-remarkable-production.appspot.com, but the Service Discovery should be used to make sure that the right one is used.

All requests should be made with a Bearer authentication header.

Listing Files

GET https://document-storage-production-dot-remarkable-production.appspot.com/document-storage/json/2/docs

The response is a JSON encoded array of file objects:

[{
	"ID": "10280264-2546-4319-a150-0cd02ca69c2d",
	"Version": 2,
	"Message": "",
	"Success": true,
	"BlobURLGet": "",
	"BlobURLGetExpires": "0001-01-01T00:00:00Z",
	"ModifiedClient": "2018-01-24T21:02:59.624624Z",
	"Type": "CollectionType",
	"VissibleName": "Projects",
	"CurrentPage": 0,
	"Bookmarked": false,
	"Parent": "6d6ad886-5d8d-4b3e-aa6f-b05d46d31e83"
},...]
  • ID the unique ID of this object
  • Version the version, increased on every open/edit/close cycle on the tablet
  • Message FIXME maybe filled when Success is false?
  • Success FIXME when is this false?
  • BlobURLGet FIXME probably the download URL, empty for the docs request
  • BlobURLGetExpires when above URL expires, always in the past for the docs request
  • ModifiedClient the last modified datetime
  • Type the type of the object
    • DocumentType for Notebooks
    • CollectionType for Folders
    • FIXME what else?
  • VissibleName the actual name. Yes, there is a typo in this key.
  • CurrentPage the currently open page, starting at 0
  • Bookmarked is this bookmarked?
  • Parent the ID of the parent object or empty if this is a top level object

Updating Meta-Data

PUT https://document-storage-production-dot-remarkable-production.appspot.com/document-storage/json/2/upload/update-status'

Payload is a JSON array as described under Listing Files. You can use this to 'move' or 'rename' an item. Since an array is passed, it might be possible to change multiple objects at once.

[{
    "Bookmarked": false,
    "ID": "1dd71dfc-a463-4317-9428-ece0bff128b9",
    "ModifiedClient": "2018-01-29T19:18:55.017017Z",
    "Parent": "",
    "Type": "CollectionType",
    "Version": 1,
    "VissibleName": "Folder"
}]

FIXME response?

Adding an Item

To create an item you create a minimal stub of the object first. The ID needs to be generated by yourself (a UUID-4). Since an array is passed, it might be possible to create multiple objects at once.

PUT https://document-storage-production-dot-remarkable-production.appspot.com/document-storage/json/2/upload/request
[{
    "ID": "1dd71dfc-a463-4317-9428-ece0bff128b9",
    "Parent": "",
    "Type": "CollectionType",
    "Version": 1
}]

The response is a typical item. But with the upload URL available.

[{
	"ID": "1dd71dfc-a463-4317-9428-ece0bff128b9",
	"Version": 1,
	"Message": "",
	"Success": true,
	"BlobURLPut": "https://storage.googleapis.com/remarkable-production-document-storage/user-auth0%7C5a68dc51cb30df3877a1d7c4/1dd71dfc-a463-4317-9428-ece0bff128b9?Expires=1517253532\u0026GoogleAccessId=remarkable-production%40appspot.gserviceaccount.com\u0026Signature=RklnAKXYxl6%2FEDXxAj%2B0d8W8IrqymHYeNZoPXEcHTGdjc1F0%2B8jsxsYFC7AVYVYG2yHt3R3ujTaWfaV1fa%2BX1MMjdLEjzsbhDv5F5HW3dJ4OHtllwBMi7HY8pEj%2FIO2c0PkY1vhfNuRriAhhPKVMm3Y17g7vdm%2Bcli90QtIvdh%2FlHfPh8OWhlZ%2BShH5fwEzNH%2Bs5EgUoq2YVqEOzWdPUclSPQGp9PbKQwJuKw7tTynjbfQCV%2FRFrh2zDn%2BK7Pci4CVCMjZCKfFqUThTxVmPEBLHtC%2F2oKWTOL4CQ8FQPtAWIPmL65zm7iGIlmfkTzu9BRpUov86QXds6tpSFSLcAmQ%3D%3D",
	"BlobURLPutExpires": "2018-01-29T19:18:52.854382809Z"
}]

The actual file contents can then be uploaded with a PUT request to the BlobURLPut URL.

After creating a new item, you can rename it as mentioned above.

Deleting an Item

Downloading a File

Clone this wiki locally