When we added the Bulk File Download feature we set up security infrastructure to allow users to download any Synapse file using the following triple: FileHandleAssociation. This set the stage for building a new web-service that could replace the following calls with a single call:
API | Status | AssociationObjectId | AssociationObjectType |
---|---|---|---|
REPLACED | entityId | FileEntity | |
REPLACED | entityId | FileEntity | |
REPLACED | entityId | FileEntity | |
GET /entity/{id}/version/{versionNumber}/filehandles | REPLACED | entityId | FileEntity |
REPLACED | |||
REPLACED | |||
REPLACED | |||
GET /entity/{id}/table/column/{columnId}/row/{rowId}/version/{versionNumber}/file | REPLACED | entityId | TableEntity |
GET /entity/{id}/table/column/{columnId}/row/{rowId}/version/{versionNumber}/filepreview | |||
GET /team/{id}/icon | REPLACED | teamId | TeamAttachment |
REPLACED | userId | UserProfileAttachment | |
REPLACED | wikiId | WikiAttachment | |
REPLACED | wikiId | WikiAttachment | |
GET /evaluation/{ownerId}/wiki/{wikiId}/attachmentpreview | |||
REPLACED | wikiId | WikiAttachment | |
GET /access_requirement/{ownerId}/wiki2/{wikiId}/attachmenthandles | |||
REPLACED | wikiId | WikiAttachment | |
GET /access_requirement/{ownerId}/wiki2/{wikiId}/attachmentpreview | |||
REPLACED | wikiId | WikiMarkdown | |
REPLACED | messageId | MessageAttachment |
For each file included in the results, an audit record will capture the following data:
URL | Method | Request Body | Response Body | Authorization | Description |
---|---|---|---|---|---|
/filehandle/batch | POST | BatchFileRequest | BatchFileResult | Anyone | Call to request a batch of FileHandles, presignedUrls, or both. A FileResult will be unconditionally returned for each FileRequest. If the requested FileHandle does not exist then a failureCode=NOT_FOUND will be returned. If the caller is not authorized to download a requested file then a failurecode=UNAUTHORIZED will be returned. Returns status code: 201. Limit of 100 FileRequests per call. |