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

# Export a framework

> Export a framework as an audit-ready zip archive.



## 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 as an audit-ready zip archive.
      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. Omit it for the workspace-wide view across every
                    project in the framework, including workspace-scoped rules.
                  example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
      responses:
        '202':
          description: >-
            Export queued. Poll `taskResultUrl` for the archive. If an identical
            export is still queued, that task is returned instead of a new one.
            The archive holds every evidence file uploaded against the
            framework's evidence rules, a markdown report of the framework's
            progress and rule statuses (by documentation section when the
            framework has documents), and CSV manifests of rules and evidence
            with SHA-256 checksums.
          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. The limit is 2 per minute per framework.
        default:
          $ref: '#/components/responses/UnexpectedError'
      x-codeSamples:
        - lang: python
          source: |
            from openlayer import Openlayer

            client = Openlayer()

            export = client.governance.frameworks.export(
                "5e6f7a8b-9c0d-4e1f-8a2b-3c4d5e6f7a8b",
                project_id="3fa85f64-5717-4562-b3fc-2c963f66afa6",
            )
            print(export.task_result_url)
        - lang: typescript
          source: >
            import Openlayer from 'openlayer';


            const client = new Openlayer();


            const response = await
            client.governance.frameworks.export('5e6f7a8b-9c0d-4e1f-8a2b-3c4d5e6f7a8b',
            {
              projectId: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
            });


            console.log(response);
        - lang: go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openlayer-ai/openlayer-go\"\n)\n\nclient := openlayer.NewClient()\nexport, err := client.Governance.Frameworks.Export(\n\tcontext.TODO(),\n\t\"5e6f7a8b-9c0d-4e1f-8a2b-3c4d5e6f7a8b\",\n\topenlayer.GovernanceFrameworkExportParams{\n\t\tProjectID: openlayer.F(\"3fa85f64-5717-4562-b3fc-2c963f66afa6\"),\n\t},\n)\nif err != nil {\n\tpanic(err.Error())\n}\nfmt.Printf(\"%+v\\n\", export.TaskResultURL)\n"
        - lang: java
          source: >
            import com.openlayer.api.client.OpenlayerClient;

            import com.openlayer.api.client.okhttp.OpenlayerOkHttpClient;

            import
            com.openlayer.api.models.governance.frameworks.FrameworkExportParams;

            import
            com.openlayer.api.models.governance.frameworks.FrameworkExportResponse;


            OpenlayerClient client = OpenlayerOkHttpClient.fromEnv();


            FrameworkExportParams params = FrameworkExportParams.builder()
                .frameworkId("5e6f7a8b-9c0d-4e1f-8a2b-3c4d5e6f7a8b")
                .projectId("3fa85f64-5717-4562-b3fc-2c963f66afa6")
                .build();
            FrameworkExportResponse export =
            client.governance().frameworks().export(params);
        - lang: ruby
          source: |
            require "openlayer"

            openlayer = Openlayer::Client.new(api_key: ENV["OPENLAYER_API_KEY"])

            response = openlayer.governance.frameworks.export(
              "5e6f7a8b-9c0d-4e1f-8a2b-3c4d5e6f7a8b",
              project_id: "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            )

            puts(response)
        - 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.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.