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

# Discover the queryable details$ fields for a technology or technology group

> Returns the queryable `details$.` fields for one technology or technology group.

These fields are per-technology and are NOT part of any schema in this document, so this endpoint is the
only source of truth for them. Call it before building a component policy or a `details$.` component
query, and use the returned `field` paths verbatim - a path that is not returned does not exist and is
rejected with a 400 when the policy is created.

The response `type` tells you which comparison values are valid for a field, and `availableValues`, when
present, enumerates the only accepted values. `filterable` tells you whether the field is indexed - an
un-indexed field exists on the component but cannot be filtered on in a component query.



## OpenAPI

````yaml https://api.draftt.io/swagger post /component/detailsSchema
openapi: 3.1.0
info:
  title: Draftt API
  version: 0.2.1
servers:
  - url: https://api.draftt.io/v1
security:
  - BearerAuth: []
paths:
  /component/detailsSchema:
    post:
      tags:
        - Component
      summary: >-
        Discover the queryable details$ fields for a technology or technology
        group
      description: >-
        Returns the queryable `details$.` fields for one technology or
        technology group.


        These fields are per-technology and are NOT part of any schema in this
        document, so this endpoint is the

        only source of truth for them. Call it before building a component
        policy or a `details$.` component

        query, and use the returned `field` paths verbatim - a path that is not
        returned does not exist and is

        rejected with a 400 when the policy is created.


        The response `type` tells you which comparison values are valid for a
        field, and `availableValues`, when

        present, enumerates the only accepted values. `filterable` tells you
        whether the field is indexed - an

        un-indexed field exists on the component but cannot be filtered on in a
        component query.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ComponentDetailsSchemaRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ComponentDetailsSchemaResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          description: >-
            The key has no queryable detail fields. The response message lists
            the accepted keys.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    ComponentDetailsSchemaRequest:
      type: object
      description: >-
        Selects which set of queryable `details$.` fields to return. Pass
        exactly one key, as either a

        technology or a technology group.


        Passing a technology returns its own fields unioned with the fields of
        the group it belongs to - so

        `rds` includes the shared `database` fields. Passing a group returns
        only that group's fields.


        Keys not listed here have no queryable detail fields and are rejected
        with a 404.
      properties:
        technology:
          description: A technology key or a technology group key.
          oneOf:
            - title: Technology
              description: A specific technology, e.g. `rds` or `aws-s3-bucket`.
              type: string
              enum:
                - aws-api-gateway-rest-api
                - aws-auto-scaling-group
                - aws-bedrock-model
                - aws-clb
                - aws-cloudfront-distribution
                - aws-dynamodb-backup
                - aws-ebs-snapshot
                - aws-ebs-volume
                - aws-efs-file-system
                - aws-elastic-ip-address-eip
                - aws-elb
                - aws-iam-group
                - aws-iam-role
                - aws-kms-key
                - aws-nat-gateway
                - aws-organizations-account
                - aws-organizations-organization
                - aws-organizations-organizational-unit-ou
                - aws-redshift-cluster
                - aws-redshift-node
                - aws-route-53-hosted-zone
                - aws-s3-bucket
                - aws-secrets-manager-secret
                - aws-security-group
                - aws-sqs-queue
                - aws-subnet
                - aws-vpc
                - aws-vpc-endpoint-gateway
                - aws-vpc-endpoint-interface
                - azure-ai-model
                - azure-app-service-web-app
                - azure-application-gateway
                - azure-cosmos-db
                - azure-cosmos-db-for-postgresql-cluster
                - azure-data-lake-storage-gen2
                - azure-databricks-workspace
                - azure-db
                - azure-db-mysql-flexible
                - azure-db-postgres-flexible
                - azure-db-sql-managed-database
                - azure-db-sql-managed-instance
                - azure-db-sql-server-on-vm
                - azure-dns-zone-private
                - azure-dns-zone-public
                - azure-firewall
                - azure-front-door
                - azure-function-app
                - azure-key-vault
                - azure-load-balancer
                - azure-log-analytics-workspace
                - azure-management-group
                - azure-monitor-action-group
                - azure-nat-gateway
                - azure-network-security-group
                - azure-private-endpoint
                - azure-public-ip-address
                - azure-resource-group
                - azure-storage-account
                - azure-storage-account-blob-container
                - azure-subscription
                - azure-user-assigned-managed-identity
                - azure-virtual-network
                - azure-virtual-network-subnet
                - azure-vm
                - azure-vm-managed-disk
                - azure-vm-scale-set
                - azure-waf-policy
                - dynamodb
                - ec2
                - ecr
                - ecs
                - elasticache
                - gcp-cloud-armor-policy
                - gcp-cloud-logging-bucket
                - gcp-cloud-logging-sink
                - gcp-gce-persistent-disk
                - gcp-gcs-bucket
                - gcp-kms-crypto-key
                - gcp-organization
                - gcp-project
                - gcp-secret-manager-secret
                - gcp-service-account
                - gcp-service-account-key
                - gcp-vpc-firewall-rule
                - gcp-vpc-network
                - gemini-enterprise
                - iam-access-key
                - k8s
                - lambda
                - rds
            - title: Technology group
              description: A group shared by several technologies, e.g. `database`.
              type: string
              enum:
                - container-image
                - database
                - messaging
                - network
                - serverless-function
      required:
        - technology
      additionalProperties: false
      examples:
        - technology: rds
        - technology: aws-s3-bucket
        - technology: database
    ComponentDetailsSchemaResponse:
      type: object
      properties:
        resource:
          type: string
          enum:
            - component
        key:
          type: string
          description: The key the fields were resolved for, echoing the request.
        fields:
          type: array
          description: >-
            Every queryable detail field for the key. This is the complete set -
            a `details$.` path that is not listed does not exist and cannot be
            filtered on.
          items:
            $ref: '#/components/schemas/ComponentDetailsSchemaField'
      required:
        - resource
        - key
        - fields
      example:
        resource: component
        key: rds
        fields:
          - field: details$.database$.storageEncrypted
            displayName: Storage Encrypted
            type: string
            filterable: false
            sortable: false
          - field: details$.database$.activeConnectionCount
            displayName: Active Connection Count
            type: number
            description: Number of active database connections
            filterable: true
            sortable: true
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
          required:
            - message
      required:
        - error
    ComponentDetailsSchemaField:
      type: object
      description: One queryable detail field.
      properties:
        field:
          type: string
          description: >-
            The flat queryable path. Use this verbatim as a filter key in a
            policy rule or a component query - e.g.
            `details$.database$.storageEncrypted`.
        displayName:
          type: string
          description: Human-readable label. Never use this as a filter key.
        type:
          type: string
          description: >-
            The value type this field holds. Comparison values must match it -
            filtering a `number` field with a boolean is rejected with a 400.
            Currently one of `string`, `number`, `boolean` or `date`; treat it
            as an open set, since it is taken from the technology registry
            rather than a fixed list.
        description:
          type: string
          description: >-
            Present only when the registry carries a tooltip for the field.
            Explanatory text - never use it as a filter key.
        availableValues:
          type: array
          items:
            type: string
          description: >-
            Present only for enum-like fields. When present these are the only
            valid comparison values for the field.
        filterable:
          type: boolean
          description: >-
            Whether the field is indexed for filtering. `false` means the path
            exists on the component but is not backed by an index, so filtering
            on it in a query is not supported.
        sortable:
          type: boolean
          description: Whether the field can be used as a sort key.
        itemFields:
          type: array
          description: >-
            Present only for array-of-object fields. Lists the top-level fields
            of each element, to be combined with an array element selector when
            addressing one element.
          items:
            $ref: '#/components/schemas/ComponentDetailsSchemaItemField'
      required:
        - field
        - displayName
        - type
        - filterable
        - sortable
    ComponentDetailsSchemaItemField:
      type: object
      description: One top-level field of an array element.
      properties:
        field:
          type: string
          description: The field name within the array item, not a full queryable path.
        type:
          type: string
          description: The value type the item field holds.
        availableValues:
          type: array
          items:
            type: string
          description: >-
            Present only for enum-like item fields. When present these are the
            only valid comparison values for the item field.
      required:
        - field
        - type
  responses:
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    TooManyRequests:
      description: Too Many Requests
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````