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

# List a framework's per-project compliance

> Get a compliance roll-up for a framework, one row per project it applies to.

Each row counts the project's rule results by status, so you can report on where a framework is
complete and where it is not without fetching every individual rule result.




## OpenAPI

````yaml get /frameworks/{frameworkId}/project-rule-stats
openapi: 3.0.3
info:
  contact:
    email: support@openlayer.com
    name: Openlayer
    url: https://openlayer.com/
  description: API for interacting with the Openlayer server.
  title: Openlayer API
  version: '1.0'
  x-logo:
    url: https://logo.clearbit.com/openlayer.com
servers:
  - url: https://api.openlayer.com/v1
    description: Our prod backend
security:
  - bearerAuth: []
paths:
  /frameworks/{frameworkId}/project-rule-stats:
    get:
      tags:
        - Governance
      summary: List a framework's per-project compliance
      description: >
        Get a compliance roll-up for a framework, one row per project it applies
        to.


        Each row counts the project's rule results by status, so you can report
        on where a framework is

        complete and where it is not without fetching every individual rule
        result.
      operationId: listFrameworkProjectRuleStats
      parameters:
        - $ref: '#/components/parameters/frameworkId'
        - $ref: '#/components/parameters/page'
        - $ref: '#/components/parameters/perPage'
        - $ref: '#/components/parameters/asc'
        - name: sortColumn
          in: query
          description: The column to sort on.
          required: false
          schema:
            type: string
            enum:
              - projectName
              - total
              - overallCompletion
              - totalPassing
              - totalFailing
              - totalSkipped
              - totalRunning
              - totalError
              - totalPending
              - totalDueSoon
      responses:
        '200':
          description: Status OK.
          content:
            application/json:
              schema:
                type: object
                required:
                  - items
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/ProjectRuleStatistic'
        default:
          $ref: '#/components/responses/UnexpectedError'
      x-codeSamples:
        - lang: curl
          source: |
            curl --request GET \
              --url 'https://api.openlayer.com/v1/frameworks/9f1b3c2d-4e5a-4f60-8a71-2b3c4d5e6f70/project-rule-stats?sortColumn=totalFailing&asc=false' \
              --header 'Authorization: Bearer <token>'
components:
  parameters:
    frameworkId:
      name: frameworkId
      in: path
      description: The framework id.
      required: true
      schema:
        type: string
        format: uuid
    page:
      name: page
      in: query
      description: The page to return in a paginated query.
      schema:
        type: integer
        minimum: 1
        default: 1
    perPage:
      name: perPage
      in: query
      description: Maximum number of items to return per page.
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 25
    asc:
      name: asc
      in: query
      description: Whether to sort in ascending order.
      required: false
      schema:
        type: boolean
        default: true
  schemas:
    ProjectRuleStatistic:
      allOf:
        - $ref: '#/components/schemas/RuleResultStatusCounts'
        - type: object
          properties:
            projectId:
              type: string
              format: uuid
              description: The project id.
              example: 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e
            projectName:
              type: string
              description: The project name.
              example: Customer chatbot
            taskType:
              type: string
              description: The project's task type.
              example: llm-base
            byRuleType:
              type: object
              description: >-
                The same counts, broken down by the type of the rule each result
                belongs to.
              properties:
                platform:
                  $ref: '#/components/schemas/RuleResultStatusCounts'
                evidence:
                  $ref: '#/components/schemas/RuleResultStatusCounts'
          required:
            - projectId
            - projectName
            - taskType
    RuleResultStatusCounts:
      type: object
      properties:
        total:
          type: integer
          minimum: 0
          description: The total number of rule results.
        totalPassing:
          type: integer
          minimum: 0
          description: The number of passing rule results.
        totalFailing:
          type: integer
          minimum: 0
          description: The number of failing rule results.
        totalSkipped:
          type: integer
          minimum: 0
          description: The number of skipped rule results.
        totalRunning:
          type: integer
          minimum: 0
          description: The number of rule results currently being evaluated.
        totalError:
          type: integer
          minimum: 0
          description: The number of rule results that errored during evaluation.
        totalPending:
          type: integer
          minimum: 0
          description: The number of rule results that have not been satisfied yet.
        totalDueSoon:
          type: integer
          minimum: 0
          description: The number of rule results whose evidence is about to expire.
      required:
        - total
        - totalPassing
        - totalFailing
        - totalSkipped
        - totalRunning
        - totalError
        - totalPending
        - totalDueSoon
  responses:
    UnexpectedError:
      description: Unexpected error.
      content:
        application/json:
          schema:
            type: object
            required:
              - code
              - error
            properties:
              code:
                type: integer
                format: int32
              error:
                type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >
        Bearer authentication header of the form `Bearer <token>`, where
        `<token>` is your workspace API key. See [Find your API
        key](https://www.openlayer.com/docs/workspace-and-projects/find-your-api-key)
        for more information.

````