> ## 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 Workspace File Stats

> Get file count and total size for a workspace

## Overview

Returns statistics about files in a workspace, including total file count and combined size.

## Query Parameters

<ParamField query="workspaceId" type="integer">
  Workspace ID. Use `0` for the user's default personal workspace.
</ParamField>

## Response

<ResponseField name="files" type="integer">
  Total number of files in the workspace
</ResponseField>

<ResponseField name="size" type="integer">
  Total size of all files in bytes
</ResponseField>

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

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

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

  const { files, size } = await response.json();
  console.log(`${files} files, ${(size / 1024 / 1024).toFixed(2)} MB total`);
  ```

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

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

  data = response.json()
  print(f"{data['files']} files, {data['size'] / 1024 / 1024:.2f} MB total")
  ```
</RequestExample>

<ResponseExample>
  ```json 200 - Success theme={null}
  {
    "files": 2,
    "size": 4846974,
    "status": "success"
  }
  ```
</ResponseExample>
