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

# List file classifications and attribute values

> See what content types a file is classified under and what attribute values
have been set on it.

A file can be classified under **multiple content types** (e.g., both
`legal:contract:nda` and `compliance:audit-report`). Each classification
comes with its own set of **attribute values**, the metadata fields defined
in your content-type schema.

**Response structure:**

Each content type entry includes:
- `path`: the content type (e.g., `legal:contract:nda`)
- `label`: human-readable name
- `labels`: breadcrumb from root to leaf (`["Legal", "Contract", "NDA"]`)

Each attribute value includes:
- `name` / `label`: identifier and display name
- `value`: the current value (shape depends on type)
- `type`: the attribute type (`text`, `number`, `date`, `boolean`, `select`, `multi-select`)
- `choices`: available options for `select` / `multi-select`
- `required`: whether the attribute is required by the schema

The response includes `can_edit`, which indicates whether you have permission
to modify this file's classifications and attribute values.

**To modify:** use `POST /api/v3/files/{file_id}/facets` to classify,
set attribute values, or remove classifications.

**To set up content types first:** see `GET /api/v3/content-types/templates`
(browse starter templates) and `POST /api/v3/content-types` (adopt or create).



## OpenAPI

````yaml /api-reference/api-console.yaml get /api/v3/files/{file_id}/facets
openapi: 3.1.0
info:
  title: LightOn API
  version: 3.13.0 (v1)
  description: >-
    LightOn gives you an API to search, parse, and ingest documents at scale.
    Build knowledge-retrieval pipelines without managing vector databases or OCR
    models.
servers:
  - url: https://api.lighton.ai
security: []
tags:
  - name: Ask
    description: >-
      Retrieval-augmented generation: search your indexed corpus and generate an
      LLM answer grounded in the retrieved passages. Supports streaming (SSE)
      and synchronous modes.
  - name: Search
    description: >-
      Hybrid vector + text retrieval over your indexed corpus. Returns ranked
      passages with provenance (file, page range, workspace). Optional reranking
      and vision mode.
  - name: Files
    description: Upload, list, fetch, and delete documents indexed in your workspaces.
  - name: Facets
    description: >-
      Organise documents with hierarchical content types and custom attributes
      per file. Start from starter templates or build your own classification
      schema from scratch.
  - name: Tags
    description: >-
      Manage flat, company-wide labels used to scope search and group content
      across workspaces.
  - name: Workspaces
    description: >-
      Create and manage workspaces — the access-controlled containers your
      documents live in.
  - name: Parse
    description: >-
      Convert documents into structured Markdown — PDFs, images, Office files,
      and HTML. Synchronous endpoint capped at 20 MB / 15 pages.
  - name: Extract
    description: >-
      Pull typed fields out of documents using a JSON Schema you provide. Sync
      mode for small documents (≤20 MB / 15 pages); async mode for larger jobs
      (≤100 MB / 1000 pages) with polling on a job ID.
  - name: API Keys
    description: >-
      Provision and revoke API keys used to authenticate against the Console
      API.
  - name: Budget
    description: >-
      Manage your organization's monthly spend budget and alert thresholds. Set
      a hard cap that blocks API requests when reached, and configure email
      notifications at custom spend percentages.
