-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathreq.http
157 lines (132 loc) · 3.98 KB
/
req.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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
### Insert Segment Rows
POST http://localhost:8090/segment/insert
Content-Type: application/json
Authorization: Bearer test
{
"messageId": "segment-test-message-qea97",
"timestamp": "2023-06-12T19:21:52.976Z",
"type": "page",
"email": "[email protected]",
"properties": {
"property1": 1,
"property2": "test",
"property3": true
},
"userId": "test-user-gk2i3",
"name": "Home Page"
}
### Query Segment
POST http://localhost:8090/query
Content-Type: application/json
Authorization: Bearer test
{
"query": "select count(*) as c, count(distinct filename) as fn, count(distinct _row_id) as cd, sum((properties::JSON->>'property1')::int64) as aa, _row_id, event, hash(properties) as h from icedb(tabl:='segment', start_year:=1, end_year:=8000) group by _row_id, event, hash(properties) order by _row_id limit 30",
"format": "pretty"
}
### Insert Segment Rows
POST http://localhost:8090/segment/insert
Content-Type: application/json
Authorization: Bearer test
[
{
"messageId": "segment-test-message-qea97",
"timestamp": "2023-06-12T19:21:52.976Z",
"type": "page",
"email": "[email protected]",
"properties": {
"property1": 1,
"property2": "test",
"property3": true
},
"userId": "test-user-gk2i3",
"name": "Home Page"
},
{
"messageId": "segment-test-message-fewfw",
"timestamp": "2023-06-12T19:21:53.001Z",
"type": "page",
"email": "[email protected]",
"properties": {
"property1": 1,
"property2": "test",
"property3": true
},
"userId": "test-user-gk2i3",
"name": "Home Page"
}
]
### Merge segment
POST http://localhost:8090/segment/merge
Authorization: Bearer test
### Query
POST http://localhost:8090/query
Content-Type: application/json
Authorization: Bearer test
{
"query": "select sum((properties::JSON->>'numtime')::int64) as agg, extract('month' from epoch_ms(ts)) as month from icedb(tabl:='test', start_month:=2, end_month:=8) where event = 'page_load' group by month order by agg desc",
"format": "csv"
}
### Query Segment
POST http://localhost:8090/query
Content-Type: application/json
Authorization: Bearer test
{
"query": "select _row_id, event, ts from icedb(tabl:='segment', start_year:=1, end_year:=8000)",
"format": "pretty"
}
### Query Segment
POST http://localhost:8090/query
Content-Type: application/json
Authorization: Bearer test
{
"query": "select filename from icedb(tabl:='segment', start_year:=1, end_year:=8000)",
"format": "pretty"
}
### Query Segment
POST http://localhost:8090/query
Content-Type: application/json
Authorization: Bearer test
{
"query": "select get_files(tabl:='segment', start_year:=1, end_year:=8000)",
"format": "pretty"
}
### Query Segment
POST http://localhost:8090/query
Content-Type: application/json
Authorization: Bearer test
{
"query": "select count(distinct _row_id), _row_id from icedb(tabl:='segment', start_year:=1, end_year:=8000) group by _row_id",
"format": "pretty"
}
### Query Segment
POST http://localhost:8090/query
Content-Type: application/json
Authorization: Bearer test
{
"query": "select * from icedb(tabl:='segment', start_year:=1, end_year:=8000)",
"format": "pretty"
}
### Query Segment
POST http://localhost:8090/query
Content-Type: application/json
Authorization: Bearer test
{
"query": "select * from icedb(tabl:='segment', start_year:=1, end_year:=8000)",
"format": "pretty"
}
### Query Segment
POST https://icedb.cf.tangia.co/query
Content-Type: application/json
Authorization: Bearer gtrehrthrthtrhrthr
{
"query": "select count(distinct filename) from icedb(tabl:='twitch-ext', start_year:=1, end_year:=8000)",
"format": "pretty"
}
### Query Segment
POST http://localhost:8090/query
Content-Type: application/json
Authorization: Bearer test
{
"query": "select any_value(user_id) as user_id, any_value(event) as event, any_value(properties) as properties, any_value(og_payload) as og_payload, any_value(ts) as ts, _row_id from icedb(tabl:='segment', start_year:=1, end_year:=8000) group by _row_id",
"format": "pretty"
}