REST /api/v1/bufdir-activities 5 endpoints
GET /api/v1/bufdir-activities/api/v1/bufdir-activities

Query activities for an organisation within a period

Public

Response Example

{
  "data": [
    {
      "activity_id": "act-001",
      "org_id": "org-bufdir-042",
      "activity_type": "group_session",
      "date": "2025-06-15",
      "participant_count": 8,
      "duration_minutes": 90,
      "location": "Oslo sentrum"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 312
  }
}
GET /api/v1/bufdir-activities/api/v1/bufdir-activities/:activity_id

Get a single activity row

Public

Response Example

{
  "activity_id": "act-001",
  "org_id": "org-bufdir-042",
  "activity_type": "group_session",
  "date": "2025-06-15",
  "participant_count": 8,
  "duration_minutes": 90,
  "location": "Oslo sentrum",
  "attachments": [
    "att-101",
    "att-102"
  ]
}
GET /api/v1/bufdir-activities/api/v1/bufdir-activities/count

Count activities for an org and period

Public

Response Example

{
  "org_id": "org-bufdir-042",
  "period_from": "2025-01-01",
  "period_to": "2025-12-31",
  "total_activities": 312,
  "by_type": {
    "group_session": 180,
    "individual_counseling": 132
  }
}
GET /api/v1/bufdir-activities/api/v1/bufdir-activities/unique-participants

Get unique participant count for an org and period

Public

Response Example

{
  "org_id": "org-bufdir-042",
  "period_from": "2025-01-01",
  "period_to": "2025-12-31",
  "unique_participants": 247
}
POST /api/v1/bufdir-activities/api/v1/bufdir-activities/validate

Validate completeness of a list of activity rows before export

Public

Request Example

{
  "rows": [
    {
      "activity_id": "act-001",
      "activity_type": "group_session",
      "date": "2025-06-15",
      "participant_count": 8
    }
  ]
}

Response Example

{
  "valid": false,
  "total_rows": 1,
  "issues": [
    {
      "activity_id": "act-001",
      "field": "duration_minutes",
      "message": "Required field is missing"
    }
  ]
}

Additional Metadata

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