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

# Get the field catalog visible to the caller

> Returns the boot-validated field catalog grouped by domain, filtered to the scanners the caller's organization has enabled: a scanner-gated domain and any carrier reaching into it are omitted entirely rather than returned and hidden by the client.

The response carries a strong `ETag` header over the schema, the embedded value lists AND the withheld scanner set, so the validator differs between two organisations on the same schema; repeat requests with a matching `If-None-Match` receive `304 Not Modified` with an empty body. A fully entitled caller gets the unfiltered validator unchanged.



## OpenAPI

````yaml /api-reference/earnie/policies-openapi.json get /v1/policies/fields
openapi: 3.0.3
info:
  title: Earnie Policies API
  description: >-
    Author policies, attach them to projects, and read how projects, scans, and
    findings evaluate against them.
  version: 1.0.0
servers:
  - url: https://{tenant}.earnie.dev
    description: Your Earnie deployment
    variables:
      tenant:
        default: your-company
        description: >-
          Your organization's Earnie address, as shown in your browser when you
          sign in.
security:
  - bearerAuth: []
paths:
  /v1/policies/fields:
    get:
      summary: Get the field catalog visible to the caller
      description: >-
        Returns the boot-validated field catalog grouped by domain, filtered to
        the scanners the caller's organization has enabled: a scanner-gated
        domain and any carrier reaching into it are omitted entirely rather than
        returned and hidden by the client.


        The response carries a strong `ETag` header over the schema, the
        embedded value lists AND the withheld scanner set, so the validator
        differs between two organisations on the same schema; repeat requests
        with a matching `If-None-Match` receive `304 Not Modified` with an empty
        body. A fully entitled caller gets the unfiltered validator unchanged.
      operationId: GetPolicyFields
      parameters:
        - name: If-None-Match
          in: header
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Full catalog
          headers:
            ETag:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FieldCatalog'
        '304':
          description: Not modified — ETag matches If-None-Match
          headers:
            ETag:
              schema:
                type: string
components:
  schemas:
    FieldCatalog:
      type: object
      required:
        - version
        - domains
      description: >-
        Full response of `GET /v1/policies/fields`. `version` is a schema-only
        hash (changes only when a field is added/removed/ retyped); the response
        also carries a strong `ETag` header (schema + embedded value lists) for
        conditional GET.
      properties:
        version:
          type: string
        domains:
          type: array
          items:
            type: object
            required:
              - domain
              - fields
            properties:
              domain:
                $ref: '#/components/schemas/FieldDomain'
              fields:
                type: array
                items:
                  $ref: '#/components/schemas/FieldEntry'
    FieldDomain:
      type: string
      enum:
        - license
        - vulnerability
        - component
        - geo
        - finding
        - crypto
        - ai
    FieldEntry:
      type: object
      required:
        - path
        - domain
        - label
        - type
        - cardinality
        - operators
        - values
      properties:
        path:
          type: string
          description: >-
            Canonical, unique, CEL-addressable dotted path (e.g.
            `license.spdx_id`).
        domain:
          $ref: '#/components/schemas/FieldDomain'
        label:
          type: string
        type:
          $ref: '#/components/schemas/FieldType'
        cardinality:
          $ref: '#/components/schemas/FieldCardinality'
        operators:
          type: array
          items:
            type: string
        values:
          $ref: '#/components/schemas/FieldValueSource'
        requires:
          type: array
          items:
            type: string
          nullable: true
          description: >-
            Enrichment identifiers this field's data depends on. Non-empty marks
            a forward-declared field (CAP-11) — schema-valid even before the
            enrichment is populated for any finding.
        optional:
          type: boolean
          description: >-
            The field may be absent on an individual finding even though its
            carrier is present, so reading it requires a `has()` guard naming
            this exact path — a guard on an ancestor is not accepted, because
            the carrier is written (empty) on every finding. Every `crypto.*`
            field is optional; enrichment-backed fields use `requires` instead.
            Saving an unguarded reference returns 422 `unguarded_field`.
        element_domain:
          allOf:
            - $ref: '#/components/schemas/FieldDomain'
          nullable: true
          description: >-
            Domain reached through this field. For cardinality = many it
            describes one list element; for a one-cardinality object it
            describes the nested selector schema.
        unavailable:
          type: string
          description: >-
            Why no scan produces this field's data yet; absent when one does. It
            is set exactly when a `requires` id has no producer, so every policy
            that reads the field evaluates as `not_evaluated` and fails the scan
            gate with `missing_evidence`. The sentence builder shows the reason
            and refuses the pick.
    FieldType:
      type: string
      enum:
        - string
        - int
        - float
        - bool
        - enum
        - date
      description: >-
        Schema type of a field-catalog entry. Distinct vocabulary from
        ParameterType — never conflated (schema field type vs. parameter-slot UI
        type).
    FieldCardinality:
      type: string
      enum:
        - one
        - many
    FieldValueSource:
      type: object
      required:
        - source
      properties:
        source:
          $ref: '#/components/schemas/FieldValueSourceKind'
        options:
          type: array
          items:
            type: string
          nullable: true
          description: Fixed enum value set — populated only when kind = inline.
        format:
          type: string
          description: Optional display hint — populated only when source = free.
    FieldValueSourceKind:
      type: string
      enum:
        - inline
        - endpoint
        - free
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        An Earnie API key, sent as `Authorization: Bearer sk_earnie_...`. Create
        one under Settings > API keys. The key's scopes decide which operations
        it may call.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.