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

# Retrieve a framework document

> Retrieve a framework document with its sections and rules.



## OpenAPI

````yaml get /frameworks/{frameworkId}/documents/{documentId}
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}/documents/{documentId}:
    get:
      tags:
        - Governance
      summary: Retrieve a framework document
      description: Retrieve a framework document with its sections and rules.
      operationId: getFrameworkDocumentById
      parameters:
        - $ref: '#/components/parameters/frameworkId'
        - $ref: '#/components/parameters/documentId'
      responses:
        '200':
          description: Status OK.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FrameworkDocument'
        default:
          $ref: '#/components/responses/UnexpectedError'
      x-codeSamples:
        - lang: python
          source: |
            from openlayer import Openlayer

            client = Openlayer()

            document = client.governance.frameworks.documents.retrieve(
                "7b8c9d0e-1f2a-4b3c-9d4e-5f6a7b8c9d0e",
                framework_id="5e6f7a8b-9c0d-4e1f-8a2b-3c4d5e6f7a8b",
            )
            print(document.title)
        - lang: typescript
          source: >
            import Openlayer from 'openlayer';


            const client = new Openlayer();


            const document = await
            client.governance.frameworks.documents.retrieve('7b8c9d0e-1f2a-4b3c-9d4e-5f6a7b8c9d0e',
            {
              frameworkId: '5e6f7a8b-9c0d-4e1f-8a2b-3c4d5e6f7a8b',
            });


            console.log(document);
        - 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()\ndocument, err := client.Governance.Frameworks.Documents.Get(\n\tcontext.TODO(),\n\t\"5e6f7a8b-9c0d-4e1f-8a2b-3c4d5e6f7a8b\",\n\t\"7b8c9d0e-1f2a-4b3c-9d4e-5f6a7b8c9d0e\",\n)\nif err != nil {\n\tpanic(err.Error())\n}\nfmt.Printf(\"%+v\\n\", document.Title)\n"
        - lang: java
          source: >
            import com.openlayer.api.client.OpenlayerClient;

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

            import
            com.openlayer.api.models.governance.frameworks.documents.DocumentRetrieveParams;

            import
            com.openlayer.api.models.governance.frameworks.documents.DocumentRetrieveResponse;


            OpenlayerClient client = OpenlayerOkHttpClient.fromEnv();


            DocumentRetrieveParams params = DocumentRetrieveParams.builder()
                .frameworkId("5e6f7a8b-9c0d-4e1f-8a2b-3c4d5e6f7a8b")
                .documentId("7b8c9d0e-1f2a-4b3c-9d4e-5f6a7b8c9d0e")
                .build();
            DocumentRetrieveResponse document =
            client.governance().frameworks().documents().retrieve(params);
        - lang: ruby
          source: |
            require "openlayer"

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

            document = openlayer.governance.frameworks.documents.retrieve(
              "7b8c9d0e-1f2a-4b3c-9d4e-5f6a7b8c9d0e",
              framework_id: "5e6f7a8b-9c0d-4e1f-8a2b-3c4d5e6f7a8b"
            )

            puts(document)
        - lang: curl
          source: |
            curl --request GET \
              --url https://api.openlayer.com/v1/frameworks/9f1b3c2d-4e5a-4f60-8a71-2b3c4d5e6f70/documents/4a6c8e0f-1b2d-4e3f-9a5b-6c7d8e9f0a1b \
              --header 'Authorization: Bearer <token>'
components:
  parameters:
    frameworkId:
      name: frameworkId
      in: path
      description: The framework id.
      required: true
      schema:
        type: string
        format: uuid
    documentId:
      name: documentId
      in: path
      description: The framework document id.
      required: true
      schema:
        type: string
        format: uuid
  schemas:
    FrameworkDocument:
      type: object
      description: >
        The text of the standard a framework is based on, split into sections
        and subsections, with the rules mapped to each part.
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
          description: The document id.
          example: 4a6c8e0f-1b2d-4e3f-9a5b-6c7d8e9f0a1b
        frameworkId:
          type: string
          format: uuid
          readOnly: true
          description: The framework the document belongs to.
        title:
          type: string
          maxLength: 512
          description: The document title.
          example: EU AI Act -- Regulation (EU) 2024/1689
        sections:
          type: array
          readOnly: true
          description: >
            The document's sections, in display order. Only returned when
            retrieving a single document.
          items:
            $ref: '#/components/schemas/FrameworkDocumentSection'
        dateCreated:
          type: string
          format: date-time
          readOnly: true
          description: The creation date.
          example: '2026-03-22T11:31:01.185Z'
        dateUpdated:
          type: string
          format: date-time
          readOnly: true
          description: The last update date.
          example: '2026-03-22T11:31:01.185Z'
      required:
        - id
        - frameworkId
        - title
        - dateCreated
        - dateUpdated
    FrameworkDocumentSection:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
          description: The section id.
          example: 2e4f6a8c-9b1d-4c3e-8f5a-7b9c0d1e2f3a
        documentId:
          type: string
          format: uuid
          readOnly: true
          description: The document the section belongs to.
        number:
          type: string
          maxLength: 64
          description: The section number as it appears in the source standard.
          example: Article 9
        title:
          type: string
          maxLength: 512
          description: The section title.
          example: Risk management system
        text:
          type: string
          nullable: true
          description: The section text.
        sortOrder:
          type: integer
          default: 0
          description: The position of the section within the document.
        ruleCount:
          type: integer
          minimum: 0
          readOnly: true
          description: >
            How many rules are linked to this section, including its
            subsections. Use it to decide whether to fetch the section's rules.
        rules:
          type: array
          readOnly: true
          description: The rules linked directly to this section.
          items:
            $ref: '#/components/schemas/FrameworkDocumentRule'
        subsections:
          type: array
          readOnly: true
          description: The section's subsections, in display order.
          items:
            $ref: '#/components/schemas/FrameworkDocumentSubsection'
      required:
        - id
        - documentId
        - number
        - title
        - sortOrder
    FrameworkDocumentRule:
      type: object
      properties:
        id: 2eabd9b2-0640-4454-b270-cbc8c7b5aa59
        name: 26229c95-fc5d-49ed-9df3-bb4a25760b76
        description: 5c3c6f27-cd84-4a89-b2ee-70d17d7b9667
        scope: b4b90309-c369-41c1-a726-ba44ab62fefa
        type: 7e526f85-4b15-4757-a89e-50d10d5e19a3
        evidenceType: 699e9096-5153-45fc-afe9-949d25d5e6ba
        renewalCadenceDays: 1fe02c5b-5512-4030-8010-6fee9b76e4c8
        automationType: f0351206-0ef6-4070-9f19-95960cf627e8
        automationParams: 2de44f93-d01f-44a1-88bb-d6fbaeb7d5ce
        deactivated: 921ce367-1820-46f0-a93e-c6c7cb407929
        immutable: ef6d5782-fb2e-4cbe-b701-389653276508
        dateCreated: 6a38ea9f-6e18-4816-92bc-6e2d40fe8423
        dateUpdated: 0a2973aa-5159-4f88-b227-bae09c7a193a
      required:
        - id
        - name
        - scope
        - type
    FrameworkDocumentSubsection:
      type: object
      description: >
        A subsection usually states one individual requirement of the standard,
        so it is where you see which rules cover a specific clause.
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
          description: The subsection id.
          example: 1d3f5a7b-8c9e-4b2d-9f6a-0c1e2d3f4a5b
        sectionId:
          type: string
          format: uuid
          readOnly: true
          description: The section the subsection belongs to.
        number:
          type: string
          maxLength: 64
          description: The subsection number as it appears in the source standard.
          example: '9.2'
        title:
          type: string
          maxLength: 512
          description: The subsection title.
          example: Identification of known and foreseeable risks
        text:
          type: string
          nullable: true
          description: >-
            The subsection text. This is the requirement your rules are mapped
            against.
        sortOrder:
          type: integer
          default: 0
          description: The position of the subsection within its section.
        ruleCount:
          type: integer
          minimum: 0
          readOnly: true
          description: How many rules are linked to this subsection.
        rules:
          type: array
          readOnly: true
          description: The rules linked to this subsection.
          items:
            $ref: '#/components/schemas/FrameworkDocumentRule'
      required:
        - id
        - sectionId
        - number
        - title
        - sortOrder
  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.