> ## 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.

# Get full public context for one Kubernetes resource

> Returns the collected manifest, management, Node/CRD, and Analyzer enrichment context. Internal persistence and index fields are not exposed.



## OpenAPI

````yaml https://api.draftt.io/swagger get /k8sResource/{id}
openapi: 3.1.0
info:
  title: Draftt API
  version: 0.2.1
servers:
  - url: https://api.draftt.io/v1
security:
  - BearerAuth: []
paths:
  /k8sResource/{id}:
    get:
      tags:
        - K8s Resource
      summary: Get full public context for one Kubernetes resource
      description: >-
        Returns the collected manifest, management, Node/CRD, and Analyzer
        enrichment context. Internal persistence and index fields are not
        exposed.
      operationId: getK8sResource
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetK8sResourceResponse'
        '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:
    GetK8sResourceResponse:
      type: object
      properties:
        item:
          $ref: '#/components/schemas/K8sResource'
      required:
        - item
    K8sResource:
      type: object
      properties:
        id:
          type: string
          format: uuid
        clusterComponentId:
          type: string
          format: int64
        clusterComponentName:
          type: string
        uniqueIdentifier:
          type: string
        name:
          type: string
        kind:
          type: string
        namespace:
          type:
            - string
            - 'null'
        apiVersion:
          type: string
        apiGroup:
          type: string
        collectionMode:
          type: string
          enum:
            - full
            - metadata-only
        knownCrd:
          type:
            - boolean
            - 'null'
          description: >-
            `true` identifies a known CRD with its full spec available; `false`
            identifies an unknown CRD; `null` identifies a native Kubernetes API
            resource, whose full spec is always available.
        labels:
          type: object
          additionalProperties:
            type: string
        details:
          oneOf:
            - $ref: '#/components/schemas/K8sResourceDetails'
            - type: 'null'
        enrichment:
          type: object
          additionalProperties: true
          description: >-
            Analyzer enrichment promoted from the internal persisted details
            block.
        ownershipClass:
          type:
            - string
            - 'null'
          enum:
            - system-managed
            - user-managed
            - null
        managedBy:
          type:
            - string
            - 'null'
          enum:
            - Helm
            - ArgoCD
            - Flux
            - HelmAndArgoCD
            - HelmAndFlux
            - ArgoCDAndFlux
            - HelmAndArgoCDAndFlux
            - null
        managedByName:
          type:
            - string
            - 'null'
        managedByNamespace:
          type:
            - string
            - 'null'
        helmChartName:
          type:
            - string
            - 'null'
        helmChartVersion:
          type:
            - string
            - 'null'
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - clusterComponentId
        - uniqueIdentifier
        - name
        - kind
        - apiVersion
        - apiGroup
        - collectionMode
        - labels
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
          required:
            - message
      required:
        - error
    K8sResourceDetails:
      type: object
      description: >-
        Collected manifest context. Internal persisted data is removed from API
        responses.
      additionalProperties: true
      properties:
        labels:
          type: object
          additionalProperties:
            type: string
        annotations:
          type: object
          additionalProperties:
            type: string
        annotationKeys:
          type: array
          items:
            type: string
        ownerRefs:
          type: array
          items:
            type: object
            additionalProperties: true
        management:
          $ref: '#/components/schemas/K8sResourceManagement'
        nodeInfo:
          type: object
          additionalProperties: true
        spec:
          type: object
          additionalProperties: true
    K8sResourceManagement:
      type: object
      additionalProperties: true
      properties:
        managedBy:
          type: string
          enum:
            - Helm
            - ArgoCD
            - Flux
            - HelmAndArgoCD
            - HelmAndFlux
            - ArgoCDAndFlux
            - HelmAndArgoCDAndFlux
        helm:
          type: object
          additionalProperties: true
        argocd:
          type: object
          additionalProperties: true
        flux:
          type: object
          additionalProperties: true
  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

````