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

# Get Tracked Files

> List all files with tracking enabled

## Overview

Retrieves all files that have tracking enabled. Shows view counts and download statistics for each tracked file.

## Query Parameters

<ParamField query="workspaceId" type="integer">
  Filter by workspace ID
</ParamField>

<ParamField query="page" type="integer" default="1">
  Page number
</ParamField>

<ParamField query="perPage" type="integer" default="15">
  Items per page
</ParamField>

## Response

<ResponseField name="pagination" type="object">
  Paginated list of tracked files

  <Expandable title="Pagination properties">
    <ResponseField name="data" type="array">
      Array of tracked file objects with view/download counts
    </ResponseField>

    <ResponseField name="current_page" type="integer">
      Current page
    </ResponseField>

    <ResponseField name="last_page" type="integer">
      Total pages
    </ResponseField>

    <ResponseField name="total" type="integer">
      Total tracked files
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="status" type="string">
  Request status (`success`)
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://app.drime.cloud/api/v1/track/all?page=1" \
    -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://app.drime.cloud/api/v1/track/all?page=1', {
    headers: {
      'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
    }
  });

  const { pagination } = await response.json();
  for (const file of pagination.data) {
    console.log(`${file.name}: ${file.views_number} views, ${file.dl_number} downloads`);
  }
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      'https://app.drime.cloud/api/v1/track/all',
      params={'page': 1},
      headers={'Authorization': 'Bearer YOUR_ACCESS_TOKEN'}
  )

  files = response.json()['pagination']['data']
  for f in files:
      print(f"{f['name']}: {f['views_number']} views, {f['dl_number']} downloads")
  ```
</RequestExample>

<ResponseExample>
  ```json 200 - Success theme={null}
  {
    "status": "success",
    "pagination": {
      "data": [
        {
          "id": 487159699,
          "name": "proposal.pdf",
          "type": "pdf",
          "file_size": 2048576,
          "views_number": 15,
          "dl_number": 3,
          "views": [
            {
              "id": 1,
              "ip": "192.168.1.1",
              "date": "2025-12-28 06:42:58",
              "action": "view"
            }
          ]
        }
      ],
      "current_page": 1,
      "last_page": 1,
      "total": 1
    }
  }
  ```
</ResponseExample>

<Tip>
  File tracking is useful for monitoring engagement with shared documents, such as proposals or contracts.
</Tip>
