Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languageyml
titleOpen API specifikation
collapsetrue
openapi: 3.0.0
info:
  title: Autorisation Information REST Service
  description: Intern NSP service, der kan anvendes til at slå informationer om autorisationer op.
  version: "1.0.0"

servers:
  - url: '%endpoint%'

paths:
  /stamdata-autorisationinformation2026/06/16/autorisation/{cpr}:
    get:
      tags:
        - autorisation
      operationId: getAutorisationer
      summary: Hent autorisationer for et CPR-nummer.
      description: >
        Returnerer en liste af autorisationer (aut_id, edu_id) for det angivne CPR-nummer.
        Findes der ingen autorisationer returneres 404 med en tom JSON body.
      parameters:
        - in: path
          name: cpr
          schema:
            type: string
            pattern: '^[0-3]\d[0-1]\d{3}-?\d{4}$'
          required: true
          description: CPR-nummer på formen DDMMYY-XXXX eller DDMMYYXXXX (bindestreg er valgfri).
      responses:
        200:
          description: OK - en eller flere autorisationer fundet.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/autorisationer'
        400:
          description: Ugyldig forespørgsel (fx ugyldigt CPR-format).
        404:
          description: Der findes ingen autorisationer for det angivne CPR-nummer.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/autorisationer'
        500:
          description: Intern serverfejl.

components:
  schemas:
    autorisationer:
      type: array
      items:
        $ref: '#/components/schemas/autorisation'

    autorisation:
      type: object
      required:
        - aut_id
        - edu_id
      properties:
        aut_id:
          type: string
          description: Autorisations-ID som registreret i autreg.
          maxLength: 5
          example: "108NX"
        edu_id:
          type: string
          description: Uddannelses-ID som registreret i autreg.
          maxLength: 4
          example: "7170"

...

Eksempler

Eksempel 1: Hent autorisation for et CPR-nummer med én autorisation

...

Code Block
languagebash
curl --location 'http://stamdatahost/stamdata-autorisationinformation/2026/06/16/autorisation/1010903333'

...

Code Block
languagebash
curl --location 'http://stamdatahost/stamdata-autorisationinformation/2026/06/16/autorisation/1111901117'

Response

...

Code Block
languagebash
curl --location 'http://stamdatahost/stamdata-autorisationinformation/2026/06/16/autorisation/101090-3333'

...

Code Block
languagebash
curl --location 'http://stamdatahost/stamdata-autorisationinformation/2026/06/16/autorisation/9999999999'

...