Kubescape Posture & Compliance API

Framework, control, and resource posture results.

OpenAPI Specification

kubescape-posture-compliance-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: ARMO Platform Customer API (Kubescape) Access Keys Posture & Compliance API
  description: 'The ARMO Platform Customer API is the hosted REST API of ARMO Platform, the commercial multi-cluster, multi-cloud Kubernetes security SaaS built on the open-source Kubescape project (CNCF, Apache 2.0). It exposes the security posture, compliance, vulnerability, runtime threat detection, network policy, and registry/repository scanning data that Kubescape produces.

    The endpoint paths in this document are taken from the public ARMO Customer API reference (hub.armosec.io/reference/customer-api). Request and response schemas are honestly modeled by API Evangelist to represent typical payloads and are not copied verbatim from a published machine-readable spec; verify exact field names against the live reference before integrating.

    Note on the open-source tool: the core Kubescape CLI is not an HTTP API, and the in-cluster Operator components expose their own OpenAPI/Swagger UIs (/openapi/v2/swaggerui) only inside the cluster - not on this hosted host. This document covers the hosted ARMO Platform Customer API only.'
  version: '1.0'
  contact:
    name: ARMO / Kubescape
    url: https://www.armosec.io
  license:
    name: Apache-2.0 (open-source Kubescape core)
    url: https://github.com/kubescape/kubescape/blob/master/LICENSE
servers:
- url: https://api.armosec.io/api/v1
  description: ARMO Platform Customer API
security:
- apiKeyAuth: []
tags:
- name: Posture & Compliance
  description: Framework, control, and resource posture results.
paths:
  /posture/frameworks:
    post:
      operationId: getPostureFrameworks
      tags:
      - Posture & Compliance
      summary: Get framework scan summaries
      description: Returns compliance scan summaries per framework (NSA-CISA, MITRE, CIS, SOC2, and others).
      requestBody:
        $ref: '#/components/requestBodies/ListRequest'
      responses:
        '200':
          description: Framework summaries.
          content:
            application/json:
              schema:
                type: object
                properties:
                  response:
                    type: array
                    items:
                      $ref: '#/components/schemas/FrameworkSummary'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /posture/controls:
    post:
      operationId: getPostureControls
      tags:
      - Posture & Compliance
      summary: Get control run results
      description: Returns per-control run results with pagination. Each control is one of the 200+ Kubescape controls (C-0001..C-0292).
      requestBody:
        $ref: '#/components/requestBodies/ListRequest'
      responses:
        '200':
          description: Control results.
          content:
            application/json:
              schema:
                type: object
                properties:
                  response:
                    type: array
                    items:
                      $ref: '#/components/schemas/ControlResult'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /posture/controls/sections:
    post:
      operationId: getPostureControlSections
      tags:
      - Posture & Compliance
      summary: Get framework subsection summaries
      description: Returns summaries for the subsections of a compliance framework.
      requestBody:
        $ref: '#/components/requestBodies/ListRequest'
      responses:
        '200':
          description: Section summaries.
          content:
            application/json:
              schema:
                type: object
        '401':
          $ref: '#/components/responses/Unauthorized'
  /posture/resources:
    post:
      operationId: getPostureResources
      tags:
      - Posture & Compliance
      summary: List affected resources
      description: Returns the Kubernetes resources affected by posture control failures.
      requestBody:
        $ref: '#/components/requestBodies/ListRequest'
      responses:
        '200':
          description: Affected resources.
          content:
            application/json:
              schema:
                type: object
                properties:
                  response:
                    type: array
                    items:
                      $ref: '#/components/schemas/AffectedResource'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  responses:
    Unauthorized:
      description: Missing or invalid X-API-KEY.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    AffectedResource:
      type: object
      properties:
        resourceID:
          type: string
        kind:
          type: string
          example: Deployment
        namespace:
          type: string
        name:
          type: string
        cluster:
          type: string
    ListRequest:
      type: object
      description: Query body used across ARMO list endpoints.
      properties:
        pageSize:
          type: integer
          default: 50
        pageNum:
          type: integer
          default: 0
        orderBy:
          type: string
        innerFilters:
          type: array
          items:
            type: object
            additionalProperties: true
    FrameworkSummary:
      type: object
      properties:
        name:
          type: string
          example: cis-v1.10.0
        complianceScore:
          type: number
          format: float
        failedControls:
          type: integer
        totalControls:
          type: integer
    ControlResult:
      type: object
      properties:
        id:
          type: string
          example: C-0016
        name:
          type: string
          example: Allow privilege escalation
        severity:
          type: string
          enum:
          - Low
          - Medium
          - High
          - Critical
        status:
          type: string
          enum:
          - passed
          - failed
          - skipped
        affectedResourcesCount:
          type: integer
    Error:
      type: object
      properties:
        error:
          type: string
        code:
          type: integer
  requestBodies:
    ListRequest:
      description: Standard ARMO list/query body with pagination, sorting, and field filters.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ListRequest'
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
      description: Agent Access Key generated in ARMO Platform under Settings > Agent Access Keys, sent in the X-API-KEY request header.