-
-
Notifications
You must be signed in to change notification settings - Fork 130
/
trst-rest-api.http
34 lines (22 loc) · 959 Bytes
/
trst-rest-api.http
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
### Generate JWT access token
POST {{oidc-issuer-url}}/protocol/openid-connect/token
Content-Type: application/x-www-form-urlencoded
username={{username}}&password={{password}}&client_id={{client-id}}&grant_type=password&scope=openid
> {%
client.global.set("access_token", response.body.access_token);
%}
### Test create notification
POST {{api-url}}/api/notifications
content-type: application/json; charset=utf-8
Authorization: Bearer {{access_token}}
{"title":"test123","body":"test12345","target":"sumo-topic","targetType":"topic","icon":"notifications","color":"warn","native":true}
### Test get notifications
GET {{api-url}}/api/notifications
Accept: application/json
Authorization: Bearer {{access_token}}
### Test send notification
POST {{api-url}}/api/notifications/send
content-type: application/json; charset=utf-8
Authorization: Bearer {{access_token}}
{ "id" : "6a06cb98-1a3f-43ac-84e1-2312097decf9", "target": "sumo-topic" }
###