> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nekt.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List Semantic Layer Documents

> The documents you can grant on.

Paginated, and already filtered to what your API key's creator can reach.

Two filters matter when you are working out what to grant:

| Filter         | Effect                                                                                                                                               |
| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| `?folder=<id>` | Only documents inside that folder.                                                                                                                   |
| `?folder=root` | Only documents that sit outside any folder. `?folder=` empty is indistinguishable from the parameter being absent, which is why `root` is a literal. |

<Warning>
  Read-only for API keys. Creating or editing a document through a machine credential returns `403`.
</Warning>

## Related

* [Read the Semantic Layer](/platform-api/permissions/semantic-layer/resources) — the three read endpoints and how they fit together.
* [Assign Semantic Layer Permissions](/platform-api/permissions/semantic-layer/assign) — what to do with the ids.


## OpenAPI

````yaml GET /api/v1/semantic-layer/documents/
openapi: 3.0.3
info:
  title: Nekt API
  version: v1
  description: Nekt API Documentation
  contact:
    email: support@nekt.ai
servers:
  - url: https://api.nekt.ai
security: []
paths:
  /api/v1/semantic-layer/documents/:
    get:
      tags:
        - v1
      description: >-
        Permission-scoped querysets and expand[]-aware prefetch builders.


        Split out from the viewsets so the search endpoint (B7) can reuse it --
        it merges

        matches across two models and so is not a ModelViewSet bound to one
        queryset.


        Consumers must provide `self.request` and `self.expand_tree`.
      operationId: v1_semantic_layer_documents_list
      parameters:
        - name: page
          required: false
          in: query
          description: A page number within the paginated result set.
          schema:
            type: integer
        - name: page_size
          required: false
          in: query
          description: Number of results to return per page.
          schema:
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedSemanticLayerDocumentList'
          description: ''
      security:
        - ApiKeyAuth: []
components:
  schemas:
    PaginatedSemanticLayerDocumentList:
      type: object
      required:
        - count
        - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/SemanticLayerDocument'
    SemanticLayerDocument:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        name:
          type: string
          maxLength: 255
        content:
          type: string
        mentions:
          readOnly: true
        folder:
          type: string
          format: uuid
          nullable: true
          description: >-
            Folder to place the document in. Omit or send null to put it at the
            root.
        order:
          type: integer
          readOnly: true
          nullable: true
          description: >-
            Manual position among its siblings; NULL falls back to created_at
            ordering.
        created_by:
          type: string
          readOnly: true
          description: Created by (Expandable)
        created_at:
          type: string
          format: date-time
          readOnly: true
        updated_at:
          type: string
          format: date-time
          readOnly: true
      required:
        - created_at
        - created_by
        - id
        - mentions
        - name
        - order
        - updated_at
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: 'API Key authentication. Format: ''x-api-key: api_key'''

````