-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathnotification.http
92 lines (75 loc) · 1.84 KB
/
notification.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
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
@baseURL = http://localhost:9000/api/notification
#@baseURL = http://localhost:8080
### Get version
GET {{baseURL}}/version HTTP/1.1
### Get all notification configs
GET {{baseURL}}/configs HTTP/1.1
Content-Type: application/json
### Get all notification configs for pipeline
GET {{baseURL}}/configs?pipelineId=17 HTTP/1.1
Content-Type: application/json
### Save notification webhook config
POST {{baseURL}}/configs HTTP/1.1
Content-Type: application/json
{
"pipelineId": 17,
"condition": "true",
"type": "WEBHOOK",
"parameter": {
"url": "http://www.mocky.io/v2/5dc94f7a2f0000680073eb96"
}
}
### Save notification firebase config
POST {{baseURL}}/configs HTTP/1.1
Content-Type: application/json
{
"pipelineId": 17,
"condition": "true",
"type": "FCM",
"parameter": {
"projectId": "projectId",
"clientEmail": "clientEmail",
"privateKey": "privateKey",
"topic": "topic"
}
}
### Save notification slack config
POST {{baseURL}}/configs HTTP/1.1
Content-Type: application/json
{
"pipelineId": 17,
"condition": "true",
"type": "SLACK",
"parameter": {
"workspaceId": "workspaceId",
"channelId": "channelId",
"secret": "secret"
}
}
### Get notification config
GET {{baseURL}}/configs/1 HTTP/1.1
Content-Type: application/json
### Edit notification config
PUT {{baseURL}}/configs/1 HTTP/1.1
Content-Type: application/json
{
"pipelineId": 18,
"condition": "true",
"type": "WEBHOOK",
"parameter": {
"url": "http://www.mocky.io/v2/5dc94f7a2f0000680073eb96"
}
}
### Delete notification config
DELETE {{baseURL}}/configs/1 HTTP/1.1
Content-Type: application/json
### Trigger all notifications of pipeline
POST {{baseURL}}/trigger HTTP/1.1
Content-Type: application/json
{
"pipelineId": 17,
"pipelineName": "Integration-Test Pipeline 2 (not triggering)",
"data": {
"value1": 1
}
}