paths:
  /api/v3/files/{file_id}/facets:
    get:
      tags:
        - Facets
      summary: List file classifications and attribute values
      description: >-
        See what content types a file is classified under and what attribute
        values

        have been set on it.


        A file can be classified under **multiple content types** (e.g., both

        `legal:contract:nda` and `compliance:audit-report`). Each classification

        comes with its own set of **attribute values**, the metadata fields
        defined

        in your content-type schema.


        **Response structure:**


        Each content type entry includes:

        - `path`: the content type (e.g., `legal:contract:nda`)

        - `label`: human-readable name

        - `labels`: breadcrumb from root to leaf (`["Legal", "Contract",
        "NDA"]`)


        Each attribute value includes:

        - `name` / `label`: identifier and display name

        - `value`: the current value (shape depends on type)

        - `type`: the attribute type (`text`, `number`, `date`, `boolean`,
        `select`, `multi-select`)

        - `choices`: available options for `select` / `multi-select`

        - `required`: whether the attribute is required by the schema


        The response includes `can_edit`, which indicates whether you have
        permission

        to modify this file's classifications and attribute values.


        **To modify:** use `POST /api/v3/files/{file_id}/facets` to classify,

        set attribute values, or remove classifications.


        **To set up content types first:** see `GET
        /api/v3/content-types/templates`

        (browse starter templates) and `POST /api/v3/content-types` (adopt or
        create).
      operationId: api_v3_files_facets_retrieve
      parameters:
        - in: path
          name: file_id
          schema:
            type: integer
          required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentAttributesListResponse'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIV3ErrorResponse'
              examples:
                Unauthorized:
                  value:
                    id: null
                    code: 401
                    error: unauthorized
                    detail: >-
                      Authentication credentials were not provided or are
                      invalid.
                    doc_url: https://developers.lighton.ai/errors#unauthorized
          description: Authentication credentials were not provided or are invalid
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIV3ErrorResponse'
              examples:
                NotFound:
                  value:
                    id: null
                    code: 404
                    error: not_found
                    detail: Document not found.
                    doc_url: https://developers.lighton.ai/errors#not_found
                  summary: Not found
          description: File not found or not accessible
      security:
        - bearerAuth: []
components:
  schemas:
    DocumentAttributesListResponse:
      properties:
        content_types:
          items:
            $ref: '#/components/schemas/ContentTypeAttributesResponse'
          title: Content Types
          type: array
        can_edit:
          title: Can Edit
          type: boolean
        unlinked:
          default: []
          items:
            $ref: '#/components/schemas/AttributeSchema'
          title: Unlinked
          type: array
      required:
        - content_types
        - can_edit
      title: DocumentAttributesListResponse
      type: object
    APIV3ErrorResponse:
      type: object
      properties:
        id:
          type:
            - string
            - 'null'
          description: >-
            Job/resource id when one already exists (useful for async error
            diagnosis); null otherwise.
        code:
          type: integer
          description: HTTP status code
        error:
          type: string
          description: Error code used by the UI as a translation key
        detail:
          type: string
          description: Human-readable error message for developers
        doc_url:
          type: string
          description: Link to the error-code documentation page
      required:
        - code
        - detail
        - doc_url
        - error
        - id
    ContentTypeAttributesResponse:
      properties:
        path:
          description: Canonical colon-separated content type path.
          title: Path
          type: string
        code:
          description: Leaf node code (last segment of the path).
          title: Code
          type: string
        label:
          description: Leaf label for the content type path.
          title: Label
          type: string
        labels:
          default: []
          items:
            type: string
          title: Labels
          type: array
        attributes:
          items:
            $ref: '#/components/schemas/AttributeSchema'
          title: Attributes
          type: array
      required:
        - path
        - code
        - label
        - attributes
      title: ContentTypeAttributesResponse
      type: object
    AttributeSchema:
      properties:
        name:
          description: Attribute identifier in snake_case.
          title: Name
          type: string
        label:
          default: ''
          description: Human-readable attribute label.
          title: Label
          type: string
        value:
          anyOf:
            - type: string
            - type: integer
            - type: number
            - type: boolean
            - items:
                type: string
              type: array
            - type: 'null'
          description: >-
            Current attribute value. Shape depends on type: string, number,
            boolean, date string, or array of strings for multi-select. Null
            when unset.
          title: Value
        type:
          description: >-
            Public attribute type, e.g. text, number, date, boolean, select,
            multi-select.
          title: Type
          type: string
        required:
          description: Whether the attribute is required by the schema.
          title: Required
          type: boolean
        description:
          default: ''
          description: Optional descriptive text from the schema.
          title: Description
          type: string
        choices:
          default: []
          description: Allowed values for select and multi-select attributes.
          items:
            type: string
          title: Choices
          type: array
      required:
        - name
        - value
        - type
        - required
      title: AttributeSchema
      type: object
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where
        `<token>` is your auth token.

````