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

# List Compliance Data with Conditional Findings

> List compliance records with keyset pagination. When includeFindings=true, findings are only included for compliances with status=FAIL.



## OpenAPI

````yaml get /cspm/compliance
openapi: 3.1.0
info:
  title: Leen Security API
  version: 0.0.1
servers:
  - url: https://api.leen.dev/v1
    description: Production API
  - url: https://api.eu-c1.leen.dev/v1
    description: Production API (EU Region)
  - url: https://api.ap-se2.leen.dev/v1
    description: Production Api (APAC Region)
security: []
paths:
  /cspm/compliance:
    get:
      tags:
        - cspm
      summary: List Compliance Data with Conditional Findings
      description: >-
        List compliance records with keyset pagination. When
        includeFindings=true, findings are only included for compliances with
        status=FAIL.
      operationId: get_cspm_compliance_data
      parameters:
        - name: updatedSince
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            description: >-
              Datetime filter, only return compliances updated since this
              datetime. Example format: `2021-01-01T00:00:00+00:00`
            title: Updatedsince
          description: >-
            Datetime filter, only return compliances updated since this
            datetime. Example format: `2021-01-01T00:00:00+00:00`
          example: '2021-01-01T00:00:00+00:00'
        - name: cursor
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Skip token to continue from the last item in the previous page
            title: Cursor
          description: Skip token to continue from the last item in the previous page
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            description: Limit size (page size)
            default: 100
            title: Limit
          description: Limit size (page size)
        - name: includeFindings
          in: query
          required: false
          schema:
            type: boolean
            description: Include findings data (only for FAIL status compliances)
            default: false
            title: Includefindings
          description: Include findings data (only for FAIL status compliances)
        - name: complianceStatus
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Filter by one or more compliance status. Valid values: PASS, FAIL,
              NOT_APPLICABLE
            title: Compliancestatus
          description: >-
            Filter by one or more compliance status. Valid values: PASS, FAIL,
            NOT_APPLICABLE
          example: PASS, FAIL
        - name: standard
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter by one or more standard (partial match, case insensitive)
            title: Standard
          description: Filter by one or more standard (partial match, case insensitive)
          example: AWS Best Practices, CIS
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/KeySetPaginatedResponse_CSPMComplianceDataRespModel_
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unprocessable Entity
      security:
        - Connection-ID: []
          API-Key: []
components:
  schemas:
    KeySetPaginatedResponse_CSPMComplianceDataRespModel_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/CSPMComplianceDataRespModel'
          type: array
          title: Items
          description: List of items returned in the response
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
          description: Skip token to continue from the last item in the previous page
        previous_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Previous Cursor
          description: Skip token to continue from the first item in the previous page
      type: object
      required:
        - items
      title: KeySetPaginatedResponse[CSPMComplianceDataRespModel]
    ErrorResponse:
      properties:
        type:
          type: string
          title: Type
          description: Type of error
        code:
          type: string
          title: Code
          description: Error code
        message:
          type: string
          title: Message
          description: Error message
        detail:
          items:
            type: object
          type: array
          title: Detail
          description: List of error dictionaries
      type: object
      required:
        - type
        - code
        - message
        - detail
      title: ErrorResponse
    CSPMComplianceDataRespModel:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        vendor_id:
          type: string
          title: Vendor Id
        vendor:
          type: string
          title: Vendor
        control:
          type: string
          title: Control
        standard:
          type: string
          title: Standard
        requirements:
          items:
            type: string
          type: array
          title: Requirements
        status:
          type: string
          title: Status
        vendor_status:
          type: string
          title: Vendor Status
        is_enabled:
          type: boolean
          title: Is Enabled
        status_changed_at:
          type: string
          format: date-time
          title: Status Changed At
        vendor_data:
          anyOf:
            - type: object
            - type: 'null'
          title: Vendor Data
          description: Vendor specific pass through data, values can vary based on vendor
        findings:
          anyOf:
            - items:
                $ref: >-
                  #/components/schemas/CSPMComplianceFindingForComplianceRespModel
              type: array
            - type: 'null'
          title: Findings
      type: object
      required:
        - id
        - vendor_id
        - vendor
        - control
        - standard
        - requirements
        - status
        - vendor_status
        - is_enabled
        - status_changed_at
      title: CSPMComplianceData
      description: Compliance-centric response model with conditional findings
    CSPMComplianceFindingForComplianceRespModel:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        vendor_id:
          type: string
          title: Vendor Id
        title:
          type: string
          title: Title
        description:
          type: string
          title: Description
        remediation:
          type: string
          title: Remediation
        status:
          type: string
          title: Status
        vendor_status:
          type: string
          title: Vendor Status
        severity:
          type: string
          title: Severity
        vendor_severity:
          type: string
          title: Vendor Severity
        start_time:
          type: string
          format: date-time
          title: Start Time
        status_changed_at:
          type: string
          format: date-time
          title: Status Changed At
        resource_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Resource Id
        resource_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Resource Type
        resource_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Resource Name
        resource_region:
          anyOf:
            - type: string
            - type: 'null'
          title: Resource Region
      type: object
      required:
        - id
        - vendor_id
        - title
        - description
        - remediation
        - status
        - vendor_status
        - severity
        - vendor_severity
        - start_time
        - status_changed_at
      title: CSPMComplianceFindingForCompliance
      description: Simplified finding model for inclusion in compliance responses
  securitySchemes:
    Connection-ID:
      type: apiKey
      in: header
      name: X-CONNECTION-ID
    API-Key:
      type: apiKey
      in: header
      name: X-API-KEY

````