Skip to main content
BETA: This API is currently in BETA and is subject to change. Endpoints, request/response formats, and functionality may change without notice.
This API reference documents the endpoints for managing FileSets and Files in Domo. These endpoints allow you to upload, download, query, and manage Files and FileSets programmatically.

Get File by Path

Playground

Method: GET
Endpoint: /api/files/v1/filesets/{filesetId}/path?path={filePath}
Path Parameters:
  • filesetId (String, required): The ID of the FileSet.
Query Parameters:
  • path (String, required): The path to the File within the FileSet.
fetch('https://{instance}.domo.com/api/files/v1/filesets/{filesetId}/path?path={filePath}',
  {
    method: 'GET',
    headers: {
      'X-DOMO-Developer-Token': '<your-token-here>',
      'Content-Type': 'application/json',
    },
  },
)
  .then((response) => response.json())
  .then((result) => console.log(result))
  .catch((error) => console.error(`Error: ${error}`));
Response:
{
  "id": "00000000-0000-0000-0000-000000000001",
  "path": "rules.txt",
  "name": "rules.txt",
  "fileType": "TEXT",
  "contentType": "text/plain",
  "size": 12345,
  "hash": "fakehash00000000000000000000000000000000000000000000000000000000000001",
  "hashAlgorithm": "SHA_256_HEX",
  "downloadUrl": null,
  "created": "2025-01-01T00:00:00.000Z",
  "createdBy": 111111111,
  "connectorKey": null,
  "indexStatus": null,
  "indexReason": null
}

Get File by Id

Playground

Method: GET
Endpoint: /api/files/v1/filesets/{filesetId}/files/{fileId}
Path Parameters:
  • filesetId (String, required): The ID of the FileSet.
  • fileId (String, required): The ID of the file.
fetch('https://{instance}.domo.com/api/files/v1/filesets/{filesetId}/files/{fileId}',
  {
    method: 'GET',
    headers: {
      'X-DOMO-Developer-Token': '<your-token-here>',
      'Content-Type': 'application/json',
    },
  },
)
  .then((response) => response.json())
  .then((result) => console.log(result))
  .catch((error) => console.error(`Error: ${error}`));
Response:
{
  "id": "00000000-0000-0000-0000-000000000002",
  "path": "rules.txt",
  "name": "rules.txt",
  "fileType": "TEXT",
  "contentType": "text/plain",
  "size": 12345,
  "hash": "fakehash00000000000000000000000000000000000000000000000000000000000002",
  "hashAlgorithm": "SHA_256_HEX",
  "downloadUrl": "https://instance-name.domo.com/api/files/v1/filesets/00000000-0000-0000-0000-000000000010/files/00000000-0000-0000-0000-000000000002/download",
  "created": "2025-01-01T00:00:00.000Z",
  "createdBy": 111111111,
  "connectorKey": null,
  "indexStatus": null,
  "indexReason": null
}

Download File by Id

Playground

Method: GET
Endpoint: /api/files/v1/filesets/{filesetId}/files/{fileId}/download
Path Parameters:
  • filesetId (String, required): The ID of the FileSet.
  • fileId (String, required): The ID of the file.
fetch('https://{instance}.domo.com/api/files/v1/filesets/{filesetId}/files/{fileId}/download',
  {
    method: 'GET',
    headers: {
      'X-DOMO-Developer-Token': '<your-token-here>',
      'Content-Type': 'application/json',
    },
  },
)
  .then((response) => response.blob()) // Use.blob() for file downloads
  .then((blob) => {
    // Example: create a download link
    const url = window.URL.createObjectURL(blob);
    const a = document.createElement('a');
    a.href = url;
    a.download = 'filename.ext'; // Set desired file name
    document.body.appendChild(a);
    a.click();
    a.remove();
    window.URL.revokeObjectURL(url);
  })
  .catch((error) => console.error(`Error: ${error}`));
Response:
  • Returns the FileSet contents as a download (binary/text stream).

Query Files

Playground

