Versions Compared

Key

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

Beskrivning

Generell tjänst för att lagra och hämta anteckningar kopplad till en organisation eller en medborgare.

Livscykelstatus

Under utveckling

Lösningsbeskrivning

Gliffy
imageAttachmentIdatt929890329
macroId0623c889-3260-4597-85dd-185d4fa90038
baseUrlhttps://sundsvall.atlassian.net/wiki
namenotes
diagramAttachmentIdatt931233799
containerId931332097
timestamp1644565587972

Hantering av personuppgifter

<Vilka personuppgifter hanteras och varför?>

API specifikation

Expand
titleAPI-nyckel för sandbox-miljö. Klicka på "Authorize" nedan och ange denna nyckel för att testa API:et.

eyJ4NXQiOiJOVGRtWmpNNFpEazNOalkwWXpjNU1tWm1PRGd3TVRFM01XWXdOREU1TVdSbFpEZzROemM0WkE9PSIsImtpZCI6ImdhdGV3YXlfY2VydGlmaWNhdGVfYWxpYXMiLCJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJhZG1pbkBjYXJib24uc3VwZXIiLCJhcHBsaWNhdGlvbiI6eyJvd25lciI6ImFkbWluIiwidGllclF1b3RhVHlwZSI6bnVsbCwidGllciI6IlVubGltaXRlZCIsIm5hbWUiOiJOb3RlcyIsImlkIjo1MSwidXVpZCI6IjIzNDJkNzRiLTQ5MjAtNDlkZS05ZjZiLWJiY2Y1YTlmODlmMSJ9LCJpc3MiOiJodHRwczpcL1wvYXBpLWltLXRlc3Quc3VuZHN2YWxsLnNlOjQ0M1wvb2F1dGgyXC90b2tlbiIsInRpZXJJbmZvIjp7IlVubGltaXRlZCI6eyJ0aWVyUXVvdGFUeXBlIjoicmVxdWVzdENvdW50IiwiZ3JhcGhRTE1heENvbXBsZXhpdHkiOjAsImdyYXBoUUxNYXhEZXB0aCI6MCwic3RvcE9uUXVvdGFSZWFjaCI6dHJ1ZSwic3Bpa2VBcnJlc3RMaW1pdCI6MCwic3Bpa2VBcnJlc3RVbml0IjpudWxsfX0sImtleXR5cGUiOiJTQU5EQk9YIiwicGVybWl0dGVkUmVmZXJlciI6IiIsInN1YnNjcmliZWRBUElzIjpbeyJzdWJzY3JpYmVyVGVuYW50RG9tYWluIjoiY2FyYm9uLnN1cGVyIiwibmFtZSI6Ik5vdGVzIiwiY29udGV4dCI6Ilwvbm90ZXNcLzEuMCIsInB1Ymxpc2hlciI6ImFkbWluIiwidmVyc2lvbiI6IjEuMCIsInN1YnNjcmlwdGlvblRpZXIiOiJVbmxpbWl0ZWQifV0sInBlcm1pdHRlZElQIjoiIiwiaWF0IjoxNjQ2MjEwMjk2LCJqdGkiOiJlOTk4MmFkMS1jNjkyLTQ3MGQtOGYxNC0yM2Q5NzA0ZTIwZTUifQ==.MlBUawmiRvW84RpR1TshWu21G2pHfu56zMtAgaXkijrDgd7dVa8_7L9i91G3dOFQ4TDZzVrtUo6MHzUJ4Cj1aeDd_ijIjtM3yGTuh2jaWq3xTOQTyUdvOcj2XYPxyj8tHlUbRdeXmFfwKDgWLW6dRFYoyMvodTxKb8aLN0z4RXGzOwrkOFGZKaphTPBEIYRIzXlTYWNjhlY9qINx_Ep21Wl4P2pDmNNxyz0MmP8N2T9mzVn1V0LAClTk15DXFag7NayMxOhrZN1duLtbeKAWPTmDURCuFRMIQFG_1idjNfLKrIO2yJbpc6jxZFKuJ6tDOkpm_S9-AKpmtXMBuo1e0g==

Swagger ui
openapi: 3.0.1
info:
  title: api-notes
  contact: {}
  license:
    name: MIT
    url: 'https://opensource.org/licenses/MIT'
  version: '1.0'
servers:
  - url: https://api-test.sundsvall.se/notes/1.0
tags:
  - name: Notes
    description: Notes
