Files
Upload temporary file
Section titled “Upload temporary file”POST /api/file/temp
Upload a file to temporary storage. The returned tempFileName can be referenced when creating an entity via POST /api/entity.
Request
multipart/form-data with a single file field.
Response
{ "tempFileName": string // reference key for the temporary file}Upload file
Section titled “Upload file”POST /api/file
Upload a file and attach it to an entity.
Request
application/x-www-form-urlencoded (multipart form)
SubjectClassEntity class the file belongs toSubjectIDEntity ID the file belongs toTypeFile type (e.g.AttachedFile)FileThe file to upload
Response
A JSON object describing the created file entity.
Download file
Section titled “Download file”GET /api/file/{id}
Request
Path parameters
idFile ID
Response
The file content with appropriate Content-Type and Content-Disposition headers.
Download public file
Section titled “Download public file”GET /api/file/public/{id}
Anonymous. Download a file that has been marked as publicly accessible.
Request
Path parameters
idFile ID
Get file metadata
Section titled “Get file metadata”GET /api/file/{id}/meta
Request
Path parameters
idFile ID
Response
A JSON object with file metadata:
{ "id": string, "name": string, "mediaType": string, "size": number, "subjectClass": string, "subjectID": string, "type": string, "createdBy": string, "createdUtc": string}Get files for entity
Section titled “Get files for entity”GET /api/file/{eClass}/{id}
Get all files attached to an entity.
Request
Path parameters
eClassEntity classidEntity ID
Response
A JSON array of file metadata objects.
Delete file
Section titled “Delete file”DELETE /api/file/{id}
Request
Path parameters
idFile ID
Body
An audit event object with at least a report key:
{ "report": string, // reason for deletion (required) "content": string // optional additional content}