-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathendpoints.http
179 lines (143 loc) · 3.6 KB
/
endpoints.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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
@host = http://127.0.0.1:8080
# how to find out who you are to the eyes of the app
GET {{host}}/whoami
Content-Type: application/json
Accept: application/json
#oidc_claim_given_name: Bilbo
#oidc_claim_family_name: Baggins
#oidc_claim_email: [email protected]
#oidc_claim_ismemberof: admin
###
# @name locationPost
POST {{host}}/locations
Content-Type: application/json
Accept: application/json
oidc_claim_ismemberof: admin
{
"site": "Mordor",
"name": "Tower"
}
###
@locationId = {{locationPost.response.body.$.locationId}}
###
DELETE {{host}}/locations/{{locationId}}
oidc_claim_ismemberof: admin
###
GET {{host}}/locations
Content-Type: application/json
Accept: application/json
###
GET {{host}}/locations?site=Sciences
Content-Type: application/json
Accept: application/json
###
GET {{host}}/locations/{{locationId}}
Content-Type: application/json
Accept: application/json
### unauthorized lockers post
POST {{host}}/lockers
Content-Type: application/json
Accept: application/json
oidc_claim_ismemberof: admin
{
"lockerId": "sdghsdkjlghsdjkghdsjlkgh",
"number": 26,
"verticalPosition": "En bas",
"lock": false,
"locationId":"aae5248e-e1a8-4695-ad66-0740392fd2b6"
}
###
# @name lockerPost
POST {{host}}/lockers
Content-Type: application/json
Accept: application/json
oidc_claim_ismemberof: admin
{
"number": 22,
"verticalPosition": "En bas",
"lock": false,
"locationId":"aae5248e-e1a8-4695-ad66-0740392fd2b6",
"dimensions": "100/50/80"
}
###
@lockerId = {{lockerPost.response.body.$.lockerId}}
###
GET {{host}}/lockers/0dee87d4-4393-11ec-92ab-5254004e4f4c
Content-Type: application/json
Accept: application/json
###
GET {{host}}/lockers/1ee00449-330a-11ec-ab1d-5254004e4f4c
Content-Type: application/json
Accept: application/json
###
POST {{host}}/contracts
Content-Type: application/json
Accept: application/json
{
"lockerId": "{{lockerId}}"
}
### admin creates a locker for someone else
POST {{host}}/contracts
Content-Type: application/json
Accept: application/json
oidc_claim_given_name: Bilbo
oidc_claim_family_name: Baggins
oidc_claim_email: [email protected]
oidc_claim_ismemberof: admin
{
"email": "[email protected]",
"firstname": "John",
"lastname": "Doe",
"lockerId": "1ee00449-330a-11ec-ab1d-5254004e4f4c",
"expiration": "2022-05-15"
}
###
DELETE {{host}}/contracts/1ee00449-330a-11ec-ab1d-5254004e4f4c
Content-Type: application/json
Accept: application/json
oidc_claim_ismemberof: admin
###
PUT {{host}}/contracts/1ee00449-330a-11ec-ab1d-5254004e4f4c
Content-Type: application/json
Accept: application/json
oidc_claim_ismemberof: admin
{}
###
GET {{host}}/contracts?site=Sciences&name=SCII
Content-Type: application/json
Accept: application/json
oidc_claim_email: [email protected]
###
GET {{host}}/contracts/1ee00449-330a-11ec-ab1d-5254004e4f4c
Content-Type: application/json
Accept: application/json
oidc_claim_ismemberof: admin
###
GET {{host}}/contracts?site=Sciences&name=EPA
Content-Type: application/json
Accept: application/json
###
POST {{host}}/contracts
Content-Type: application/json
Accept: application/json
{
"lockerId": "{{lockerId}}"
}
###
GET {{host}}/contracts/26a1fa6d-a873-491a-9135-951a3779058e
Content-Type: application/json
Accept: application/json
oidc_claim_ismemberof: admin
### if it's the user making the request's locker, return it.
GET {{host}}/contracts?Site=Sciences
Content-Type: application/json
Accept: application/json
oidc_claim_email: [email protected]
###
DELETE {{host}}/lockers/{{lockerId}}
Content-Type: application/json
Accept: application/json
###
GET {{host}}/lockers?site=Sciences
Content-Type: application/json
Accept: application/json