Method: POST
Endpoint: /api/files/v1/filesets/{filesetId}/query
Description: Queries the Files and directories within a FileSet using a search query. Path Parameters:
ParameterTypeRequiredDescription
filesetIdStringYesThe ID of the FileSet
Request Body Parameters:
ParameterTypeRequiredDescription
queryStringYesText to search for in Files
directoryPathStringNoLimit search to a specific directory
topKIntegerNoMaximum number of results to return
// Example: Search for text in documents, limited to 5 results
fetch(`https://{instance}.domo.com/api/files/v1/filesets/${filesetId}/query`, {
  method: 'POST',
  headers: {
    'X-DOMO-Developer-Token': '<your-token-here>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    query: 'quarterly sales data', // Text to search for in files
    directoryPath: 'reports/quarterly', // Optional: Limit search to specific directory
    topK: 5, // Optional: Maximum number of results to return
  }),
})
  .then((response) => response.json())
  .then((result) => {
    console.log(`Found ${result.matches.length} matching files:`);
    result.matches.forEach((match) => {
      console.log(`- ${match.node.name} (Score: ${match.score})`);
    });
  })
  .catch((error) => console.error(`Error: ${error}`));
Response:
{
  "matches": [
    {
      "id": "00000000-0000-0000-0000-000000000003",
      "node": {
        "id": "00000000-0000-0000-0000-000000000003",
        "path": "reports/quarterly/Q2-2024-sales.pdf",
        "name": "Q2-2024-sales.pdf",
        "fileType": "FILE",
        "contentType": "application/pdf",
        "size": 12345,
        "created": 1718826000000,
        "type": "TEXT"
      },
      "score": 0.89
    },
    {
      "id": "00000000-0000-0000-0000-000000000004",
      "node": {
        "id": "00000000-0000-0000-0000-000000000004",
        "path": "reports/quarterly/Q1-2024-sales.pdf",
        "name": "Q1-2024-sales.pdf",
        "fileType": "FILE",
        "contentType": "application/pdf",
        "size": 10245,
        "created": 1712066400000,
        "type": "TEXT"
      },
      "score": 0.76
    }
  ]
}

Upload File

Playground

Method: POST
Endpoint: /api/files/v1/filesets/{filesetId}/files
Path Parameters:
  • filesetId (String, required): The ID of the FileSet.
// Prepare the file and metadata for upload
const formdata = new FormData();
formdata.append('file', fileInput.files[0], 'rules.txt');
formdata.append('createFileRequest', JSON.stringify({ directoryPath: '' }));


const requestOptions = {
  method: 'POST',
  headers: {
    'X-DOMO-Developer-Token': '<your-token-here>',
    // Note: Do not set Content-Type header; browser will set it automatically for FormData
  },
  body: formdata,
  redirect: 'follow',
};


fetch('https://{instance}.domo.com/api/files/v1/filesets/{filesetId}/files',
  requestOptions,
)
  .then((response) => response.json())
  .then((result) => console.log(result))
  .catch((error) => console.error(`Error: ${error}`));
Response:
{
  "id": "00000000-0000-0000-0000-000000000004",
  "path": "fab-rules.txt",
  "name": "fab-rules.txt",
  "fileType": "TEXT",
  "contentType": "text/plain",
  "size": 12345,
  "created": "2025-01-01T00:00:00.000Z",
  "createdBy": 111111111
}

Search Files in FileSet

Playground

