Files

Get download url for a file

Changed on

Returns a presigned download URL for the current version of the file, or for a specific version when 'versionId' is supplied. The URL is valid for 1 hour. The response 'Content-Disposition' uses the file name and extension.

get/matters/{matterId}/documents/files/{fileId}/download

Request

  • Base URL
    https://api.smokeball.com
  • URL
    https://api.smokeball.com/matters/{matterId}/documents/files/{fileId}/download
  • Auth
    API key in header x-api-key and API key in header Authorization

Path parameters

matterIdstring required

Unique identifier (GUID) of the matter.

fileIdstring required

Unique identifier (GUID) of the file.

Query parameters

versionIdstring

Optional. Unique identifier of the file version to download. Must be a version of this file. Defaults to the current version.

Response

When request is successful. Returns a 'DownloadFileInfo' object.

fileIdstring nullable

Unique identifier of the requested file

namestring nullable

Name of the file, excluding file extension.

fileExtensionstring nullable

Extension of the file.

downloadUrlstring nullable

Temporary presigned URL to download the file content with an HTTP GET request. Valid for 1 hour from the time of the API call (see Expiry).

expirystring date-time

UTC date/time when the download link is no longer accessible (1 hour after issue)

sizeBytesinteger

Size of the content behind DownloadUrl (in bytes). For the extracted text endpoint this is the size of the extracted text, not of the original file.

Example response

{
  "fileId": "b471682e-fa17-4e46-b7fe-9b2b8fdcb3c2",
  "name": "court filing",
  "fileExtension": ".pdf",
  "downloadUrl": "https://example-bucket.s3.amazonaws.com/files/2f1c9a3e-6b1d-4c7e-9a0f-1d2e3f4a5b6c?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=3600&X-Amz-Signature=...",
  "expiry": "2022-04-23T14:30:00Z",
  "sizeBytes": 19104768
}

Changes

    • breaking

      the response's body type changed from object to string for status

    • breaking

      the response's body type changed from object to string for status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status