> ## 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 Tracking Stats

> Get detailed tracking statistics for a file

## Overview

Retrieves detailed tracking information for a specific file, including who viewed it, when, and from where.

## Path Parameters

<ParamField path="entryId" type="integer" required>
  File entry ID
</ParamField>

## Query Parameters

<ParamField query="workspaceId" type="integer">
  Workspace ID
</ParamField>

## Response

<ResponseField name="views" type="array">
  Array of tracking events

  <Expandable title="Event properties">
    <ResponseField name="id" type="integer">
      Event ID
    </ResponseField>

    <ResponseField name="file_id" type="integer">
      File entry ID
    </ResponseField>

    <ResponseField name="ip" type="string">
      Viewer's IP address
    </ResponseField>

    <ResponseField name="date" type="string">
      Timestamp of the event
    </ResponseField>

    <ResponseField name="action" type="string">
      Event type (`view` or `download`)
    </ResponseField>

    <ResponseField name="location" type="string">
      Geographic location (if available)
    </ResponseField>

    <ResponseField name="email" type="string">
      Viewer's email (if logged in)
    </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/infos/487159699 \
    -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
  ```

  ```javascript JavaScript theme={null}
  const entryId = 487159699;
  const response = await fetch(`https://app.drime.cloud/api/v1/track/infos/${entryId}`, {
    headers: {
      'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
    }
  });

  const { views } = await response.json();
  for (const view of views) {
    console.log(`${view.action} from ${view.location || view.ip} at ${view.date}`);
  }
  ```

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

  entry_id = 487159699
  response = requests.get(
      f'https://app.drime.cloud/api/v1/track/infos/{entry_id}',
      headers={'Authorization': 'Bearer YOUR_ACCESS_TOKEN'}
  )

  views = response.json()['views']
  for v in views:
      location = v.get('location') or v['ip']
      print(f"{v['action']} from {location} at {v['date']}")
  ```
</RequestExample>

<ResponseExample>
  ```json 200 - Success theme={null}
  {
    "status": "success",
    "views": [
      {
        "id": 1,
        "file_id": 487159699,
        "ip": "192.168.1.100",
        "date": "2025-12-28 06:42:58",
        "action": "view",
        "location": "Paris, France",
        "user_id": null,
        "email": null
      },
      {
        "id": 2,
        "file_id": 487159699,
        "ip": "10.0.0.50",
        "date": "2025-12-28 10:15:30",
        "action": "download",
        "location": "London, UK",
        "user_id": 12345,
        "email": "viewer@example.com"
      }
    ]
  }
  ```
</ResponseExample>

<Note>
  If the viewer was logged in, their `user_id` and `email` will be included in the event data.
</Note>
