Page Introduction

Canonical source policy

Canonical specification is the authority for namespace contracts, flow order, auth rules, and policy-level constraints.

  • When docs disagree, canonical spec takes precedence.
  • Use canonical order for endpoint integration sequencing.
  • Review canonical before adding new frontend API usage patterns.

Documentation

Workshop API Canonical

All content below is loaded directly from `WORKSHOP-API-CANONICAL.md`.

0Namespaces
2026-02-16Updated

Canonical specification

MinBil Workshop API - Canonical Contract

Oppdatert: 2026-02-16 Base path: /api/ws

1. Scope

Dette dokumentet er manuell canonical kontrakt for workshop-domenet. Full operasjonsreferanse ligger i WORKSHOP-API-COMPLETE.md.

2. Security Matrix

APIKey

  • POST /api/ws/auth/sign-up
  • POST /api/ws/auth/sign-in

Public

  • POST /api/ws/auth/refresh-token
  • POST /api/ws/auth/logout
  • POST /api/ws/auth/sign-out (deprecated alias)
  • POST /api/ws/auth/forgot-password
  • øvrige eksplisitt offentlige metadata/endepunkter (/categories*, /brreg, /support/*, /email-verification/*)

Bearer

Alt annet under /api/ws/*.

3. Canonical Usage Rules

  1. Bruk v2 read-models for dashboard/lister/feed/kalender/arkiv.
  2. Bruk v2 write-kontrakter der de finnes.
  3. Legacy-ruter skal kun brukes som migreringsfallback.
  4. Statusmutasjoner: POST /api/ws/v2/bookings/status-transitions.
  5. Booking-meldinger: POST /api/ws/v2/bookings/{booking_id}/messages.
  6. Eksport: async POST /api/ws/v2/reports/exports-flyt.
  7. Notifikasjoner: v2 feed + v2 mutasjoner.

4. V2 Canonical Endpoints

  • Dashboard: GET /api/ws/v2/dashboard
  • Bookings list/detail:
    • GET /api/ws/v2/bookings
    • GET /api/ws/v2/bookings/{booking_id}
    • GET /api/ws/v2/bookings/{booking_id}/valid-transitions
  • Booking writes:
    • POST /api/ws/v2/bookings/status-transitions
    • POST /api/ws/v2/bookings/{booking_id}/messages
  • Calendar:
    • GET /api/ws/v2/bookings/calendar (kanonisk)
    • GET /api/ws/v2/calendar/events (deprecated alias)
  • Notifications:
    • GET /api/ws/v2/notifications/feed
    • POST /api/ws/v2/notifications/mark-read
    • POST /api/ws/v2/notifications/mark-unread
    • DELETE /api/ws/v2/notifications/{id}
  • Archive:
    • GET /api/ws/v2/archive/feed
    • GET /api/ws/v2/documents/archive (kompatibilitet)
  • Reports export:
    • POST /api/ws/v2/reports/exports
    • GET /api/ws/v2/reports/exports/{job_id}
    • POST /api/ws/v2/reports/exports/{job_id}/cancel
    • GET /api/ws/v2/reports/exports/{job_id}/download

5. Legacy Policy

  • Legacy write-ruter under /api/ws/bookings/* og /api/ws/notifications/* er markert deprecated.
  • API returnerer Deprecation/Sunset/Link headere på sentrale legacy-ruter.
  • Nye klienter skal implementeres v2-first.
  • WORKSHOP-API-GET-STARTED.md
  • WORKSHOP-API-COMPLETE.md
  • workshop-pages/workshops-ws-v2-api.md
  • workshop-rules/v2.md