REST /api/v1/bufdir-file-generation 3 endpoints
POST /api/v1/bufdir-file-generation/api/v1/bufdir-file-generation/excel

Generate an Excel file from mapped rows

Public

Request Example

{
  "export_id": "exp-20260326-xyz789",
  "rows": [
    {
      "Aktivitetstype": "group_session",
      "Dato": "2025-06-15",
      "Antall deltakere": 8
    }
  ],
  "schema_version": "2026-v1",
  "apply_formatting": true
}

Response Example

{
  "export_id": "exp-20260326-xyz789",
  "file_name": "bufdir-rapport-2025-org-bufdir-042.xlsx",
  "file_size_bytes": 204800,
  "row_count": 312,
  "sheet_count": 1,
  "generation_ms": 1240
}
POST /api/v1/bufdir-file-generation/api/v1/bufdir-file-generation/csv

Generate a CSV file from mapped rows

Public

Request Example

{
  "export_id": "exp-20260326-xyz789",
  "rows": [
    {
      "Aktivitetstype": "group_session",
      "Dato": "2025-06-15",
      "Antall deltakere": 8
    }
  ],
  "schema_version": "2026-v1",
  "delimiter": ";",
  "encoding": "UTF-8"
}

Response Example

{
  "export_id": "exp-20260326-xyz789",
  "file_name": "bufdir-rapport-2025-org-bufdir-042.csv",
  "file_size_bytes": 51200,
  "row_count": 312,
  "generation_ms": 310
}
GET /api/v1/bufdir-file-generation/api/v1/bufdir-file-generation/:export_id/download

Download generated file bytes

Public

Response Example

Binary file stream (Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)

Additional Metadata

{
  "contract_summary": {
    "total_contracts": 410,
    "total_endpoints": 2416,
    "api_styles_used": [
      "rest"
    ]
  },
  "generated_at": "2026-03-26T06:55:53.316Z"
}