---
title: "Count the workspace's files by type"
method: GET
path: "/v1/assets/stats"
tags: ["assets"]
---

# Count the workspace's files by type

`GET /v1/assets/stats`

## Request

- Base URL: `https://api.patricia.app` (the document declares no server; this is the origin it was published from)
- URL: `https://api.patricia.app/v1/assets/stats`
- Auth: HTTP bearer

How many live files of each kind the workspace holds and how much space they take. Backs the type filter's counts and the library's footprint line.

## Headers

- `X-Tenant-Id` string, nullable

## Response `200`

Successful Response

- AssetLibraryStats: Library-wide totals: the type filter's counts and the library's footprint.
  - `kinds` AssetKindTotal[], required
    - `category` 'document' | 'media' | 'app', required
    - `kind` 'app' | 'audio' | 'docx' | 'file' | 'html' | 'image' | 'markdown' | 'pdf' | 'slides' | 'spreadsheet' | 'video', required
    - `count` integer, required
    - `byte_size` integer, required
  - `total_count` integer, required
  - `total_byte_size` integer, required

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `403`: Forbidden. Inspect response body `code` for the specific reason (for example: PERMISSION_DENIED, EMAIL_NOT_VERIFIED, TENANT_ACCESS_REQUIRED, ROLE_UNRESOLVED)
- `422`: Validation error

---

[API](https://skmtc.dev/patricia/apis/patricia-api.md) · [All operations](https://skmtc.dev/patricia/apis/patricia-api/llms.txt) · [OpenAPI document](https://skmtc.dev/patricia/apis/patricia-api/revisions/0dfb44495ea1?raw)
