> ## 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 queryable Kubernetes resource detail fields by kind

> Returns registry-approved details$ paths and their field metadata. The selected kind is required when those paths are later used in a resource query.



## OpenAPI

````yaml https://api.draftt.io/swagger post /k8sResource/detailsSchema
openapi: 3.1.0
info:
  title: Draftt API
  version: 0.2.1
servers:
  - url: https://api.draftt.io/v1
security:
  - BearerAuth: []
paths:
  /k8sResource/detailsSchema:
    post:
      tags:
        - K8s Resource
      summary: Discover queryable Kubernetes resource detail fields by kind
      description: >-
        Returns registry-approved details$ paths and their field metadata. The
        selected kind is required when those paths are later used in a resource
        query.
      operationId: getK8sResourceDetailsSchema
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/K8sResourceDetailsSchemaRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/K8sResourceDetailsSchemaResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    K8sResourceDetailsSchemaRequest:
      type: object
      properties:
        kind:
          type: string
          enum:
            - APIService
            - AppProject
            - Application
            - ApplicationSet
            - AuthorizationPolicy
            - CSIDriver
            - Certificate
            - CertificateSigningRequest
            - ClusterIssuer
            - ClusterRole
            - ClusterRoleBinding
            - ClusterSecretStore
            - ConfigMap
            - CronJob
            - CustomResourceDefinition
            - DaemonSet
            - DatadogAgent
            - Deployment
            - EC2NodeClass
            - ExternalSecret
            - HorizontalPodAutoscaler
            - IPAddress
            - Ingress
            - IngressClass
            - Issuer
            - LimitRange
            - MutatingAdmissionPolicy
            - MutatingWebhookConfiguration
            - Namespace
            - NetworkPolicy
            - Node
            - NodePool
            - PersistentVolume
            - PersistentVolumeClaim
            - Pod
            - PodDisruptionBudget
            - PodTemplate
            - ReplicationController
            - ResourceQuota
            - Role
            - RoleBinding
            - Secret
            - SecretStore
            - Service
            - ServiceAccount
            - ServiceCIDR
            - StatefulSet
            - StorageClass
            - ValidatingAdmissionPolicy
            - ValidatingAdmissionPolicyBinding
            - ValidatingWebhookConfiguration
            - VolumeAttributesClass
          description: Registry kind used to resolve the supported details$ paths.
      required:
        - kind
      additionalProperties: false
      example:
        kind: Deployment
    K8sResourceDetailsSchemaResponse:
      type: object
      properties:
        kind:
          type: string
          enum:
            - APIService
            - AppProject
            - Application
            - ApplicationSet
            - AuthorizationPolicy
            - CSIDriver
            - Certificate
            - CertificateSigningRequest
            - ClusterIssuer
            - ClusterRole
            - ClusterRoleBinding
            - ClusterSecretStore
            - ConfigMap
            - CronJob
            - CustomResourceDefinition
            - DaemonSet
            - DatadogAgent
            - Deployment
            - EC2NodeClass
            - ExternalSecret
            - HorizontalPodAutoscaler
            - IPAddress
            - Ingress
            - IngressClass
            - Issuer
            - LimitRange
            - MutatingAdmissionPolicy
            - MutatingWebhookConfiguration
            - Namespace
            - NetworkPolicy
            - Node
            - NodePool
            - PersistentVolume
            - PersistentVolumeClaim
            - Pod
            - PodDisruptionBudget
            - PodTemplate
            - ReplicationController
            - ResourceQuota
            - Role
            - RoleBinding
            - Secret
            - SecretStore
            - Service
            - ServiceAccount
            - ServiceCIDR
            - StatefulSet
            - StorageClass
            - ValidatingAdmissionPolicy
            - ValidatingAdmissionPolicyBinding
            - ValidatingWebhookConfiguration
            - VolumeAttributesClass
        fields:
          type: array
          items:
            $ref: '#/components/schemas/ComponentDetailsSchemaField'
      required:
        - kind
        - fields
    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
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
          required:
            - message
      required:
        - error
    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'
    NotFound:
      description: Not Found
      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

````