---
title: "List documents"
method: GET
path: "/api/projects/{projectId}/documents"
tags: ["Document"]
---

# List documents

`GET /api/projects/{projectId}/documents`

Retrieve a paginated list of documents for a project with optional filtering.

## Path parameters

- `projectId` string, uuid, required

## Query parameters

- `parentId` string, uuid
- `deleted` union
  - 'true' | 'false' | 'True' | 'False' | 'TRUE' | 'FALSE'
  - boolean
- `search` string
- `key` string
- `keys` string
- `ancestors` union
  - 'true' | 'false' | 'True' | 'False' | 'TRUE' | 'FALSE'
  - boolean
- `contentType` string
- `directoriesOnly` union
  - 'true' | 'false' | 'True' | 'False' | 'TRUE' | 'FALSE'
  - boolean
- `directChildren` union
  - 'true' | 'false' | 'True' | 'False' | 'TRUE' | 'FALSE'
  - boolean
- `page` number
- `perPage` number

## Response `200`

Paginated list of documents

- object — Paginated list of documents
  - `results` object[], required — List of documents
    - `id` string, uuid, required — Document unique identifier
    - `key` string, required — Materialized lowercase path based on the name
    - `path` string, required — Materialized path based on the name
    - `name` string, required — Document name
    - `type` 'f' | 'd' | 'e', required — Document type (file, directory, or external file)
    - `meta` object — Document metadata
    - `contentType` string — Content MIME type
    - `size` number — Document size in bytes
    - `parentId` string, uuid, nullable — Parent document ID
    - `projectId` string, uuid, required — Project ID
    - `publishedId` string, uuid, nullable — Currently published version ID
    - `publishedAt` string, nullable — Publication timestamp
    - `publishedBy` object — User who published the document
      - `id` string, uuid, required — User unique identifier
      - `email` string, email — User email address
      - `firstName` string, nullable — User first name
      - `lastName` string, nullable — User last name
    - `published` object — Published version details
      - `id` string, uuid, required — Version unique identifier
      - `name` string, nullable — Version name
      - `parentId` string, uuid, nullable — Parent version ID for sub-versions
      - `status` string — Version status (draft or completed)
      - `content` unknown
      - `documentId` string, uuid — Associated document ID
      - `createdBy` object — User who created the version
        - `id` string, uuid, required — User unique identifier
        - `email` string, email — User email address
        - `firstName` string, nullable — User first name
        - `lastName` string, nullable — User last name
      - `createdAt` string — Version creation timestamp
      - `versions` unknown[] — Sub-versions (recursive structure)
        - unknown
      - `releases` object[] — Associated releases
        - `id` string, uuid, required — Release ID
        - `version` string — Release version string
    - `versions` object[] — Document versions
      - `id` string, uuid, required — Version unique identifier
      - `name` string, nullable — Version name
      - `parentId` string, uuid, nullable — Parent version ID for sub-versions
      - `status` string — Version status (draft or completed)
      - `content` unknown
      - `documentId` string, uuid — Associated document ID
      - `createdBy` object — User who created the version
        - `id` string, uuid, required — User unique identifier
        - `email` string, email — User email address
        - `firstName` string, nullable — User first name
        - `lastName` string, nullable — User last name
      - `createdAt` string — Version creation timestamp
      - `versions` unknown[] — Sub-versions (recursive structure)
        - unknown
      - `releases` object[] — Associated releases
        - `id` string, uuid, required — Release ID
        - `version` string — Release version string
    - `changeRequests` object[] — Pending change requests
      - `id` string, uuid, required — Change request unique identifier
      - `type` string, required — Type of change request
      - `status` string, required — Change request status
      - `createdAt` string — Creation timestamp
    - `view` object, nullable — Document view configuration
      - `description` string, nullable — View description
      - `permissions` object, nullable — View permissions mapping
    - `updatedAt` string — Last update timestamp
    - `deletedAt` string, nullable — Deletion timestamp if soft deleted
  - `paginate` object, required — Pagination metadata
    - `current` number, required — Current page number
    - `from` number, required — Starting record number
    - `to` number, required — Ending record number
    - `total` number, required — Total number of records
    - `pageSize` number, required — Number of records per page

---

[API](https://skmtc.dev/gorules/apis/gorules-agent-api.md) · [All operations](https://skmtc.dev/gorules/apis/gorules-agent-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/gorules/gorules-agent-api/revisions/52c0773fcd80/schema)
