Batch FileHandle and File URL Services
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 |
Related Issues
- - PLFM-4050Getting issue details... STATUS
- - PLFM-4051Getting issue details... STATUS
- - SWC-3280Getting issue details... STATUS
- - PLFM-3794Getting issue details... STATUS
Download Audit Record
For each file included in the results, an audit record will capture the following data:
- FileHandleId
- AssociatedObjectId
- AssociatedObjectType
- UserId
- Timestamp
Object Model
Rest API
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. |