Raw
1 get:
2 operationId: GetNotifications
3 summary: List Notifications
4 description: >-
5 Retrieve a list of notifications. The notifications can be filtered by
6 fields such as `id`. The notifications can also be sorted or paginated.
7 x-authenticated: true
8 parameters:
9 - name: fields
10 in: query
11 description: >-
12 Comma-separated fields that should be included in the returned data. if
13 a field is prefixed with `+` it will be added to the default fields,
14 using `-` will remove it from the default fields. without prefix it will
15 replace the entire default fields.
16 required: false
17 schema:
18 type: string
19 title: fields
20 description: >-
21 Comma-separated fields that should be included in the returned data.
22 if a field is prefixed with `+` it will be added to the default
23 fields, using `-` will remove it from the default fields. without
24 prefix it will replace the entire default fields.
25 externalDocs:
26 url: '#select-fields-and-relations'
27 - name: offset
28 in: query
29 description: The number of items to skip when retrieving a list.
30 required: false
31 schema:
32 type: number
33 title: offset
34 description: The number of items to skip when retrieving a list.
35 externalDocs:
36 url: '#pagination'
37 - name: limit
38 in: query
39 description: Limit the number of items returned in the list.
40 required: false
41 schema:
42 type: number
43 title: limit
44 description: Limit the number of items returned in the list.
45 externalDocs:
46 url: '#pagination'
47 - name: order
48 in: query
49 description: >-
50 The field to sort the data by. By default, the sort order is ascending.
51 To change the order to descending, prefix the field name with `-`.
52 required: false
53 schema:
54 type: string
55 title: order
56 description: >-
57 The field to sort the data by. By default, the sort order is
58 ascending. To change the order to descending, prefix the field name
59 with `-`.
60 - name: q
61 in: query
62 description: Search term to apply on the notification's searchable properties.
63 required: false
64 schema:
65 type: string
66 title: q
67 description: Search term to apply on the notification's searchable properties.
68 - name: id
69 in: query
70 required: false
71 schema:
72 oneOf:
73 - type: string
74 title: id
75 description: Filter by a notification ID.
76 - type: array
77 description: Filter by notification IDs.
78 items:
79 type: string
80 title: id
81 description: A notification ID.
82 - name: channel
83 in: query
84 required: false
85 schema:
86 oneOf:
87 - type: string
88 title: channel
89 description: Filter by a notification channel.
90 example: email
91 - type: array
92 description: Filter by notification channels.
93 items:
94 type: string
95 title: channel
96 description: A notification channel.
97 example: email
98 - name: $and
99 in: query
100 required: false
101 schema:
102 type: array
103 description: >-
104 Join query parameters with an AND condition. Each object's content is
105 the same type as the expected query parameters.
106 items:
107 type: object
108 title: $and
109 - name: $or
110 in: query
111 required: false
112 schema:
113 type: array
114 description: >-
115 Join query parameters with an OR condition. Each object's content is
116 the same type as the expected query parameters.
117 items:
118 type: object
119 title: $or
120 - name: with_deleted
121 in: query
122 description: Whether to include deleted records in the result.
123 required: false
124 schema:
125 type: boolean
126 title: with_deleted
127 description: Whether to include deleted records in the result.
128 - name: to
129 in: query
130 required: false
131 schema:
132 oneOf:
133 - type: string
134 title: to
135 description: >-
136 Filter by who the notification was sent to. Set to `""` to
137 retrieve notifications for all admin users.
138 - type: array
139 description: >-
140 Filter by who the notification was sent to. Set to `""` to
141 retrieve notifications for all admin users.
142 items:
143 type: string
144 title: to
145 description: >-
146 Who the notification was sent to. Set to `""` to retrieve
147 notifications for all admin users.
148 security:
149 - api_token: []
150 - cookie_auth: []
151 - jwt_token: []
152 x-codeSamples:
153 - lang: JavaScript
154 label: JS SDK
155 source:
156 $ref: ../code_samples/JavaScript/admin_notifications/get.js
157 - lang: Shell
158 label: cURL
159 source:
160 $ref: ../code_samples/Shell/admin_notifications/get.sh
161 tags:
162 - Notifications
163 responses:
164 '200':
165 description: OK
166 content:
167 application/json:
168 schema:
169 $ref: ../components/schemas/AdminNotificationListResponse.yaml
170 '400':
171 $ref: ../components/responses/400_error.yaml
172 '401':
173 $ref: ../components/responses/unauthorized.yaml
174 '404':
175 $ref: ../components/responses/not_found_error.yaml
176 '409':
177 $ref: ../components/responses/invalid_state_error.yaml
178 '422':
179 $ref: ../components/responses/invalid_request_error.yaml
180 '500':
181 $ref: ../components/responses/500_error.yaml