Method: POST
Endpoint: /api/files/v1/filesets/{filesetId}/files/search
Description: Lists Files and directories within a FileSet, optionally filtered by directory path or other criteria. Path Parameters:
ParameterTypeRequiredDescription
filesetIdStringYesThe ID of the FileSet
Query Parameters:
ParameterTypeRequiredDefaultDescription
directoryPathStringNonullFilter Files by specific directory path
immediateChildrenBooleanNofalseIf true, returns only immediate children of directory
limitIntegerNo100Maximum number of results
nextStringNonullPagination token for fetching next set of results
Request Body Parameters:
ParameterTypeRequiredDescription
fieldSortArrayNoSort options for results. Array of FieldSort Objects.
filtersArrayNoFilter criteria for the search. Array of Filter Objects.
dateFiltersArrayNoDate-based filter criteria. Array of DateFilter Objects.
FieldSort Object Properties:
PropertyTypeDescription
fieldStringField name to sort by
orderStringSort direction: ‘ASC’ or ‘DESC’
DateFilter Object Properties:
PropertyTypeDescription
fieldStringField name for date filter (e.g., ‘created’)
startStringStart timestamp as ISO string
endStringEnd timestamp as ISO string
notBooleanIf true, inverts the date filter match
Note: The Filter, FieldSort, and DateFilter objects have the same structure as in the Search FileSets endpoint.
// Example 1: List all files in FileSet
fetch(`https://{instance}.domo.com/api/files/v1/filesets/${filesetId}/files/search`,
  {
    method: 'POST',
    headers: {
      'X-DOMO-Developer-Token': '<your-token-here>',
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({}),
  },
)
  .then((response) => response.json())
  .then((result) => console.log(result.files))
  .catch((error) => console.error(`Error: ${error}`));


// Example 2: Advanced search with directory path and filters
fetch(`https://{instance}.domo.com/api/files/v1/filesets/${filesetId}/files/search?directoryPath=reports&limit=20`,
  {
    method: 'POST',
    headers: {
      'X-DOMO-Developer-Token': '<your-token-here>',
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      // Sort by file name in ascending order
      fieldSort: [
        {
          field: 'name',
          order: 'ASC',
        },
      ],
      // Filter files by name
      filters: [
        {
          field: 'name',
          value: ['.pdf'],
          operator: 'LIKE',
          not: false,
        },
      ],
      // Filter files created in past 30 days
      dateFilters: [
        {
          field: 'created',
          start: new Date(Date.now() - 30 * 24 * 60 * 60 * 1000).toISOString(), // 30 days ago as ISO string
          end: new Date().toISOString(), // Current time as ISO string
        },
      ],
    }),
  },
)
  .then((response) => response.json())
  .then((result) => console.log(result.files))
  .catch((error) => console.error(`Error: ${error}`));
Response:
{
  "files": [
    {
      "id": "00000000-0000-0000-0000-000000000001",
      "path": "reports/quarterly-report.pdf",
      "name": "quarterly-report.pdf",
      "fileType": "FILE",
      "contentType": "application/pdf",
      "size": 234567,
      "hash": "hash123456789abcdef",
      "hashAlgorithm": "SHA_256_HEX",
      "downloadUrl": "https://instance.domo.com/api/files/v1/filesets/00000000-0000-0000-0000-000000000010/files/00000000-0000-0000-0000-000000000001/download",
      "created": "2024-06-15T00:00:00.000Z",
      "createdBy": 111111111
    },
    {
      "id": "00000000-0000-0000-0000-000000000002",
      "path": "reports/annual-report.pdf",
      "name": "annual-report.pdf",
      "fileType": "FILE",
      "contentType": "application/pdf",
      "size": 456789,
      "hash": "hash987654321fedcba",
      "hashAlgorithm": "SHA_256_HEX",
      "downloadUrl": "https://instance.domo.com/api/files/v1/filesets/00000000-0000-0000-0000-000000000010/files/00000000-0000-0000-0000-000000000002/download",
      "created": "2024-06-10T00:00:00.000Z",
      "createdBy": 111111111
    }
  ],
  "pageContext": {
    "next": "eyJpZCI6IjEyMzQ1Njc4OTAifQ=="
  }
}

Delete Files by Path

Playground

Method: DELETE
Endpoint: /api/files/v1/filesets/{filesetId}/path?path={filePath}
Path Parameters:
  • filesetId (String, required): The ID of the FileSet.
Query Parameters:
  • path (String, required): The path to the File within the FileSet.
fetch('https://{instance}.domo.com/api/files/v1/filesets/{filesetId}/path?path=rules.txt',
  {
    method: 'DELETE',
    headers: {
      'X-DOMO-Developer-Token': '<your-token-here>',
      'Content-Type': 'application/json',
    },
  },
)
  .then((response) => response.json())
  .then((result) => console.log(result))
  .catch((error) => console.error(`Error: ${error}`));
Response:
{
  "status": "success",
  "message": "File deleted successfully."
}

Delete File by Id

Playground

Method: DELETE
Endpoint: /api/files/v1/filesets/{filesetId}/files/{fileId}
Path Parameters:
  • filesetId (String, required): The ID of the FileSet.
  • fileId (String, required): The ID of the File.
fetch('https://{instance}.domo.com/api/files/v1/filesets/{filesetId}/files/{fileId}',
  {
    method: 'DELETE',
    headers: {
      'X-DOMO-Developer-Token': '<your-token-here>',
      'Content-Type': 'application/json',
    },
  },
)
  .then((response) => response.json())
  .then((result) => console.log(result))
  .catch((error) => console.error(`Error: ${error}`));
