-
Notifications
You must be signed in to change notification settings - Fork 2
/
test-request.txt
98 lines (81 loc) · 3.12 KB
/
test-request.txt
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
//Example of sending a message to an endpoint
curl --header "Content-Type: application/json" \
--request POST \
--data '{"username":"hello said","password":"this is a super long string where another thing is going to happen"}' \
'http://localhost:8000/api/v1/connector/f/test?apikey=RcdouYvy'
//---------------- Endpoint API -------------------------
// Get all Endpoints
curl --header "Content-Type: application/json" \
--header "Authorization: Bearer 11111" \
--request GET \
http://localhost:8000/api/v1/connector
// Create an endpoint
curl --header "Content-Type: application/json" \
--header "Authorization: Bearer 11111" \
--request POST \
--data '{"id":"myEndpoint","topicName":"myTopic"}' \
http://localhost:8000/api/v1/connector
// Get a single endpoint
curl --header "Content-Type: application/json" \
--header "Authorization: Bearer 11111" \
--request GET \
http://localhost:8000/api/v1/connector/id
// Delete an endpoint handler
curl --header "Content-Type: application/json" \
--header "Authorization: Bearer 11111" \
--request DELETE \
http://localhost:8000/api/v1/connector/id
//---------------- Event API -------------------------
// Get all topics
curl --header "Content-Type: application/json" \
--header "Authorization: Bearer 11111" \
--request GET \
http://localhost:8000/api/v1/topic
// Create topic
curl --header "Content-Type: application/json" \
--header "Authorization: Bearer 11111" \
--request POST \
--data '{"topicName":"badTings"}' \
http://localhost:8000/api/v1/topic
//Get a single topic
curl --header "Content-Type: application/json" \
--header "Authorization: Bearer 11111" \
--request GET \
http://localhost:8000/api/v1/topic/one
// Fetch events from topic
curl --header "Content-Type: application/json" \
--header "Authorization: Bearer 11111" \
--request GET \
"http://localhost:8000/api/v1/topic/one/events?offset=0&limit=1"
//Stream events from topic
curl --header "Accept:text/event-stream" \
--header "Authorization: Bearer 11111" \
--request GET -N \
http://localhost:8000/api/v1/topic/here/consume
//---------------- Workflow API -------------------------
// Get all workflows
curl --header "Content-Type: application/json" \
--header "Authorization: Bearer 11111" \
--request GET \
http://localhost:8000/api/v1/workflow
// Create workflow
curl --header "Content-Type: application/json" \
--header "Authorization: Bearer 11111" \
--request POST \
--data '{"topicName": "topicName", "functionName": "ld_ld_sync", "sinkURL": "http://localhost:8000/api/v1/connector/f/endpoint?apikey=key"}' \
http://localhost:8000/api/v1/workflow
// Get a workflow
curl --header "Content-Type: application/json" \
--header "Authorization: Bearer 11111" \
--request GET \
http://localhost:8000/api/v1/workflow/id
// Update a workflow
curl --header "Content-Type: application/json" \
--header "Authorization: Bearer 11111" \
--request PUT \
http://localhost:8000/api/v1/workflow/id
// Delete a workflow
curl --header "Content-Type: application/json" \
--header "Authorization: Bearer 11111" \
--request DELETE \
http://localhost:8000/api/v1/workflow/id