Skip to main content
Domo supports nearly 100 different file types across over 300 file extensions. Please reach out to Domo Support if you have a question about supported file types, as the list changes often.
Domo Bricks Domo Bricks do not support the Files API.

Upload a file

Uploading a new file can be accomplished through the following request. You will pass in the file to upload, and Domo will store it and generate a unique identifier for the file, which is returned to you.
Default Permissions The App Framework will automatically secure the file permissions so it can only be accessed by the same user who uploaded it, unless the public param is set to true. In that case, all users in the Domo instance will be able to access the file. File permissions can be updated to give access to specific users and groups, if needed. You can find out how to do that by reviewing the Update file permissions API.
Code Example
Query Parameters
Property NameTypeRequiredDescription
nameStringRequiredThe name to be given to the file in Domo
descriptionStringOptionalA description of the file
publicBooleanOptionalWhether the permissions of the file are set to public - this is false by default in the App Framework
HTTP Request
Request Body The request body is a JavaScript FormData() object that supports a multipart upload. The name given to the file to be appended to the FormData object is file. HTTP Response Returns the ID of the created file.

Upload a file revision

The Files API provides versioning support for files that have been uploaded. You may add another version of a file by sending a PUT request to the files endpoint referencing the dataFileId of the file you wish to revise. Code Example
Arguments
Property NameTypeRequiredDescription
dataFileIdIntegerRequiredThe id of the file of which you wish to upload a revision
HTTP Request
Request Body The request body is a javascript FormData() object which supports a multipart upload. The name given to the File that is to be appended to the FormData object is ‘file’. HTTP Response Returns the revision id of the uploaded revision file.

Get all files metadata

Each file that you upload has corresponding metadata. This endpoint allows you to list all the metadata for each file you have access to. If you want to limit the files to just those that you uploaded you can provide a limitToOwned boolean flag as a query parameter. Code Example
Arguments
Property NameTypeRequiredDescription
idsInteger ArrayOptionalAn array of File Ids that you wish to be returned if you only want a subset of files
expandString ArrayOptionalAn array of string properties that you wish to see additional details of (either revisions, metadata, or both)
limitToOwnedBooleanOptionalWhether or not to limit the result to only files that you uploaded
HTTP Request
HTTP Response Returns an array of file objects.

Get file metadata by ID


Given a known file ID, this endpoint allows you to list the metadata for that specific file. Code Example
Arguments
Property NameTypeRequiredDescription
expandStringOptionalAn array of string properties that you wish to see additional details of (either revisions, metadata, or both)
HTTP Request
HTTP Response Returns the file details object.

Download a file

Below is the basic request for downloading a file. Depending on the type of file, this endpoint can be referenced inline in your application or called via an HTTP request. In this example, the responseType of the XHR request is being set to blob so that our code can reference it as a binary large object when passing the response to the Download method. Code Example
Arguments
Property NameTypeRequiredDescription
dataFileIdIntegerRequiredThe id of the file you wish to download
revisionIdIntegerOptionalThe id of the file revision you wish to download
HTTP Request To download the current file version:
To download a previous version:
HTTP Response Returns the File to be downloaded.

Delete a file

Permanently deletes a File from your instance.
This is destructive and cannot be reversed. However, the delete does occur at the revision level, so if you unintentionally delete a file, the previous version will now be the current version of the file for a given file Id.
Code Example
Arguments
Property NameTypeRequiredDescription
dataFileIdIntegerRequiredThe id of the file you wish to delete
revisionIdIntegerOptionalThe id of the revision file you wish to delete
HTTP Request
HTTP Response Returns the parameter of success or error based on the file Id and the revisionId being valid.

Get file permissions


Code Example
Arguments
Property NameTypeRequiredDescription
dataFileIdIntegerRequiredThe id of the file you wish to get permission details for
HTTP Request
HTTP Response

Update file permissions

Code Example
Arguments
Property NameTypeRequiredDescription
dataFileIdIntegerRequiredThe id of the file you wish to update permission details for
HTTP Request
Request Body
HTTP Response Returns the parameter of success or error based on a valid permission object for the given file Id.

Multi-part Files API

The Multi-part Files API allows for efficient upload, update, and management of large files in parts. It uses Domo’s Data File Service, supporting session-based file chunking for fault tolerance and enhanced control.

Creating a Multi-part Upload Session

To begin a multi-part file upload, create an upload session by calling createSession. This will return a session ID that is essential for uploading file parts. Code Example
Parameters
  • name (String): The name of the file.
  • description (String): A description of the file.
  • contentType (String): The MIME type of the file.
Arguments
Property NameTypeRequiredDescription
nameStringRequiredThe name of the file
descriptionStringOptionalA description of the file
contentTypeStringRequiredThe MIME type of the file
HTTP Request
HTTP Response Returns the session ID.

Creating a Multi-part Upload Update Session

To update a multi-part file, create an update session by calling createUpdateSession and passing in the fileId. This will return a session ID that is essential for uploading file parts. Code Example
Parameters
  • name (String): The name of the file.
  • description (String): A description of the file.
  • contentType (String): The MIME type of the file.
Arguments
Property NameTypeRequiredDescription
fileIdLongRequiredThe id of the file you wish to update
nameStringRequiredThe name of the file
descriptionStringOptionalA description of the file
contentTypeStringRequiredThe MIME type of the file
HTTP Request
HTTP Response Returns the session ID.

Uploading File Parts

After creating a session, upload the file in chunks. Each chunk is sent with a unique index and can optionally include a checksum for verification. The checkSum is used to verify the integrity of the uploaded chunk. You can determine the chunk size manually, but a good recommended size is between 10MB and 100MB.
Parameters
  • sessionId (String): The session ID from createSession or createUpdateSession.
  • index (Number): Part number for ordering (1–10,000).
  • part (ArrayBuffer | String): File data chunk.
  • contentType (String): The content type of the chunk.
  • checkSum (String, optional): SHA-256 checksum for the chunk.
Arguments | Property Name | Type | Required | Description | | ------------- | ----------- | -------- | ------------------------------------------------------------ | --------------- | | sessionId | String | Required | The session ID from createSession or createUpdateSession | | index | Number | Required | Part number for ordering (1–10,000) | | part | ArrayBuffer | String | Required | File data chunk | | contentType | String | Required | The content type of the chunk | | checkSum | String | Optional | SHA-256 checksum for the chunk | HTTP Request
HTTP Response Returns the session ID.

Completing a Multi-part Upload

Once all parts are uploaded, finalize the process with complete:
Parameter
  • sessionId (String): The session ID to commit.
Arguments
Property NameTypeRequiredDescription
sessionIdStringRequiredThe session ID to commit
HTTP Request
HTTP Response Returns the session ID.

Error Handling and Retry Mechanism

If a part upload fails, a retry mechanism limits the attempts per chunk, aborting the session after a specified count.
Arguments
Property NameTypeRequiredDescription
sessionIdStringRequiredThe session ID to abort
HTTP Request
HTTP Response Returns the session ID.