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

# Pack

> Assemble an evidence pack LIVE.

Never cached. A pack generated after evidence was tampered with must show
that, and a document that cannot go stale cannot mislead.

**Who may call it:** any role. A workspace API key is refused here: this is an act that belongs to a named person.



## OpenAPI

````yaml /api/openapi.json get /v1/packs/{key}
openapi: 3.1.0
info:
  title: RotaGrant API
  version: 0.1.0
  description: >-
    The HTTP API of a RotaGrant deployment, made from the product's own route
    definitions at the commit named in `x-rotascale-source`. Nothing here is
    written by hand.


    There is no shared endpoint. RotaGrant runs in your environment, and your
    deployment serves its own copy of this description at `/api/docs`. That copy
    is the authority on what your version has and which features are switched
    on; this one is the reference for one commit of the main line. The version
    is 0.1.0: routes and shapes can still change.


    Every route says who may call it. Most need a bearer token from the identity
    provider your deployment uses, held by a person with the role named. The
    routes an SDK calls also accept a workspace API key. A few are open, and say
    why.
servers:
  - url: https://{deployment}
    description: Your own deployment. There is no shared endpoint.
    variables:
      deployment:
        default: rotagrant.internal.example
        description: The host your deployment answers on.
security: []
paths:
  /v1/packs/{key}:
    get:
      tags:
        - Regulatory
      summary: Pack
      description: >-
        Assemble an evidence pack LIVE.


        Never cached. A pack generated after evidence was tampered with must
        show

        that, and a document that cannot go stale cannot mislead.


        **Who may call it:** any role. A workspace API key is refused here: this
        is an act that belongs to a named person.
      operationId: pack_v1_packs__key__get
      parameters:
        - name: key
          in: path
          required: true
          schema:
            type: string
            title: Key
        - name: sign
          in: query
          required: false
          schema:
            type: boolean
            description: attach an Ed25519 signature
            default: false
            title: Sign
          description: attach an Ed25519 signature
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PackOut'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - bearerToken: []
components:
  schemas:
    PackOut:
      properties:
        pack_version:
          type: integer
          title: Pack Version
        generated_at:
          type: string
          format: date-time
          title: Generated At
          description: ISO 8601. Passed through verbatim; the signature covers it.
        workspace_id:
          type: string
          title: Workspace Id
        disclaimer:
          additionalProperties: true
          type: object
          title: Disclaimer
        regime:
          anyOf:
            - $ref: '#/components/schemas/RegimeDisclosureOut'
            - type: 'null'
        instrument:
          $ref: '#/components/schemas/ClauseMapOut'
        score:
          $ref: '#/components/schemas/PackScoreOut'
        sections:
          items:
            additionalProperties: true
            type: object
          type: array
          title: Sections
        seal:
          anyOf:
            - $ref: '#/components/schemas/DocumentSealOut'
            - type: 'null'
        gaps:
          items:
            $ref: '#/components/schemas/PackGapOut'
          type: array
          title: Gaps
      type: object
      required:
        - pack_version
        - generated_at
        - workspace_id
        - disclaimer
        - instrument
        - score
        - sections
        - gaps
      title: PackOut
      description: A regulator-facing pack for one instrument.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    RegimeDisclosureOut:
      properties:
        code:
          type: string
          title: Code
        name:
          type: string
          title: Name
        applies:
          items:
            type: string
          type: array
          title: Applies
          default: []
        resolved_from:
          type: string
          title: Resolved From
        requires_second_approver_above_minor:
          anyOf:
            - type: integer
            - type: 'null'
          title: Requires Second Approver Above Minor
        second_approver_currency:
          anyOf:
            - type: string
            - type: 'null'
          title: Second Approver Currency
        forbids:
          additionalProperties:
            type: string
          type: object
          title: Forbids
          default: {}
        assessed_against:
          type: string
          title: Assessed Against
      type: object
      required:
        - code
        - name
        - resolved_from
        - assessed_against
      title: RegimeDisclosureOut
      description: Which law an artefact was produced under, and what it required.
    ClauseMapOut:
      properties:
        key:
          type: string
          title: Key
        jurisdiction:
          type: string
          title: Jurisdiction
        regulator:
          type: string
          title: Regulator
        instrument:
          type: string
          title: Instrument
        instrument_ref:
          anyOf:
            - type: string
            - type: 'null'
          title: Instrument Ref
        version:
          type: string
          title: Version
        status:
          type: string
          title: Status
        source_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Url
        accepted_by_customer:
          type: boolean
          title: Accepted By Customer
        accepted_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Accepted By
        accepted_on:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Accepted On
        caveat:
          anyOf:
            - type: string
            - type: 'null'
          title: Caveat
        clauses:
          type: integer
          title: Clauses
        by_provenance:
          additionalProperties:
            type: integer
          type: object
          title: By Provenance
      type: object
      required:
        - key
        - jurisdiction
        - regulator
        - instrument
        - version
        - status
        - accepted_by_customer
        - clauses
        - by_provenance
      title: ClauseMapOut
      description: >-
        One regulatory instrument we claim to map, and how far we stand behind
        it.
    PackScoreOut:
      properties:
        satisfied:
          type: integer
          title: Satisfied
        scored_clauses:
          type: integer
          title: Scored Clauses
        percent:
          type: integer
          title: Percent
        note:
          type: string
          title: Note
      type: object
      required:
        - satisfied
        - scored_clauses
        - percent
        - note
      title: PackScoreOut
      description: How much of the instrument is evidenced.
    DocumentSealOut:
      properties:
        seal_version:
          type: integer
          title: Seal Version
        algorithm:
          type: string
          title: Algorithm
        content_hash:
          type: string
          title: Content Hash
        signature:
          type: string
          title: Signature
        public_key:
          type: string
          title: Public Key
        signing_key_ref:
          type: string
          title: Signing Key Ref
        ephemeral:
          type: boolean
          title: Ephemeral
        custody:
          type: string
          title: Custody
        custody_means:
          type: string
          title: Custody Means
        how_to_verify:
          type: string
          title: How To Verify
        warning:
          anyOf:
            - type: string
            - type: 'null'
          title: Warning
      type: object
      required:
        - seal_version
        - algorithm
        - content_hash
        - signature
        - public_key
        - signing_key_ref
        - ephemeral
        - custody
        - custody_means
        - how_to_verify
      title: DocumentSealOut
      description: The seal, as it goes over the wire.
    PackGapOut:
      properties:
        clause:
          type: string
          title: Clause
        title:
          type: string
          title: Title
        missing:
          items:
            type: string
          type: array
          title: Missing
        fixes:
          items:
            $ref: '#/components/schemas/PackFixOut'
          type: array
          title: Fixes
          default: []
      type: object
      required:
        - clause
        - title
        - missing
      title: PackGapOut
      description: A clause with nothing behind it. The point of the document.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    PackFixOut:
      properties:
        evidence:
          type: string
          title: Evidence
        fix:
          type: string
          title: Fix
        kind:
          type: string
          title: Kind
        route:
          anyOf:
            - type: string
            - type: 'null'
          title: Route
      type: object
      required:
        - evidence
        - fix
        - kind
      title: PackFixOut
      description: One way to close a gap, and where to do it.
  securitySchemes:
    bearerToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        A token from the identity provider your deployment federates with. It
        identifies a person; their roles in the workspace decide what they may
        do.

````

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