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

# Export a framework

> Export a framework's evidence and progress as an audit-ready zip archive.

The archive holds every evidence file uploaded against the framework's evidence-based rules, a
markdown report of the framework's progress and the status of all its rules (broken down by
documentation section when the framework has documents), and CSV manifests of rules and evidence
with SHA-256 checksums.

Send `projectId` to export one project's compliance with the framework. Omit it for the
workspace-wide view across every project in the framework, including workspace-scoped rules.

The export runs as a background task, so this returns `202` immediately. To collect the archive:

1. Poll `GET /background-tasks/{taskId}` with the returned `taskResultId` until `complete` is
   `true`.
2. Read `outputs.storageUri` off that task.
3. Exchange it for a download link at `GET /storage/presigned-url?storageUri=<uri>`.

Rate limited to 2 requests per minute per framework. Asking for an export while an identical one
is still queued returns that task rather than starting a second one.




## OpenAPI

````yaml post /frameworks/{frameworkId}/export
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}/export:
    post:
      tags:
        - Governance
      summary: Export a framework
      description: >
        Export a framework's evidence and progress as an audit-ready zip
        archive.


        The archive holds every evidence file uploaded against the framework's
        evidence-based rules, a

        markdown report of the framework's progress and the status of all its
        rules (broken down by

        documentation section when the framework has documents), and CSV
        manifests of rules and evidence

        with SHA-256 checksums.


        Send `projectId` to export one project's compliance with the framework.
        Omit it for the

        workspace-wide view across every project in the framework, including
        workspace-scoped rules.


        The export runs as a background task, so this returns `202` immediately.
        To collect the archive:


        1. Poll `GET /background-tasks/{taskId}` with the returned
        `taskResultId` until `complete` is
           `true`.
        2. Read `outputs.storageUri` off that task.

        3. Exchange it for a download link at `GET
        /storage/presigned-url?storageUri=<uri>`.


        Rate limited to 2 requests per minute per framework. Asking for an
        export while an identical one

        is still queued returns that task rather than starting a second one.
      operationId: exportFramework
      parameters:
        - $ref: '#/components/parameters/frameworkId'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                projectId:
                  type: string
                  format: uuid
                  nullable: true
                  description: >-
                    Scope the export to this project. It must belong to the
                    framework.
                  example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
      responses:
        '202':
          description: Export queued. Poll `taskResultUrl` for the archive.
          content:
            application/json:
              schema:
                type: object
                required:
                  - taskResultUrl
                  - taskResultId
                properties:
                  taskResultUrl:
                    type: string
                    description: >
                      The path to poll for this export's status and result.
                      Already `/v1`-prefixed, so it is relative to the API host
                      rather than to the `/v1` base url -- or just pass
                      `taskResultId` to `GET /background-tasks/{taskId}`.
                    example: /v1/background-tasks/3fa85f64-5717-4562-b3fc-2c963f66afa6
                  taskResultId:
                    type: string
                    format: uuid
                    description: >-
                      The background task id, for `GET
                      /background-tasks/{taskId}`.
                    example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
        '400':
          description: The project is not part of this framework.
        '403':
          description: You may not export this framework.
        '404':
          description: No such framework or project.
        '429':
          description: Too many export requests for this framework.
        default:
          $ref: '#/components/responses/UnexpectedError'
      x-codeSamples:
        - lang: curl
          source: |
            curl --request POST \
              --url https://api.openlayer.com/v1/frameworks/9f1b3c2d-4e5a-4f60-8a71-2b3c4d5e6f70/export \
              --header 'Authorization: Bearer <token>' \
              --header 'Content-Type: application/json' \
              --data '{"projectId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"}'
components:
  parameters:
    frameworkId:
      name: frameworkId
      in: path
      description: The framework id.
      required: true
      schema:
        type: string
        format: uuid
  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.

````