-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathNotifications.yaml
146 lines (146 loc) · 3.42 KB
/
Notifications.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
swagger: '2.0'
info:
version: 0.0.1
title: Notifications service API
description: |
Notifications API is used for getting notifications and marking them as read
schemes:
- http
basePath: /api/v1
consumes:
- application/json
produces:
- application/json
paths:
/notifications:
get:
summary: Get a list of Notifications
description: >
This API delivers the Notifications in a structured collection.
tags:
- Notification
parameters:
- name: category
in: query
description: notification category
type: string
required: false
enum:
- DEBUG
- INFO
- ERROR
- CRIT
- WARN
- name: isRead
in: query
description: in case when isRead not set - read and not read notifications will be returned
type: boolean
enum:
- true
- false
required: false
- name: page
in: query
description: page number
type: integer
required: true
- name: perPage
in: query
description: results per page
type: integer
required: true
- name: sortBy
in: query
description: sort result by this field
type: string
required: false
- name: sortOrder
in: query
description: sort order
type: string
enum: [asc, desc]
required: fasle
security:
- x_auth: []
responses:
'200':
description: successful request
'405':
description: Not allowed - Method is not allowed on the current resource
'500':
description: Internal Error - Internal server error
default:
description: Unexpected error
put:
summary: mark all as read
description: |
This service marks all Notifications as read.
tags:
- Notification
security:
- x_auth: []
responses:
'200':
description: successful request
'405':
description: Not allowed - Method is not allowed on the current resource
'500':
description: Internal Error - Internal server error
default:
description: Unexpected error
'/notifications/{id}':
put:
summary: Mark single notification as read
description: |
The Notification with the given ID will be marked as read.
parameters:
- name: id
in: path
description: id of notification item
required: true
type: string
tags:
- Notification
security:
- x_auth: []
responses:
'200':
description: successful request
'405':
description: Not allowed - Method is not allowed on the current resource
'500':
description: Internal Error - Internal server error
default:
description: Unexpected error
definitions:
Notification:
type: object
properties:
ID:
type: string
createdOn:
type: string
isRead:
type: boolean
readOn:
type: string
text:
type: string
category:
type: string
enum:
- DEBUG
- INFO
- ERROR
- CRIT
- WARN
priority:
type: string
enum:
- VERYLOW
- LOW
- NORMAL
- HIGH
- URGENT
isPrivate:
type: boolean