Response:
{
  "status": "success",
  "message": "File deleted successfully."
}

Search FileSets

Playground

Method: POST
Endpoint: /api/files/v1/filesets/search
Description: Searches for FileSets in your Domo instance using filters and criteria. Query Parameters:
ParameterTypeRequiredDefaultDescription
limitIntegerNo100Maximum number of results to return
offsetIntegerNo0Pagination offset
Request Body Parameters:
ParameterTypeRequiredDescription
fieldSortArrayNoSort options for results. Array of FieldSort Objects.
filtersArrayNoFilter criteria for the search. Array of Filter Objects.
dateFiltersArrayNoDate-based filter criteria. Array of DateFilter Objects.
Filter Object Properties:
PropertyTypeDescription
fieldStringField name to filter on (e.g., ‘name’, ‘description’)
valueArrayValues to match against
notBooleanIf true, inverts the filter match
operatorStringOperation type: ‘EQUALS’, ‘GREATER_THAN’, ‘LESS_THAN’, ‘LESS_THAN_OR_EQUAL’, ‘GREATER_THAN_OR_EQUAL’, ‘IN’, ‘IS_NULL’, ‘LIKE’
FieldSort Object Properties:
PropertyTypeDescription
fieldStringField name to sort by
orderStringSort direction: ‘ASC’ or ‘DESC’
DateFilter Object Properties:
PropertyTypeDescription
fieldStringField name for date filter (e.g., ‘created’)
startStringStart timestamp as ISO string
endStringEnd timestamp as ISO string
notBooleanIf true, inverts the date filter match
Note: To list all FileSets, send an empty object as the body. To filter, provide filter parameters in the body.
// Example 1: List all FileSets (empty search)
fetch('https://{instance}.domo.com/api/files/v1/filesets/search?limit=50&offset=0',
  {
    method: 'POST',
    headers: {
      'X-DOMO-Developer-Token': '<your-token-here>',
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({}),
  },
)
  .then((response) => response.json())
  .then((result) => console.log(result.fileSets))
  .catch((error) => console.error(`Error: ${error}`));


// Example 2: Advanced search with filters and sorting
fetch('https://{instance}.domo.com/api/files/v1/filesets/search', {
  method: 'POST',
  headers: {
    'X-DOMO-Developer-Token': '<your-token-here>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    // Sort by name in ascending order
    fieldSort: [
      {
        field: 'name',
        order: 'ASC',
      },
    ],
    // Filter FileSet by name containing "Marketing"
    filters: [
      {
        field: 'name',
        value: ['Marketing'],
        operator: 'LIKE',
        not: false,
      },
    ],
    // Filter FileSet created between two dates
    dateFilters: [
      {
        field: 'created',
        start: new Date('2024-06-01').toISOString(), // June 1, 2024 as ISO string
        end: new Date('2024-06-30').toISOString(), // June 30, 2024 as ISO string
      },
    ],
  }),
})
  .then((response) => response.json())
  .then((result) => console.log(result.fileSets))
  .catch((error) => console.error(`Error: ${error}`));
Response:
{
  "fileSets": [
    {
      "id": "00000000-0000-0000-0000-000000000010",
      "name": "Marketing Assets",
      "description": "Contains marketing assets for campaigns",
      "created": "2024-06-15T00:00:00.000Z",
      "createdBy": 111111111,
      "updated": "2024-06-20T00:00:00.000Z",
      "updatedBy": 111111111,
      "owner": "111111111",
      "permission": "OWNER",
      "fileCount": 25
    },
    {
      "id": "00000000-0000-0000-0000-000000000011",
      "name": "Marketing Reports",
      "description": "Marketing analysis and reports",
      "created": "2024-06-10T00:00:00.000Z",
      "createdBy": 111111111,
      "updated": "2024-06-18T00:00:00.000Z",
      "updatedBy": 111111111,
      "owner": "111111111",
      "permission": "OWNER",
      "fileCount": 12
    }
  ],
  "pageContext": {
    "offset": 0,
    "limit": 50,
    "total": 2
  }
}


with httpx.Client() as client:
    response = client.post(url, headers=headers, json=data)
    print(response.json())
