> ## Documentation Index
> Fetch the complete documentation index at: https://domoinc-bradley-turek-pfilter-operators-reference.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# FileSet API

export const BetaNote = ({generic = false}) => <Note>
    <strong>Note:</strong>{" "}
    {generic ? "" : "This feature is in beta. "}
    Beta Program participants can enable features{" "}
    <a href="https://embed.domo.com/embed/pages/DQ8Ek">here</a>. To join the
    Beta Program, fill out{" "}
    <a href="https://embed.domo.com/embed/pages/K8GMx">this form</a>. For beta
    questions or feedback, email{" "}
    <a href="mailto:beta.admin@domo.com">beta.admin@domo.com</a>.
  </Note>;

<BetaNote />

This API reference documents the endpoints for managing FileSets and Files in Domo from within a Domo app.

<Note>
  **Note:** All code examples below are tested and match the working Domo app
  UI. Use `domo.*` methods for all API calls except File upload/download, which
  require `fetch` for binary or FormData support.
</Note>

***

## Get File by Path

**Method:** `GET`\
**Endpoint:** `/domo/files/v1/filesets/{filesetId}/path?path={filePath}`

**Path Parameters:**

| Parameter | Type   | Required | Description                             |
| --------- | ------ | -------- | --------------------------------------- |
| filesetId | String | Yes      | The ID of the FileSet                   |
| path      | String | Yes      | The path to the File within the FileSet |

<Tabs>
  <Tab title="Javascript (domo.get)">
    ```js theme={"dark"}
    domo
      .get(
        `/domo/files/v1/filesets/${filesetId}/path?path=${encodeURIComponent(
          filePath,
        )}`,
      )
      .then((result) => console.log(result))
      .catch((error) => console.error(`Error: ${error}`));
    ```
  </Tab>

  <Tab title="Javascript (fetch)">
    ```js theme={"dark"}
    fetch(
      `/domo/files/v1/filesets/${filesetId}/path?path=${encodeURIComponent(
        filePath,
      )}`,
    )
      .then((response) => response.json())
      .then((result) => console.log(result))
      .catch((error) => console.error(`Error: ${error}`));
    ```
  </Tab>
</Tabs>

**Response:**

