{
  "registerVersion": 4,
  "apiVersion": "1.0.0",
  "source": "src/lib/openapi/openapi-v1.yaml",
  "scope": "Response fields of the tenant-facing public API v1. This register contains no tenant data and is not the complete database or export schema.",
  "exportDictionary": {
    "publicPath": "/tenant-data-dictionary.json",
    "source": "Generated from the tenant export catalogue, the same source as the data-dictionary.json in an authorised full tenant export, and limited to tenant-facing modules.",
    "tables": 925,
    "modules": 20,
    "excludedTables": 264,
    "note": "Platform, billing, internal and security tables are left out, columns that can hold a secret are never published, and every published column is reviewed. Table purposes are written for this register; database comments are not published. An export contains the rows the requesting administrator may read."
  },
  "exportArchive": {
    "formatVersion": 1,
    "schemas": {
      "manifest.json": "/tenant-export-manifest.schema.json",
      "data-dictionary.json": "/tenant-export-dictionary.schema.json"
    },
    "access": "An administrator requests and downloads a tenant export after step-up authentication. Rows and attachments are limited by that administrator’s current access.",
    "entries": [
      {
        "path": "manifest.json",
        "format": "JSON",
        "condition": "always",
        "conditionDa": "Altid",
        "description": "Export scope, counts, skipped items and checksums of the other archive files.",
        "descriptionDa": "Eksportens omfang, antal, udeladte poster og kontrolsummer for de øvrige filer."
      },
      {
        "path": "data-dictionary.json",
        "format": "JSON",
        "condition": "always",
        "conditionDa": "Altid",
        "description": "Table and column metadata for the authorised export, including keys and relations.",
        "descriptionDa": "Metadata om tabeller og kolonner i den autoriserede eksport, herunder nøgler og relationer."
      },
      {
        "path": "data-dictionary.md",
        "format": "Markdown",
        "condition": "always",
        "conditionDa": "Altid",
        "description": "Readable rendering of the data dictionary.",
        "descriptionDa": "Læsevenlig udgave af databeskrivelsen."
      },
      {
        "path": "data/{table}.json",
        "format": "JSON array",
        "formatDa": "JSON-array",
        "condition": "when a readable table has rows",
        "conditionDa": "Når en læsbar tabel har rækker",
        "description": "Rows visible to the requesting administrator, retaining identifiers and relations.",
        "descriptionDa": "Rækker, som administratoren kan læse, med identifikatorer og relationer."
      },
      {
        "path": "data/{table}.csv",
        "format": "CSV",
        "condition": "when a readable flat table has rows",
        "conditionDa": "Når en læsbar, flad tabel har rækker",
        "description": "The same visible rows as JSON, with a UTF-8 BOM and a header row.",
        "descriptionDa": "De samme læsbare rækker som i JSON, med UTF-8 BOM og kolonneoverskrifter."
      },
      {
        "path": "attachments/{bucket}/{path}",
        "format": "original file",
        "formatDa": "Originalfil",
        "condition": "when readable and within the export size budget",
        "conditionDa": "Når filen er læsbar og inden for størrelsesgrænsen",
        "description": "A tenant attachment downloaded with the administrator’s access.",
        "descriptionDa": "En vedhæftet fil hentet med administratorens adgang."
      }
    ],
    "structures": [
      {
        "path": "manifest.json",
        "fields": [
          {
            "name": "format_version",
            "type": "integer"
          },
          {
            "name": "exported_at",
            "type": "date-time string"
          },
          {
            "name": "tenant",
            "type": "object",
            "description": "The requested tenant id and name.",
            "descriptionDa": "Id og navn på den valgte organisation."
          },
          {
            "name": "included_tenant_ids",
            "type": "string[]",
            "description": "The requested tenant and visible descendants considered for export.",
            "descriptionDa": "Den valgte organisation og synlige underenheder, der indgår i eksporten."
          },
          {
            "name": "requested_by",
            "type": "string",
            "description": "The requesting administrator’s user id.",
            "descriptionDa": "Id for den administrator, der bestilte eksporten."
          },
          {
            "name": "access_note",
            "type": "string"
          },
          {
            "name": "totals",
            "type": "object",
            "description": "Counts of tables, records and attachments, including skipped items.",
            "descriptionDa": "Antal tabeller, poster og filer, herunder udeladte poster."
          },
          {
            "name": "tables",
            "type": "object[]",
            "description": "Per-table row counts, generated files and a skip reason when a read failed.",
            "descriptionDa": "Antal rækker og filer pr. tabel samt årsag, hvis læsning mislykkedes."
          },
          {
            "name": "attachments_not_included",
            "type": "object[]",
            "description": "Attachment path and reason for each omitted file.",
            "descriptionDa": "Filsti og årsag for hver udeladt vedhæftning."
          },
          {
            "name": "files",
            "type": "object[]",
            "description": "Path, byte count and SHA-256 of every other file in the archive.",
            "descriptionDa": "Filsti, størrelse og SHA-256 for hver af de øvrige filer i arkivet."
          }
        ]
      },
      {
        "path": "data-dictionary.json",
        "fields": [
          {
            "name": "generated_at",
            "type": "date-time string"
          },
          {
            "name": "tables",
            "type": "object[]",
            "description": "Table name, column names/types/nullability, primary key, foreign keys and exported record count.",
            "descriptionDa": "Tabelnavn, kolonnenavne, typer, nullbarhed, primær- og fremmednøgler samt antal eksporterede rækker."
          }
        ]
      }
    ]
  },
  "resources": [
    {
      "name": "ProcessingActivity",
      "title": "Processing activities",
      "titleDa": "Behandlingsaktiviteter",
      "path": "/api-v1-processing-activities",
      "readScope": "ropa:read",
      "fields": [
        {
          "name": "id",
          "type": "string",
          "nullable": false,
          "format": "uuid"
        },
        {
          "name": "name",
          "type": "string",
          "nullable": false
        },
        {
          "name": "purposes",
          "type": "JSON value",
          "nullable": true,
          "description": "Stored as JSON; the shape is whatever was written.",
          "descriptionDa": "Gemmes som JSON; strukturen afhænger af de skrevne data."
        },
        {
          "name": "legal_basis",
          "type": "string",
          "nullable": true
        },
        {
          "name": "additional_legal_bases",
          "type": "string[]",
          "nullable": true
        },
        {
          "name": "status",
          "type": "string",
          "nullable": false
        },
        {
          "name": "created_at",
          "type": "string",
          "nullable": false,
          "format": "date-time"
        },
        {
          "name": "updated_at",
          "type": "string",
          "nullable": false,
          "format": "date-time"
        }
      ]
    },
    {
      "name": "Supplier",
      "title": "Suppliers",
      "titleDa": "Leverandører",
      "path": "/api-v1-suppliers",
      "readScope": "vendors:read",
      "fields": [
        {
          "name": "id",
          "type": "string",
          "nullable": false,
          "format": "uuid"
        },
        {
          "name": "name",
          "type": "string",
          "nullable": false
        },
        {
          "name": "supplier_type",
          "type": "string",
          "nullable": false
        },
        {
          "name": "supplier_status",
          "type": "string",
          "nullable": true
        },
        {
          "name": "ai_risk_level",
          "type": "string",
          "nullable": true
        },
        {
          "name": "criticality_level",
          "type": "string",
          "nullable": true
        },
        {
          "name": "country",
          "type": "string",
          "nullable": true
        },
        {
          "name": "created_at",
          "type": "string",
          "nullable": false,
          "format": "date-time"
        }
      ]
    },
    {
      "name": "Asset",
      "title": "IT assets",
      "titleDa": "IT-aktiver",
      "path": "/api-v1-assets",
      "readScope": "assets:read",
      "fields": [
        {
          "name": "id",
          "type": "string",
          "nullable": false,
          "format": "uuid"
        },
        {
          "name": "name",
          "type": "string",
          "nullable": false
        },
        {
          "name": "asset_type",
          "type": "string",
          "nullable": false
        },
        {
          "name": "business_criticality",
          "type": "string",
          "nullable": true
        },
        {
          "name": "hosting_model",
          "type": "string",
          "nullable": true
        },
        {
          "name": "created_at",
          "type": "string",
          "nullable": false,
          "format": "date-time"
        }
      ]
    },
    {
      "name": "Incident",
      "title": "Incidents",
      "titleDa": "Hændelser",
      "path": "/api-v1-incidents",
      "readScope": "incidents:read",
      "fields": [
        {
          "name": "id",
          "type": "string",
          "nullable": false,
          "format": "uuid"
        },
        {
          "name": "title",
          "type": "string",
          "nullable": false
        },
        {
          "name": "initial_risk_level",
          "type": "string",
          "nullable": true
        },
        {
          "name": "final_risk_level",
          "type": "string",
          "nullable": true
        },
        {
          "name": "status",
          "type": "string",
          "nullable": false
        },
        {
          "name": "incident_occurred_at",
          "type": "string",
          "nullable": true,
          "format": "date-time"
        },
        {
          "name": "created_at",
          "type": "string",
          "nullable": false,
          "format": "date-time"
        }
      ]
    },
    {
      "name": "Risk",
      "title": "Risks",
      "titleDa": "Risici",
      "path": "/api-v1-risks",
      "readScope": "risks:read",
      "fields": [
        {
          "name": "id",
          "type": "string",
          "nullable": false,
          "format": "uuid"
        },
        {
          "name": "risk_title",
          "type": "string",
          "nullable": false
        },
        {
          "name": "risk_description",
          "type": "string",
          "nullable": true
        },
        {
          "name": "risk_category",
          "type": "string",
          "nullable": true
        },
        {
          "name": "domain",
          "type": "string",
          "nullable": false
        },
        {
          "name": "risk_status",
          "type": "string",
          "nullable": true
        },
        {
          "name": "inherent_likelihood",
          "type": "integer",
          "nullable": true
        },
        {
          "name": "inherent_impact",
          "type": "integer",
          "nullable": true
        },
        {
          "name": "inherent_score",
          "type": "number",
          "nullable": true
        },
        {
          "name": "inherent_methodology_version_id",
          "type": "string",
          "nullable": true,
          "format": "uuid"
        },
        {
          "name": "inherent_methodology_version",
          "type": "object",
          "nullable": true,
          "description": "The published methodology version the inherent score was recorded under. Null when the score is not linked to a published methodology version. Read its labels and criteria from `/api-v1-risk-methodology`.",
          "descriptionDa": "Den offentliggjorte metodeversion, som den iboende score blev registreret under. Null, når scoren ikke er knyttet til en offentliggjort metodeversion. Læs etiketter og kriterier fra `/api-v1-risk-methodology`."
        },
        {
          "name": "residual_likelihood",
          "type": "integer",
          "nullable": true
        },
        {
          "name": "residual_impact",
          "type": "integer",
          "nullable": true
        },
        {
          "name": "residual_score",
          "type": "number",
          "nullable": true
        },
        {
          "name": "residual_methodology_version_id",
          "type": "string",
          "nullable": true,
          "format": "uuid"
        },
        {
          "name": "residual_methodology_version",
          "type": "object",
          "nullable": true,
          "description": "The published methodology version the residual score was recorded under. Null when the score is not attributed to a version.",
          "descriptionDa": "Den offentliggjorte metodeversion, som restscoren blev registreret under. Null, når scoren ikke er henført til en version."
        },
        {
          "name": "risk_level",
          "type": "number",
          "nullable": false
        },
        {
          "name": "risk_owner_id",
          "type": "string",
          "nullable": true,
          "format": "uuid"
        },
        {
          "name": "next_review_date",
          "type": "string",
          "nullable": true,
          "format": "date"
        },
        {
          "name": "confidentiality_level",
          "type": "string",
          "nullable": false,
          "description": "K0 open, K1 internal, K2 confidential, K3 sensitive.",
          "descriptionDa": "K0 åben, K1 intern, K2 fortrolig, K3 følsom."
        },
        {
          "name": "created_at",
          "type": "string",
          "nullable": false,
          "format": "date-time"
        },
        {
          "name": "updated_at",
          "type": "string",
          "nullable": false,
          "format": "date-time"
        }
      ]
    },
    {
      "name": "AuditLogEntry",
      "title": "Audit log entries",
      "titleDa": "Loghændelser",
      "path": "/api-v1-audit",
      "readScope": "audit:read",
      "fields": [
        {
          "name": "id",
          "type": "string",
          "nullable": false,
          "format": "uuid"
        },
        {
          "name": "user_id",
          "type": "string",
          "nullable": true,
          "format": "uuid"
        },
        {
          "name": "entity_type",
          "type": "string",
          "nullable": true
        },
        {
          "name": "entity_id",
          "type": "string",
          "nullable": true
        },
        {
          "name": "action",
          "type": "string",
          "nullable": false
        },
        {
          "name": "action_category",
          "type": "string",
          "nullable": false
        },
        {
          "name": "severity",
          "type": "string",
          "nullable": false
        },
        {
          "name": "created_at",
          "type": "string",
          "nullable": true,
          "format": "date-time"
        }
      ]
    },
    {
      "name": "Control",
      "title": "Controls",
      "titleDa": "Kontroller",
      "path": "/api-v1-controls",
      "readScope": "controls:read",
      "fields": [
        {
          "name": "id",
          "type": "string",
          "nullable": false,
          "format": "uuid"
        },
        {
          "name": "control_ref",
          "type": "string",
          "nullable": true
        },
        {
          "name": "control_title",
          "type": "string",
          "nullable": false
        },
        {
          "name": "control_description",
          "type": "string",
          "nullable": true
        },
        {
          "name": "control_type",
          "type": "string",
          "nullable": true
        },
        {
          "name": "catalog",
          "type": "string",
          "nullable": true
        },
        {
          "name": "domain",
          "type": "string",
          "nullable": true
        },
        {
          "name": "framework",
          "type": "string",
          "nullable": true
        },
        {
          "name": "pcf_control_uid",
          "type": "string",
          "nullable": true,
          "format": "uuid"
        },
        {
          "name": "status",
          "type": "string",
          "nullable": false
        },
        {
          "name": "effectiveness_rating",
          "type": "string",
          "nullable": true
        },
        {
          "name": "scope_type",
          "type": "string",
          "nullable": false
        },
        {
          "name": "entity_tenant_id",
          "type": "string",
          "nullable": false,
          "format": "uuid",
          "description": "The organisation unit the control belongs to",
          "descriptionDa": "Den organisationsenhed, kontrollen tilhører."
        },
        {
          "name": "test_frequency",
          "type": "string",
          "nullable": true
        },
        {
          "name": "last_test_date",
          "type": "string",
          "nullable": true,
          "format": "date"
        },
        {
          "name": "next_test_date",
          "type": "string",
          "nullable": true,
          "format": "date"
        },
        {
          "name": "implementation_date",
          "type": "string",
          "nullable": true,
          "format": "date"
        },
        {
          "name": "created_at",
          "type": "string",
          "nullable": false,
          "format": "date-time"
        },
        {
          "name": "updated_at",
          "type": "string",
          "nullable": false,
          "format": "date-time"
        }
      ]
    },
    {
      "name": "Framework",
      "title": "Frameworks",
      "titleDa": "Rammeværk",
      "path": "/api-v1-frameworks",
      "readScope": "frameworks:read",
      "fields": [
        {
          "name": "id",
          "type": "string",
          "nullable": false,
          "format": "uuid"
        },
        {
          "name": "name",
          "type": "string",
          "nullable": false
        },
        {
          "name": "source_kind",
          "type": "string",
          "nullable": false
        },
        {
          "name": "status",
          "type": "string",
          "nullable": false
        },
        {
          "name": "version_label",
          "type": "string",
          "nullable": true
        },
        {
          "name": "library_entry_id",
          "type": "string",
          "nullable": true,
          "format": "uuid",
          "description": "The catalogue edition the adoption follows.",
          "descriptionDa": "Den katalogudgave, som adoptionen følger."
        },
        {
          "name": "applies_to_domains",
          "type": "string[]",
          "nullable": true
        },
        {
          "name": "is_applicable",
          "type": "boolean",
          "nullable": true
        },
        {
          "name": "compliance_status",
          "type": "string",
          "nullable": true
        },
        {
          "name": "compliance_deadline",
          "type": "string",
          "nullable": true,
          "format": "date"
        },
        {
          "name": "effective_from",
          "type": "string",
          "nullable": true,
          "format": "date"
        },
        {
          "name": "next_review_date",
          "type": "string",
          "nullable": true,
          "format": "date"
        },
        {
          "name": "last_assessment_date",
          "type": "string",
          "nullable": true,
          "format": "date"
        },
        {
          "name": "entity_tenant_id",
          "type": "string",
          "nullable": true,
          "format": "uuid"
        },
        {
          "name": "created_at",
          "type": "string",
          "nullable": false,
          "format": "date-time"
        },
        {
          "name": "updated_at",
          "type": "string",
          "nullable": false,
          "format": "date-time"
        }
      ]
    },
    {
      "name": "Requirement",
      "title": "Requirements",
      "titleDa": "Krav",
      "path": "/api-v1-requirements",
      "readScope": "frameworks:read",
      "fields": [
        {
          "name": "id",
          "type": "string",
          "nullable": false,
          "format": "uuid"
        },
        {
          "name": "library_entry_id",
          "type": "string",
          "nullable": true,
          "format": "uuid"
        },
        {
          "name": "external_source_id",
          "type": "string",
          "nullable": true,
          "format": "uuid",
          "description": "Set when the clause was entered on the adoption itself; it is the framework's id.",
          "descriptionDa": "Angives, når klausulen er indtastet direkte på adoptionen; det er rammeværkets id."
        },
        {
          "name": "parent_clause_id",
          "type": "string",
          "nullable": true,
          "format": "uuid"
        },
        {
          "name": "clause_ref",
          "type": "string",
          "nullable": false
        },
        {
          "name": "clause_title",
          "type": "string",
          "nullable": true
        },
        {
          "name": "clause_text",
          "type": "string",
          "nullable": true,
          "description": "Null when the catalogue source text is withheld.",
          "descriptionDa": "Null, når katalogets kildetekst tilbageholdes."
        },
        {
          "name": "source_text_state",
          "type": "object",
          "nullable": false,
          "description": "Present when clause_text is withheld by the catalogue licence policy or its licence cannot be resolved.",
          "descriptionDa": "Angives, når clause_text tilbageholdes af katalogets licenspolitik, eller når licensen ikke kan fastslås."
        },
        {
          "name": "obligation_type",
          "type": "string",
          "nullable": false
        },
        {
          "name": "display_order",
          "type": "integer",
          "nullable": false
        },
        {
          "name": "commencement_status",
          "type": "string",
          "nullable": false
        },
        {
          "name": "applies_from",
          "type": "string",
          "nullable": true,
          "format": "date"
        },
        {
          "name": "applies_until",
          "type": "string",
          "nullable": true,
          "format": "date"
        },
        {
          "name": "verification_source",
          "type": "string",
          "nullable": false
        },
        {
          "name": "primary_law_citation",
          "type": "string",
          "nullable": true
        },
        {
          "name": "created_at",
          "type": "string",
          "nullable": false,
          "format": "date-time"
        },
        {
          "name": "updated_at",
          "type": "string",
          "nullable": false,
          "format": "date-time"
        }
      ]
    },
    {
      "name": "SoaEntry",
      "title": "Statement of Applicability entries",
      "titleDa": "Anvendelseserklæringer",
      "path": "/api-v1-soa",
      "readScope": "soa:read",
      "fields": [
        {
          "name": "id",
          "type": "string",
          "nullable": false,
          "format": "uuid"
        },
        {
          "name": "external_source_id",
          "type": "string",
          "nullable": false,
          "format": "uuid",
          "description": "The framework's id.",
          "descriptionDa": "Rammeværkets id."
        },
        {
          "name": "assessment_id",
          "type": "string",
          "nullable": false,
          "format": "uuid"
        },
        {
          "name": "control_ref",
          "type": "string",
          "nullable": false
        },
        {
          "name": "control_title",
          "type": "string",
          "nullable": false
        },
        {
          "name": "pcf_control_uids",
          "type": "string[]",
          "nullable": false
        },
        {
          "name": "applicability",
          "type": "string",
          "nullable": false
        },
        {
          "name": "included",
          "type": "boolean",
          "nullable": false
        },
        {
          "name": "implementation_status",
          "type": "string",
          "nullable": false
        },
        {
          "name": "exclusion_justification",
          "type": "string",
          "nullable": true
        },
        {
          "name": "rationale",
          "type": "string",
          "nullable": true
        },
        {
          "name": "determined_at",
          "type": "string",
          "nullable": true,
          "format": "date-time"
        },
        {
          "name": "reviewed_at",
          "type": "string",
          "nullable": true,
          "format": "date-time"
        },
        {
          "name": "created_at",
          "type": "string",
          "nullable": false,
          "format": "date-time"
        },
        {
          "name": "updated_at",
          "type": "string",
          "nullable": false,
          "format": "date-time"
        }
      ]
    },
    {
      "name": "Assessment",
      "title": "Assessments",
      "titleDa": "Vurderinger",
      "path": "/api-v1-assessments",
      "readScope": "assessments:read",
      "fields": [
        {
          "name": "id",
          "type": "string",
          "nullable": false,
          "format": "uuid"
        },
        {
          "name": "title",
          "type": "string",
          "nullable": false
        },
        {
          "name": "description",
          "type": "string",
          "nullable": true
        },
        {
          "name": "framework",
          "type": "string",
          "nullable": false
        },
        {
          "name": "status",
          "type": "string",
          "nullable": false
        },
        {
          "name": "scope_type",
          "type": "string",
          "nullable": false
        },
        {
          "name": "scope_ref_id",
          "type": "string",
          "nullable": false,
          "format": "uuid"
        },
        {
          "name": "scope_label",
          "type": "string",
          "nullable": true
        },
        {
          "name": "scope_variant",
          "type": "string",
          "nullable": true
        },
        {
          "name": "assessment_template_id",
          "type": "string",
          "nullable": false,
          "format": "uuid"
        },
        {
          "name": "template_version",
          "type": "integer",
          "nullable": false
        },
        {
          "name": "parent_sra_record_id",
          "type": "string",
          "nullable": true,
          "format": "uuid"
        },
        {
          "name": "submitted_at",
          "type": "string",
          "nullable": true,
          "format": "date-time"
        },
        {
          "name": "approved_at",
          "type": "string",
          "nullable": true,
          "format": "date-time"
        },
        {
          "name": "next_review_at",
          "type": "string",
          "nullable": true,
          "format": "date-time"
        },
        {
          "name": "created_at",
          "type": "string",
          "nullable": false,
          "format": "date-time"
        },
        {
          "name": "updated_at",
          "type": "string",
          "nullable": false,
          "format": "date-time"
        }
      ]
    },
    {
      "name": "OrgUnit",
      "title": "Organisation units",
      "titleDa": "Organisatoriske enheder",
      "path": "/api-v1-org-units",
      "readScope": "org_units:read",
      "fields": [
        {
          "name": "id",
          "type": "string",
          "nullable": false,
          "format": "uuid"
        },
        {
          "name": "name",
          "type": "string",
          "nullable": false
        },
        {
          "name": "tenant_type",
          "type": "string",
          "nullable": false
        },
        {
          "name": "parent_tenant_id",
          "type": "string",
          "nullable": false,
          "format": "uuid",
          "description": "A listed unit or the key's own tenant.",
          "descriptionDa": "En angivet enhed eller nøglens egen organisation."
        },
        {
          "name": "hierarchy_level",
          "type": "integer",
          "nullable": false
        },
        {
          "name": "status",
          "type": "string",
          "nullable": false
        },
        {
          "name": "created_at",
          "type": "string",
          "nullable": true,
          "format": "date-time"
        }
      ]
    }
  ]
}