Response:
{
  "id": "6fbf49f2-b1eb-4dd9-b1ea-4a477480965b",
  "name": "Unstructured",
  "description": "",
  "aiEnabled": true,
  "indexStatus": null,
  "batchType": "INCREMENTAL",
  "connector": "DOMO",
  "created": "2025-04-19T22:52:23.470150Z",
  "createdBy": 403368057,
  "updated": "2025-06-17T20:14:13.298781Z",
  "updatedBy": 403368057,
  "owner": "403368057",
  "accountId": 0,
  "connectorContext": null,
  "permission": "OWNER",
  "size": 730812,
  "fileCount": 2
}

Create FileSet

Playground

Method: POST
Endpoint: /api/files/v1/filesets
Request Body Parameters:
ParameterTypeRequiredDescription
nameStringYesThe name of the FileSet
accountIdIntegerNoThe account ID to associate (nullable)
connectorContextObjectNoConnector context for the FileSet (nullable). ConnectorContext Object.
descriptionStringNoDescription for the FileSet
ConnectorContext Object Properties:
PropertyTypeRequiredDescription
connectorStringYesThe connector key
relativePathStringNoRelative path for the connector (nullable)
fetch('https://{instance}.domo.com/api/files/v1/filesets', {
  method: 'POST',
  headers: {
    'X-DOMO-Developer-Token': '<your-token-here>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    name: 'Sample FileSet',
    description: 'A sample FileSet for demonstration purposes.',
    // accountId: 12345, // Optional
    // connectorContext: { connector: 'S3', relativePath: 'bucket/path' }, // Optional
  }),
})
  .then((response) => response.json())
  .then((result) => console.log(result))
  .catch((error) => console.error(`Error: ${error}`));
Response:
{
  "id": "00000000-0000-0000-0000-000000000012",
  "name": "Sample FileSet",
  "description": "A sample FileSet for demonstration purposes.",
  "created": "2025-01-01T00:00:00.000Z",
  "createdBy": 111111111
}

Get FileSet by Id

Playground

Method: GET Endpoint: /api/files/v1/filesets/{filesetId} Path Parameters:
  • filesetId (String, required): The ID of the FileSet.
fetch('https://{instance}.domo.com/api/files/v1/filesets/{filesetId}', {
  method: 'GET',
  headers: {
    'X-DOMO-Developer-Token': '<your-token-here>',
    'Content-Type': 'application/json',
  },
})
  .then((response) => response.json())
  .then((result) => console.log(result))
  .catch((error) => console.error(`Error: ${error}`));
Response:
{
  "id": "00000000-0000-0000-0000-000000000013",
  "name": "Sample FileSet",
  "description": "A sample FileSet for demonstration purposes.",
  "created": "2025-01-01T00:00:00.000Z",
  "createdBy": 111111111
}

Update FileSet by Id

Playground

Method: POST
Endpoint: /api/files/v1/filesets/{filesetId}
Path Parameters:
  • filesetId (String, required): The ID of the FileSet.
Request Body Parameters:
ParameterTypeRequiredDescription
nameStringNoThe new name for the FileSet
descriptionStringNoThe new description for FileSet
fetch('https://{instance}.domo.com/api/files/v1/filesets/{filesetId}', {
  method: 'POST',
  headers: {
    'X-DOMO-Developer-Token': '<your-token-here>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    name: 'Updated FileSet Name', // Optional: New name for the FileSet
    description: 'Updated description.', // Optional: New description
  }),
})
  .then((response) => response.json())
  .then((result) => console.log(result))
  .catch((error) => console.error(`Error: ${error}`));
Response:
{
  "id": "00000000-0000-0000-0000-000000000014",
  "name": "Sample FileSet",
  "description": "A sample FileSet for demonstration purposes.",
  "created": "2025-01-01T00:00:00.000Z",
  "createdBy": 111111111
}

Delete FileSet by Id

Playground

Method: DELETE
Endpoint: /api/files/v1/filesets/{filesetId}
Path Parameters:
  • filesetId (String, required): The ID of the FileSet.
fetch('https://{instance}.domo.com/api/files/v1/filesets/{filesetId}', {
  method: 'DELETE',
  headers: {
    'X-DOMO-Developer-Token': '<your-token-here>',
    'Content-Type': 'application/json',
  },
})
  .then((response) => response.json())
  .then((result) => console.log(result))
  .catch((error) => console.error(`Error: ${error}`));
Response:
{
  "status": "success",
  "message": "FileSet deleted successfully."
}