Entity Model
See Synapse scenarios Scenarios: File / Folder API for driving use cases for this design. An entity is an object that represents either a file or a folder. The attributes of file entities and folder entities are similar to the attributes of files and folders on a hard drive:
...
URL | HTTP type | Description |
---|---|---|
/entity/{enityId}/file | GET | Attempt to download the raw file currently associated with the current version of the Entity. Note: This call will result in a HTTP temporary redirect (307), to the real file URL if the caller meets all of the download requirements. |
/entity/{enityId}/filepreview | GET | Attempt to download the preview of the file currently associated with the current version of the Entity. Note: This call will result in a HTTP temporary redirect (307), to the real file URL if the caller meets all of the download requirements. |
/entity/{enityId}/filehandles | GET | Get the FileHandles of the file currently associated with the current version of the Entity. If a preview exists for the file then the handle of the preview and the file will be returned with this call. |
/entity/{entityId}/version/{versionNumber}/file | GET | Attempt to download the raw file of an entity for a given version number of the entity. Note: This call will result in a HTTP temporary redirect (307), to the real file URL if the caller meets all of the download requirements. |
/entity/{entityId}/version/{versionNumber}/filepreview | GET | Attempt to download preview of the file of an entity for a given version number of the entity. Note: This call will result in a HTTP temporary redirect (307), to the real file URL if the caller meets all of the download requirements. |
/entity/{entityId}/version/{versionNumber}/filehandles | GET | Get the FileHandles of the file associated with the given version number of the entity. If a preview exists for the file then the handle of the preview and the file will be returned with this call. |
See also: FileHandle API