This repository was archived by the owner on Apr 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathnode_client.http
More file actions
123 lines (116 loc) · 2.52 KB
/
Copy pathnode_client.http
File metadata and controls
123 lines (116 loc) · 2.52 KB
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
:host = https://commons-staging.sidewalklabs.com
:jwt = insert_your_jwt_here
:email = ""
:password = ""
#
:login = :host/auth/login
POST :login
Accept-Encoding: application/bearer.token+json
Accept: application/bearer.token+json
Content-Type: application/json
{
"email": :email,
"password": :password
}
#
:studies = :host/api/studies
GET :studies
Accept-Encoding: application/json
Content-Type: application/json
Authorization: bearer :jwt
#
:byStudyId = :host/api/studies/:studyId
GET :byStudyId
Accept-Encoding: application/json
Content-Type: application/json
Authorization: bearer :jwt
#
:surveys = :host/studies/36d00ab2-0dba-4eca-8973-9e1e0a6bb074/surveys
GET :surveys
Accept-Encoding: application/json
Content-Type: application/json
#
:locations = :host/locations
POST :locations
Accept-Encoding: application/json
Content-Type: application/json
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-74.00340199470521,
40.75190608823771
]
},
"properties": {
"name": "marker: 1"
}
},
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[
-74.00048375129701,
40.752133659459204
],
[
-74.00201797485353,
40.75101205089848
],
[
-74.00011897087099,
40.75027242910473
],
[
-73.99890661239625,
40.75110145517336
],
[
-74.00048375129701,
40.752133659459204
]
]
},
"properties": {
"name": "zone_2"
}
}
]
}
#
:surveyid = 34a8f647-6b35-4cf4-bd89-0fd4860410b5
:datapoints = :host/api/surveys/:surveyid/datapoints/:dataPointId
:dataPointId = f167b536-3c00-4204-8bce-61c6c87a11a3
POST :datapoints
Accept-Encoding: application/json
Content-Type: application/json
Authorization: bearer :jwt
{
"data_point_id": ":dataPointId",
"location": {
"type":"Point",
"coordinates":[-117.6705479621887,33.54673140671231]
},
"color":"#EF6C00",
"title":"Person 12",
"date_label":"00:28",
"date":"2018-12-07T05:28:49.367Z"
}
#
:datapoints = :host/api/surveys/:surveyid/datapoints
GET :datapoints
Accept-Encoding: application/json
Content-Type: application/json
Authorization: bearer :jwt
#
:delete_user = :host/api/user
DELETE :delete_user
Accept-Encoding: application/json
Authorization: bearer :jwt
#