-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapi.http
More file actions
54 lines (40 loc) · 951 Bytes
/
api.http
File metadata and controls
54 lines (40 loc) · 951 Bytes
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
###
# @name admin_jwt_login
POST http://localhost:3000/auth/login
Content-Type: application/json
{
"email": "admin@user.com",
"passowrd": "secret"
}
###
@jwt = {{ admin_jwt_login.response.body.access_token }}
###
GET http://localhost:3000/admin/products
Authorization: Bearer {{ jwt }}
###
# @name createProduct
POST http://localhost:3000/admin/products
Content-Type: application/json
Authorization: Bearer {{ jwt }}
{
}
###
@productId = {{ createProduct.response.body.id }}
###
GET http://localhost:3000/admin/products/{{ productId }}
###
# @name updateProduct
PATCH http://localhost:3000/admin/products/{{ productId }}
Content-Type: application/json
{
"name": "Product 2",
"slug": "product-364732",
"description": "Product 2 description",
"price": 5.12
}
###
# @name deleteProduct
DELETE http://localhost:3000/admin/products/{{ productId }}
### OPEN PRODUCTS
###
GET http://localhost:3000/products?name=product