> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trelent.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List files

> View your uploaded files and their metadata.

List all files you have uploaded. Use this to review available file IDs before creating jobs.

## List your files

<Tabs>
  <Tab title="TypeScript">
    ```ts theme={null}
    import { DataIngestionClient } from "@trelent/data-ingestion";

    const client = new DataIngestionClient();

    const response = await client.listFiles();
    for (const file of response.files) {
      console.log(file.id, file.filename, file.created_at);
    }
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    from trelent_data_ingestion_sdk import DataIngestionClient

    client = DataIngestionClient()

    response = client.list_files()
    for file in response.files:
        print(file.id, file.filename, file.created_at)
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl -X GET "${API_URL}/v1/data-ingestion/files/" \
      -H "Authorization: Bearer ${API_TOKEN}"
    ```
  </Tab>
</Tabs>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "files": [
      {
        "id": "e2d4c3d2-41c0-4a6b-a387-580807fb5ad2",
        "filename": "document.pdf",
        "created_at": "2024-12-01T10:00:00Z"
      },
      {
        "id": "b4c77b85-3ad4-4cb0-8d06-5ff8ff5df2ad",
        "filename": "presentation.pptx",
        "created_at": "2024-12-01T11:30:00Z"
      }
    ]
  }
  ```
</ResponseExample>

## Response fields

<ResponseField name="files" type="array">
  List of uploaded files.

  <Expandable title="File object fields">
    <ResponseField name="id" type="uuid">
      Unique file identifier to use in job submissions.
    </ResponseField>

    <ResponseField name="filename" type="string">
      Original filename provided during upload.
    </ResponseField>

    <ResponseField name="created_at" type="datetime">
      When the file was uploaded.
    </ResponseField>
  </Expandable>
</ResponseField>