```json theme={"dark"}
{
  "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

**Method:** `GET`\
**Endpoint:** `/domo/files/v1/filesets/{filesetId}/files/{fileId}`

**Path Parameters:**

| Parameter | Type   | Required | Description           |
| --------- | ------ | -------- | --------------------- |
| filesetId | String | Yes      | The ID of the FileSet |
| fileId    | String | Yes      | The ID of the File    |

<Tabs>
  <Tab title="Javascript (domo.get)">
    ```js theme={"dark"}
    domo
      .get(`/domo/files/v1/filesets/${filesetId}/files/${fileId}`)
      .then((result) => console.log(result))
      .catch((error) => console.error(`Error: ${error}`));
    ```
  </Tab>

  <Tab title="Javascript (fetch)">
    ```js theme={"dark"}
    fetch(`/domo/files/v1/filesets/${filesetId}/files/${fileId}`)
      .then((response) => response.json())
      .then((result) => console.log(result))
      .catch((error) => console.error(`Error: ${error}`));
    ```
  </Tab>
</Tabs>

**Response:**

```json theme={"dark"}
{
  "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": "/domo/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

**Method:** `GET`\
**Endpoint:** `/domo/files/v1/filesets/{filesetId}/files/{fileId}/download`

**Path Parameters:**

| Parameter | Type   | Required | Description           |
| --------- | ------ | -------- | --------------------- |
| filesetId | String | Yes      | The ID of the FileSet |
| fileId    | String | Yes      | The ID of the File    |

> **Note:** Use `fetch` for File downloads. `domo.get` does not support binary downloads.

<Tabs>
  <Tab title="Javascript (fetch)">
    ```js theme={"dark"}
    fetch(`/domo/files/v1/filesets/${filesetId}/files/${fileId}/download`)
      .then((response) => response.blob())
      .then((blob) => {
        const url = window.URL.createObjectURL(blob);
        const a = document.createElement("a");
        a.href = url;
        a.download = "downloaded-file"; // Set your filename
        document.body.appendChild(a);
        a.click();
        a.remove();
        window.URL.revokeObjectURL(url);
      })
      .catch((error) => console.error(`Error: ${error}`));
    ```
  </Tab>
</Tabs>

**Response:**

* Returns the File contents as a download (binary/text stream).

***

## Query Files

**Method:** `POST`\
**Endpoint:** `/domo/files/v1/filesets/{filesetId}/query`

**Path Parameters:**

| Parameter | Type   | Required | Description           |
| --------- | ------ | -------- | --------------------- |
| filesetId | String | Yes      | The ID of the FileSet |

**Request Body Parameters:**

| Parameter     | Type    | Required | Description                          |
| ------------- | ------- | -------- | ------------------------------------ |
| query         | String  | Yes      | Text to search for in Files          |
| directoryPath | String  | No       | Limit search to a specific directory |
| topK          | Integer | No       | Maximum number of results to return  |

<Tabs>
  <Tab title="Javascript (domo.post)">
    ```js theme={"dark"}
    domo
      .post(`/domo/files/v1/filesets/${filesetId}/query`, {
        query: "search for text in documents", // Required: 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((result) => console.log(result))
      .catch((error) => console.error(`Error: ${error}`));
    ```
  </Tab>

  <Tab title="Javascript (fetch)">
    ```js theme={"dark"}
    fetch(`/domo/files/v1/filesets/${filesetId}/query`, {
      method: "POST",
      headers: { "Content-Type": "application/json" },
      body: JSON.stringify({
        query: "search for text in documents", // Required: 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(result))
      .catch((error) => console.error(`Error: ${error}`));
    ```
  </Tab>
</Tabs>

**Response:**

```json theme={"dark"}
[
  {
    "id": "00000000-0000-0000-0000-000000000003",
    "path": "rules.txt",
    "name": "rules.txt",
    "fileType": "TEXT",
    "contentType": "text/plain",
    "size": 12345,
    "created": "2025-01-01T00:00:00.000Z",
    "createdBy": 111111111
  }
]
```

***

## Upload File

**Method:** `POST`\
**Endpoint:** `/domo/files/v1/filesets/{filesetId}/files`

**Path Parameters:**

| Parameter | Type   | Required | Description           |
| --------- | ------ | -------- | --------------------- |
| filesetId | String | Yes      | The ID of the FileSet |

> **Note:** Use `fetch` for file uploads. Always set the file content type to `text/plain` for text files, as in the app code.

<Tabs>
  <Tab title="Javascript (fetch)">
    ```js theme={"dark"}
    const file = fileInput.files[0];
    const formdata = new FormData();
    formdata.append(
      "file",
      new File([file], file.name, { type: "text/plain" }),
      file.name,
    );
    formdata.append("createFileRequest", JSON.stringify({ directoryPath: "" }));

    fetch(`/domo/files/v1/filesets/${filesetId}/files`, {
      method: "POST",
      body: formdata,
    })
      .then((response) => response.json())
      .then((result) => console.log(result))
      .catch((error) => console.error(`Error: ${error}`));
    ```
  </Tab>
</Tabs>

**Response:**

```json theme={"dark"}
{
  "id": "00000000-0000-0000-0000-000000000004",
  "path": "rules.txt",
  "name": "rules.txt",
  "fileType": "TEXT",
  "contentType": "text/plain",
  "size": 12345,
  "created": "2025-01-01T00:00:00.000Z",
  "createdBy": 111111111
}
```

***

## Search Files in FileSet

**Method:** `POST`\
**Endpoint:** `/domo/files/v1/filesets/{filesetId}/files/search`

**Path Parameters:**

| Parameter | Type   | Required | Description           |
| --------- | ------ | -------- | --------------------- |
| filesetId | String | Yes      | The ID of the FileSet |

**Query Parameters:**

| Parameter         | Type    | Required | Description                                                            |
| ----------------- | ------- | -------- | ---------------------------------------------------------------------- |
| directoryPath     | String  | No       | Filter Files by specific directory path                                |
| immediateChildren | Boolean | No       | If true, returns only immediate children of directory (default: false) |
| limit             | Integer | No       | Maximum number of results (default: 100)                               |
| next              | String  | No       | Pagination token for fetching next set of results                      |

**Request Body Parameters:**

| Parameter   | Type  | Required | Description                                              |
| ----------- | ----- | -------- | -------------------------------------------------------- |
| fieldSort   | Array | No       | Sort options for results. Array of FieldSort Objects.    |
| filters     | Array | No       | Filter criteria for the search. Array of Filter Objects. |
| dateFilters | Array | No       | Date-based filter criteria. Array of DateFilter Objects. |

**Filter Object Properties:**

| Property | Type    | Description                                                                 |
| -------- | ------- | --------------------------------------------------------------------------- |
| field    | String  | Field name to filter on (e.g., 'name', 'description')                       |
| value    | Array   | Values to match against                                                     |
| not      | Boolean | If true, inverts the filter match                                           |
| operator | String  | Operation type: 'EQUALS', 'GREATER\_THAN', 'LESS\_THAN', 'IN', 'LIKE', etc. |

**FieldSort Object Properties:**

| Property | Type   | Description                     |
| -------- | ------ | ------------------------------- |
| field    | String | Field name to sort by           |
| order    | String | Sort direction: 'ASC' or 'DESC' |

**DateFilter Object Properties:**

| Property | Type    | Description                                  |
| -------- | ------- | -------------------------------------------- |
| field    | String  | Field name for date filter (e.g., 'created') |
| start    | String  | Start timestamp as ISO string                |
| end      | String  | End timestamp as ISO string                  |
| not      | Boolean | If true, inverts the date filter match       |

<Tabs>
  <Tab title="Javascript (domo.post)">
    ```js theme={"dark"}
    // Example 1: List all files
    domo
      .post(`/domo/files/v1/filesets/${filesetId}/files/search`, {})
      .then((result) => console.log(result.files))
      .catch((error) => console.error(`Error: ${error}`));

    // Example 2: Advanced search with directory path and filters
    domo
      .post(
        `/domo/files/v1/filesets/${filesetId}/files/search?directoryPath=reports&limit=20`,
        {
          // Sort by file name in ascending order
          fieldSort: [
            {
              field: "name",
              order: "ASC",
            },
          ],
          // Filter files by name
          filters: [
            {
              field: "name",
              value: [".pdf"],
              operator: "LIKE",
            },
          ],
          // 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((result) => console.log(result.files))
      .catch((error) => console.error(`Error: ${error}`));
    ```
  </Tab>

  <Tab title="Javascript (fetch)">
    ```js theme={"dark"}
    // Example 1: List all files
    fetch(`/domo/files/v1/filesets/${filesetId}/files/search`, {
      method: "POST",
      headers: { "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(
      `/domo/files/v1/filesets/${filesetId}/files/search?directoryPath=reports&immediateChildren=true&limit=20`,
      {
        method: "POST",
        headers: { "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",
            },
          ],
          // 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}`));
    ```
  </Tab>
</Tabs>

**Response:**

```json theme={"dark"}
{
  "files": [
    {
      "id": "00000000-0000-0000-0000-000000000005",
      "path": "reports/quarterly-report.pdf",
      "name": "quarterly-report.pdf",
      "fileType": "FILE",
      "contentType": "application/pdf",
      "size": 234567,
      "created": "2025-06-15T00:00:00.000Z",
      "createdBy": 111111111
    }
  ],
  "pageContext": {
    "next": "eyJpZCI6IjEyMzQ1Njc4OTAifQ=="
  }
}
```

***

## Delete Files by Path

**Method:** `DELETE`\
**Endpoint:** `/domo/files/v1/filesets/{filesetId}/path?path={filePath}`

**Path Parameters:**

| Parameter | Type   | Required | Description                             |
| --------- | ------ | -------- | --------------------------------------- |
| filesetId | String | Yes      | The ID of the FileSet                   |
| filePath  | String | Yes      | The path to the File within the FileSet |

<Tabs>
  <Tab title="Javascript (domo.delete)">
    ```js theme={"dark"}
    domo
      .delete(
        `/domo/files/v1/filesets/${filesetId}/path?path=${encodeURIComponent(
          filePath,
        )}`,
      )
      .then((result) => {
        if (result === 1 || (result && result.status === "success")) {
          console.log("File deleted successfully.");
        } else {
          console.log(result);
        }
      })
      .catch((error) => console.error(`Error: ${error}`));
    ```
  </Tab>

  <Tab title="Javascript (fetch)">
    ```js theme={"dark"}
    fetch(
      `/domo/files/v1/filesets/${filesetId}/path?path=${encodeURIComponent(
        filePath,
      )}`,
      {
        method: "DELETE",
      },
    )
      .then((response) => response.json())
      .then((result) => {
        if (result === 1 || (result && result.status === "success")) {
          console.log("File deleted successfully.");
        } else {
          console.log(result);
        }
      })
      .catch((error) => console.error(`Error: ${error}`));
    ```
  </Tab>
</Tabs>

**Response:**

```json theme={"dark"}
{
  "status": "success",
  "message": "File deleted successfully."
}
```

***

## Delete File by Id

**Method:** `DELETE`\
**Endpoint:** `/domo/files/v1/filesets/{filesetId}/files/{fileId}`

**Path Parameters:**

| Parameter | Type   | Required | Description           |
| --------- | ------ | -------- | --------------------- |
| filesetId | String | Yes      | The ID of the FileSet |
| fileId    | String | Yes      | The ID of the File    |

<Tabs>
  <Tab title="Javascript (domo.delete)">
    ```js theme={"dark"}
    domo
      .delete(`/domo/files/v1/filesets/${filesetId}/files/${fileId}`)
      .then((result) => {
        if (result === 1 || (result && result.status === "success")) {
          console.log("File deleted successfully.");
        } else {
          console.log(result);
        }
      })
      .catch((error) => console.error(`Error: ${error}`));
    ```
  </Tab>

  <Tab title="Javascript (fetch)">
    ```js theme={"dark"}
    fetch(`/domo/files/v1/filesets/${filesetId}/files/${fileId}`, {
      method: "DELETE",
    })
      .then((response) => response.json())
      .then((result) => {
        if (result === 1 || (result && result.status === "success")) {
          console.log("File deleted successfully.");
        } else {
          console.log(result);
        }
      })
      .catch((error) => console.error(`Error: ${error}`));
    ```
  </Tab>
</Tabs>

**Response:**

```json theme={"dark"}
{
  "status": "success",
  "message": "File deleted successfully."
}
```

***

## Search FileSets

**Method:** `POST`\
**Endpoint:** `/domo/files/v1/filesets/search`

**Query Parameters:**

| Parameter | Type    | Required | Description                              |
| --------- | ------- | -------- | ---------------------------------------- |
| limit     | Integer | No       | Maximum number of results (default: 100) |
| offset    | Integer | No       | Pagination offset (default: 0)           |

> **Note:** To list all FileSets, send an empty object as the body. To filter, provide filter parameters in the body.

**Request Body Parameters:**

| Parameter   | Type  | Required | Description                                              |
| ----------- | ----- | -------- | -------------------------------------------------------- |
| fieldSort   | Array | No       | Sort options for results. Array of FieldSort Objects.    |
| filters     | Array | No       | Filter criteria for the search. Array of Filter Objects. |
| dateFilters | Array | No       | Date-based filter criteria. Array of DateFilter Objects. |

**Filter Object Properties:**

| Property | Type    | Description                                                                 |
| -------- | ------- | --------------------------------------------------------------------------- |
| field    | String  | Field name to filter on (e.g., 'name', 'description')                       |
| value    | Array   | Values to match against                                                     |
| not      | Boolean | If true, inverts the filter match                                           |
| operator | String  | Operation type: 'EQUALS', 'GREATER\_THAN', 'LESS\_THAN', 'IN', 'LIKE', etc. |

**FieldSort Object Properties:**

| Property | Type   | Description                     |
| -------- | ------ | ------------------------------- |
| field    | String | Field name to sort by           |
| order    | String | Sort direction: 'ASC' or 'DESC' |

**DateFilter Object Properties:**

| Property | Type    | Description                                  |
| -------- | ------- | -------------------------------------------- |
| field    | String  | Field name for date filter (e.g., 'created') |
| start    | String  | Start timestamp as ISO string                |
| end      | String  | End timestamp as ISO string                  |
| not      | Boolean | If true, inverts the date filter match       |

<Tabs>
  <Tab title="Javascript (domo.post)">
    ```js theme={"dark"}
    // Example 1: List all FileSets (empty search)
    domo
      .post("/domo/files/v1/filesets/search", {})
      .then((result) => console.log(result.fileSets))
      .catch((error) => console.error(`Error: ${error}`));

    // Example 2: Advanced search with filters and sorting
    domo
      .post("/domo/files/v1/filesets/search", {
        // Sort by name in ascending order
        fieldSort: [
          {
            field: "name",
            order: "ASC",
          },
        ],
        // Filter FileSet by name containing "Marketing"
        filters: [
          {
            field: "name",
            value: ["Marketing"],
            operator: "LIKE",
          },
        ],
        // Filter FileSet created between two dates
        dateFilters: [
          {
            field: "created",
            start: "2025-06-01T19:23:55.156Z", // June 1, 2024
            end: "2025-06-30T19:23:55.156Z", // June 30, 2024
          },
        ],
      })
      .then((result) => console.log(result.fileSets))
      .catch((error) => console.error(`Error: ${error}`));
    ```
  </Tab>

  <Tab title="Javascript (fetch)">
    ```js theme={"dark"}
    // Example 1: List all FileSets (empty search)
    fetch("/domo/files/v1/filesets/search", {
      method: "POST",
      headers: { "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("/domo/files/v1/filesets/search?limit=50&offset=0", {
      method: "POST",
      headers: { "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",
          },
        ],
        // Filter FileSet created between two dates
        dateFilters: [
          {
            field: "created",
            start: "2025-06-01T19:23:55.156Z", // June 1, 2024
            end: "2025-06-30T19:23:55.156Z", // June 30, 2024
          },
        ],
      }),
    })
      .then((response) => response.json())
      .then((result) => console.log(result.fileSets))
      .catch((error) => console.error(`Error: ${error}`));
    ```
  </Tab>
</Tabs>

**Response:**

```json theme={"dark"}
{
  "fileSets": [
    {
      "id": "00000000-0000-0000-0000-000000000010",
      "name": "Sample FileSet",
      "description": "A sample FileSet for demonstration purposes.",
      "created": "2025-01-01T00:00:00.000Z",
      "createdBy": 111111111
    }
  ]
}
```

***

## Create FileSet

**Method:** `POST`\
**Endpoint:** `/domo/files/v1/filesets`

**Request Body Parameters:**

| Parameter        | Type    | Required | Description                                                            |
| ---------------- | ------- | -------- | ---------------------------------------------------------------------- |
| name             | String  | Yes      | The name of the FileSet                                                |
| accountId        | Integer | No       | The account ID to associate (nullable)                                 |
| connectorContext | Object  | No       | Connector context for the FileSet (nullable). ConnectorContext Object. |
| description      | String  | No       | Description for the FileSet                                            |

**ConnectorContext Object Properties:**

| Property     | Type   | Required | Description                                |
| ------------ | ------ | -------- | ------------------------------------------ |
| connector    | String | Yes      | The connector key                          |
| relativePath | String | No       | Relative path for the connector (nullable) |

<Tabs>
  <Tab title="Javascript (domo.post)">
    ```js theme={"dark"}
    domo
      .post("/domo/files/v1/filesets", {
        name: "Sample FileSet",
        description: "A sample FileSet for demonstration purposes.",
        // accountId: 12345, // Optional
        // connectorContext: { connector: 'S3', relativePath: 'bucket/path' }, // Optional
      })
      .then((result) => console.log(result))
      .catch((error) => console.error(`Error: ${error}`));
    ```
  </Tab>

  <Tab title="Javascript (fetch)">
    ```js theme={"dark"}
    fetch("/domo/files/v1/filesets", {
      method: "POST",
      headers: { "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}`));
    ```
  </Tab>
</Tabs>

**Response:**

```json theme={"dark"}
{
  "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

**Method:** `GET`
**Endpoint:** `/domo/files/v1/filesets/{filesetId}`

**Path Parameters:**

| Parameter | Type   | Required | Description           |
| --------- | ------ | -------- | --------------------- |
| filesetId | String | Yes      | The ID of the FileSet |

<Tabs>
  <Tab title="Javascript (domo.get)">
    ```js theme={"dark"}
    domo
      .get(`/domo/files/v1/filesets/${filesetId}`)
      .then((result) => console.log(result))
      .catch((error) => console.error(`Error: ${error}`));
    ```
  </Tab>

  <Tab title="Javascript (fetch)">
    ```js theme={"dark"}
    fetch(`/domo/files/v1/filesets/${filesetId}`)
      .then((response) => response.json())
      .then((result) => console.log(result))
      .catch((error) => console.error(`Error: ${error}`));
    ```
  </Tab>
</Tabs>

**Response:**

```json theme={"dark"}
{
  "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

**Method:** `POST`\
**Endpoint:** `/domo/files/v1/filesets/{filesetId}`

**Path Parameters:**

| Parameter | Type   | Required | Description           |
| --------- | ------ | -------- | --------------------- |
| filesetId | String | Yes      | The ID of the FileSet |

**Request Body Parameters:**

| Parameter   | Type   | Required | Description                         |
| ----------- | ------ | -------- | ----------------------------------- |
| name        | String | No       | The new name for the FileSet        |
| description | String | No       | The new description for the FileSet |

<Tabs>
  <Tab title="Javascript (domo.post)">
    ```js theme={"dark"}
    domo
      .post(`/domo/files/v1/filesets/${filesetId}`, {
        name: "Updated FileSet Name", // Optional: New name for the FileSet
        description: "Updated description.", // Optional: New description
      })
      .then((result) => console.log(result))
      .catch((error) => console.error(`Error: ${error}`));
    ```
  </Tab>

  <Tab title="Javascript (fetch)">
    ```js theme={"dark"}
    fetch(`/domo/files/v1/filesets/${filesetId}`, {
      method: "POST",
      headers: { "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}`));
    ```
  </Tab>
</Tabs>

**Response:**

```json theme={"dark"}
{
  "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

**Method:** `DELETE`\
**Endpoint:** `/domo/files/v1/filesets/{filesetId}`

**Path Parameters:**

| Parameter | Type   | Required | Description           |
| --------- | ------ | -------- | --------------------- |
| filesetId | String | Yes      | The ID of the FileSet |

<Tabs>
  <Tab title="Javascript (domo.delete)">
    ```js theme={"dark"}
    domo
      .delete(`/domo/files/v1/filesets/${filesetId}`)
      .then((result) => console.log(result))
      .catch((error) => console.error(`Error: ${error}`));
    ```
  </Tab>

  <Tab title="Javascript (fetch)">
    ```js theme={"dark"}
    fetch(`/domo/files/v1/filesets/${filesetId}`, {
      method: "DELETE",
    })
      .then((response) => response.json())
      .then((result) => console.log(result))
      .catch((error) => console.error(`Error: ${error}`));
    ```
  </Tab>
</Tabs>

**Response:**

```json theme={"dark"}
{
  "status": "success",
  "message": "FileSet deleted successfully."
}
```
