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

# Security posture by cluster and namespace

> Active finding occurrences grouped by cluster and namespace, with the scanned workloads and images, the pods the cluster runs there, and the actionable findings by severity. Cluster-scoped reports carry a row with an empty namespace and report_scope 'cluster'.



## OpenAPI

````yaml https://platform.ankra.app/openapi.json get /org/security/namespaces
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://platform.ankra.app
security: []
paths:
  /org/security/namespaces:
    get:
      tags:
        - security
      summary: Security posture by cluster and namespace
      description: >-
        Active finding occurrences grouped by cluster and namespace, with the
        scanned workloads and images, the pods the cluster runs there, and the
        actionable findings by severity. Cluster-scoped reports carry a row with
        an empty namespace and report_scope 'cluster'.
      operationId: list_security_namespaces
      parameters:
        - in: query
          name: page
          required: false
          schema:
            default: 1
            maximum: 10000
            minimum: 1
            type: integer
        - description: Values above 100 are clamped to 100.
          in: query
          name: page_size
          required: false
          schema:
            default: 50
            minimum: 1
            type: integer
        - in: query
          name: search
          required: false
          schema:
            type: string
        - in: query
          name: cluster_id
          required: false
          schema:
            format: uuid
            type: string
        - in: query
          name: sort
          required: false
          schema:
            default: actionable
            enum:
              - actionable
              - observed
              - critical
              - severity
              - workloads
              - images
              - pods
              - namespace
              - cluster_name
              - known_exploited
              - fixable_severe
              - last_scan
            type: string
        - in: query
          name: order
          required: false
          schema:
            default: desc
            enum:
              - asc
              - desc
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SecurityNamespaceListResponse'
          description: Successful response
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SecurityDetailError'
          description: Business validation error
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SecurityPermissionDenied'
          description: Permission denied
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SecurityDetailError'
          description: Organization-scoped resource not found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
components:
  schemas:
    SecurityNamespaceListResponse:
      properties:
        result:
          items:
            $ref: '#/components/schemas/SecurityNamespaceSummary'
          type: array
        pagination:
          $ref: '#/components/schemas/SecurityPagination'
        scanner:
          $ref: '#/components/schemas/SecurityScannerSummary'
      required:
        - result
        - pagination
        - scanner
      title: SecurityNamespaceListResponse
      type: object
    SecurityDetailError:
      properties:
        detail:
          type: string
      required:
        - detail
      type: object
    SecurityPermissionDenied:
      properties:
        detail:
          enum:
            - permission_denied
          type: string
        permission:
          type: string
        scope_type:
          type: string
      required:
        - detail
        - permission
        - scope_type
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    SecurityNamespaceSummary:
      properties:
        cluster_id:
          format: uuid
          type: string
        cluster_name:
          type: string
        namespace:
          type: string
        report_scope:
          enum:
            - namespaced
            - cluster
          type: string
        workloads:
          type: integer
        images:
          type: integer
        pods:
          type: integer
        observed:
          type: integer
        actionable:
          $ref: '#/components/schemas/SecuritySeverityCounts'
        actionable_total:
          type: integer
        accepted_risk:
          type: integer
        fixable_severe:
          type: integer
        known_exploited:
          type: integer
        priority:
          enum:
            - critical
            - high
            - medium
            - low
            - unknown
            - accepted_risk
          type: string
        last_scan:
          format: date-time
          type: string
        scanner_status:
          enum:
            - fresh
            - stale
          type: string
      required:
        - cluster_id
        - cluster_name
        - namespace
        - report_scope
        - workloads
        - images
        - pods
        - observed
        - actionable
        - actionable_total
        - accepted_risk
        - fixable_severe
        - known_exploited
        - priority
        - last_scan
        - scanner_status
      title: SecurityNamespaceSummary
      type: object
    SecurityPagination:
      properties:
        page:
          type: integer
        page_size:
          type: integer
        total_count:
          type: integer
        total_pages:
          type: integer
      required:
        - page
        - page_size
        - total_pages
        - total_count
      type: object
    SecurityScannerSummary:
      properties:
        fresh_clusters:
          type: integer
        last_scan:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
        stale_after_seconds:
          type: integer
        stale_clusters:
          type: integer
        status:
          enum:
            - fresh
            - degraded
            - stale
            - unscanned
          type: string
        unscanned_clusters:
          type: integer
      required:
        - status
        - last_scan
        - fresh_clusters
        - stale_clusters
        - unscanned_clusters
        - stale_after_seconds
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
    SecuritySeverityCounts:
      properties:
        critical:
          type: integer
        high:
          type: integer
        low:
          type: integer
        medium:
          type: integer
        unknown:
          type: integer
      required:
        - critical
        - high
        - medium
        - low
        - unknown
      type: object

````