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
Produktion
Lösningsbeskrivning
Gliffy |
---|
|
|
|
Hantering av personuppgifter
<Vilka Inga personuppgifter hanteras och varför?>i denna tjänst.
API specifikation
Expand | ||
---|---|---|
| ||
|
Open api | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 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>N/A
Teknisk ägare
https://sundsvall.atlassian.net/wiki/spaces/API
Team Unmasked
teamunmasked@sundsvall.se
Länkar
Källkod
FAQGithub<FAQ>
N/A