-
Notifications
You must be signed in to change notification settings - Fork 2
/
requests.http
71 lines (42 loc) · 1.51 KB
/
requests.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
# @name login
POST http://localhost:8080/auth/realms/SSO/protocol/openid-connect/token HTTP/1.1
content-type: application/x-www-form-urlencoded
username=demo
&password=demo
&grant_type=password
&client_id=app-client
### Location API ###
### List all locations
GET http://localhost:3000/api/location HTTP/1.1
content-type: application/json
Authorization: Bearer {{login.response.body.access_token}}
### Create a location
POST http://localhost:3000/api/location HTTP/1.1
content-type: application/json
Authorization: Bearer {{login.response.body.access_token}}
{
"name": "Springfield"
}
### Delete a location
DELETE http://localhost:3000/api/location/Springfield HTTP/1.1
content-type: application/json
Authorization: Bearer {{login.response.body.access_token}}
### Product API
### List all products
GET http://localhost:5000/api/product HTTP/1.1
content-type: application/json
Authorization: Bearer {{login.response.body.access_token}}
### Get an example product
GET http://localhost:5000/api/product/example HTTP/1.1
content-type: application/json
Authorization: Bearer {{login.response.body.access_token}}
### Util
### Check for resource access
POST http://localhost:8080/auth/realms/SSO/protocol/openid-connect/token HTTP/1.1
content-type: application/x-www-form-urlencoded
Authorization: Bearer {{login.response.body.access_token}}
grant_type=urn:ietf:params:oauth:grant-type:uma-ticket
&audience=product-api
&permission=Product
&response_mode=decision
# response_mode only for { result: boolean } response