paths:
  /notes:
    get:
      tags:
        - Notes
      summary: 'Get all notes, filtered by partyId'
      operationId: getNotesByPartyId
      parameters:
        - name: partyId
          in: query
          description: PartyID
          required: true
          style: form
          explode: true
          schema:
            type: string
          example: 81471222-5798-11e9-ae24-57fa13b361e1
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Note'
            application/problem+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Note'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Problem'
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Problem'
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '500':
          description: Internal Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Problem'
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
    post:
      tags:
        - Notes
      summary: Create new note
      operationId: createNote
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateNoteRequest'
        required: true
      responses:
        '201':
          description: Successful operation
          headers:
            Location:
              style: simple
              explode: false
              schema:
                type: string
        '400':
          description: Bad request
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '404':
          description: Not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '500':
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
  '/notes/{id}':
    get:
      tags:
        - Notes
      summary: Get note by ID
      operationId: getNoteById
      parameters:
        - name: id
          in: path
          description: Note ID
          required: true
          style: simple
          explode: false
          schema:
            type: string
          example: b82bd8ac-1507-4d9a-958d-369261eecc15
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Note'
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Note'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Problem'
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Problem'
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '500':
          description: Internal Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Problem'
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
    delete:
      tags:
        - Notes
      summary: Delete note by ID
      operationId: deleteNoteById
      parameters:
        - name: id
          in: path
          description: Note ID
          required: true
          style: simple
          explode: false
          schema:
            type: string
          example: b82bd8ac-1507-4d9a-958d-369261eecc15
      responses:
        '204':
          description: Successful operation
        '400':
          description: Bad request
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '404':
          description: Not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '500':
          description: Internal Server error
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
    patch:
      tags:
        - Notes
      summary: Update note
      operationId: updateNote
      parameters:
        - name: id
          in: path
          description: Note ID
          required: true
          style: simple
          explode: false
          schema:
            type: string
          example: b82bd8ac-1507-4d9a-958d-369261eecc15
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateNoteRequest'
        required: true
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Note'
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Note'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Problem'
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Problem'
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '500':
          description: Internal Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Problem'
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
security:
  - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth: 
      type: apiKey
      in: header   
      name: apikey  
  schemas:
    CreateNoteRequest:
      required:
        - body
        - createdBy
        - subject
      type: object
      properties:
        partyId:
          type: string
          description: Party ID (e.g. a personId or an organizationId)
          example: 81471222-5798-11e9-ae24-57fa13b361e1
        subject:
          maximum: 256
          maxLength: 256
          minLength: 1
          type: string
          description: The note subject
          example: This is a subject
        body:
          maximum: 2048
          maxLength: 2048
          minLength: 1
          type: string
          description: The note nody
          example: This is a note
        createdBy:
          type: string
          description: Created by
          example: John Doe
      description: CreateNoteRequest model
    Problem:
      type: object
      properties:
        instance:
          type: string
          format: uri
        type:
          type: string
          format: uri
        parameters:
          type: object
          additionalProperties:
            type: object
        status:
          $ref: '#/components/schemas/StatusType'
        title:
          type: string
        detail:
          type: string
    StatusType:
      type: object
      properties:
        statusCode:
          type: integer
          format: int32
        reasonPhrase:
          type: string
    UpdateNoteRequest:
      required:
        - body
        - modifiedBy
        - subject
      type: object
      properties:
        subject:
          maximum: 256
          maxLength: 256
          minLength: 1
          type: string
          description: The note subject
          example: This is a subject
        body:
          maximum: 2048
          maxLength: 2048
          minLength: 1
          type: string
          description: The note nody
          example: This is a note
        modifiedBy:
          type: string
          description: Modified by
          example: John Doe
      description: UpdateNoteRequest model
    Note:
      type: object
      properties:
        id:
          type: string
          description: Note ID
          example: b82bd8ac-1507-4d9a-958d-369261eecc15
        partyId:
          type: string
          description: Party ID (e.g. a personId or an organizationId)
          example: 81471222-5798-11e9-ae24-57fa13b361e1
        subject:
          type: string
          description: The note subject
          example: This is a subject
        body:
          type: string
          description: The note nody
          example: This is a note
        createdBy:
          type: string
          description: Created by
          example: John Doe
        modifiedBy:
          type: string
          description: Modified by
          example: John Doe
        created:
          type: string
          description: Created timestamp
          format: date-time
        modified:
          type: string
          description: Modified timestamp
          format: date-time
      description: CreateNoteRequest model

Säkerhetsklassning

Säkerhetsklass 1

Autentiseringsmetod: OAuth2

(Ref: Säkerhetsklassning av APIer )

API-ägare

<Kontaktuppgifter till den verksamhet som äger APIets livscykel>

Teknisk ägare

https://sundsvall.atlassian.net/wiki/spaces/API
Team Unmasked
teamunmasked@sundsvall.se

Länkar

FAQ

<FAQ>