API DocsRESTRemote file service

UploadRemoteFile

Upload a file attachment and return a remote file entry representing the attachment.

The following are example metadata for various MIME types. While providing metadata is optional, it can help optimize and customize how the attachment is rendered in the UI. Additionally, for metadata that includes a timestamp, it indicates when the attachment should start playing in the UI.

Video metadata

{
  "height": 0,
  "width": 0,
  "durationSeconds": 0,
  "timestamp": "1970-01-01T00:00:00Z"
}

Image metadata

{
  "height": 0,
  "width": 0
}

Audio metadata

{
  "durationSeconds": 0,
  "timestamp": "1970-01-01T00:00:00Z"
}
POST
/api/v0/remote-files/upload

Request Body

multipart/form-dataRequired

organizationId
Required
string

Organization ID

entityId
Required
string

Entity ID

entityType
Required
string

Entity Type

descriptionstring

File description

metadatastring

Optional JSON metadata for the file (valid JSON required)

file
Required
file

File to upload

Format: "binary"
curl -X POST "<API_URL>/api/v0/remote-files/upload" \
  -H "Authorization: Bearer <API_KEY>" \
  -F organizationId="string" \
  -F entityId="string" \
  -F entityType="string" \
  -F description="string" \
  -F metadata="string" \
  -F file="string"

OK

{
  "remoteFile": {
    "createdByUserId": "string",
    "createdDate": "2019-08-24T14:15:22Z",
    "description": "string",
    "entityId": "string",
    "entityType": "annotations",
    "fileContentEncoding": "string",
    "fileMimeType": "string",
    "fileName": "string",
    "fileSize": 0,
    "metadata": "string",
    "modifiedByUserId": "string",
    "modifiedDate": "2019-08-24T14:15:22Z",
    "organizationId": "string",
    "remoteFileId": "string",
    "storageKey": "string"
  }
}