> ## 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 File Backup History

> Get version history for a file

## Overview

Returns backup/version history for a given file. Shows previous versions that can be restored.

## Query Parameters

<ParamField query="file_id" type="integer" required>
  File entry ID
</ParamField>

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

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

## Response

<ResponseField name="pagination" type="object">
  Paginated list of backup versions

  <Expandable title="Pagination properties">
    <ResponseField name="data" type="array">
      Array of backup entries
    </ResponseField>

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

    <ResponseField name="total" type="integer">
      Total number of backups
    </ResponseField>
  </Expandable>
</ResponseField>

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

<RequestExample>
  ```bash cURL theme={null}
  curl "https://app.drime.cloud/api/v1/file-backup?file_id=123&workspaceId=0" \
    -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
  ```

  ```javascript JavaScript theme={null}
  const fileId = 123;

  const response = await fetch(
    `https://app.drime.cloud/api/v1/file-backup?file_id=${fileId}&workspaceId=0`,
    {
      headers: {
        'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
      }
    }
  );

  const { pagination } = await response.json();
  const backups = pagination.data;
  ```

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

  response = requests.get(
      'https://app.drime.cloud/api/v1/file-backup',
      params={'file_id': 123, 'workspaceId': 0},
      headers={'Authorization': 'Bearer YOUR_ACCESS_TOKEN'}
  )

  backups = response.json()['pagination']['data']
  ```
</RequestExample>

<ResponseExample>
  ```json 200 - Success (with backups) theme={null}
  {
    "pagination": {
      "current_page": 1,
      "data": [
        {
          "id": 456,
          "name": "document_backup_20240115.pdf",
          "file_size": 1048576,
          "created_at": "2024-01-15T10:30:00.000000Z"
        }
      ],
      "total": 1,
      "per_page": 15
    },
    "status": "success"
  }
  ```

  ```json 200 - Success (no backups) theme={null}
  {
    "pagination": {
      "current_page": 1,
      "data": [],
      "total": 0,
      "per_page": 15
    },
    "status": "success"
  }
  ```
</ResponseExample>
