-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwebhooks4j.http
79 lines (63 loc) · 2.05 KB
/
webhooks4j.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
@publisherToken=Basic cHVibGlzaGVyOnB1YnB1Yg==
@subscriberToken=Basic c3Vic2NyaWJlcjpjb25jb24=
### Get publisher event
GET http://localhost:8080/publisher-events/e9b285cc-9c88-4618-99c9-88aa91f24e3e
Authorization: {{publisherToken}}
### List all publisher events
GET http://localhost:8080/publisher-events/?from=2007-12-03T10%3A15%3A30%2B01%3A00
Authorization: {{publisherToken}}
### Create publisher webhooks
POST http://localhost:8080/publisher-webhooks/
Authorization: {{subscriberToken}}
Content-Type: application/json
{
"state": "SUBSCRIBE",
"topics": [
"test"
],
"publisher": "http://localhost:8081/",
"subscriber": "http://localhost:8081/"
}
### List all publisher webhooks
GET http://localhost:8080/publisher-webhooks/
Authorization: {{publisherToken}}
### Get subscriber event
GET http://localhost:8080/subscriber-events/e9b285cc-9c88-4618-99c9-88aa91f24e3e
Authorization: {{subscriberToken}}
### List all subscriber events
GET http://localhost:8080/subscriber-events/?from=2007-12-03T10%3A15%3A30%2B01%3A00
Authorization: {{subscriberToken}}
### Post invalid subscriber events
POST http://localhost:8080/subscriber-events/
Authorization: {{subscriberToken}}
Content-Type: application/json
{ }
### List all subscriber webhooks
GET http://localhost:8080/subscriber-webhooks/
Authorization: {{subscriberToken}}
### Sync events
PUT http://localhost:8080/subscriber-webhooks/fe5db9df-1e54-4c8b-8667-986b2a128fc1
Authorization: {{subscriberToken}}
Content-Type: application/json
{
"id": "fe5db9df-1e54-4c8b-8667-986b2a128fc1",
"state": "SYNCHRONIZE",
"topics": [
"test"
],
"publisher": "http://localhost:8081/",
"subscriber": "http://localhost:8081/"
}
### Sync events
PUT http://localhost:8080/subscriber-webhooks/fe5db9df-1e54-4c8b-8667-986b2a128fc1
Authorization: {{subscriberToken}}
Content-Type: application/json
{
"id": "fe5db9df-1e54-4c8b-8667-986b2a128fc1",
"state": "UNSUBSCRIBE",
"topics": [
"test"
],
"publisher": "http://localhost:8081/",
"subscriber": "http://localhost:8081/"
}