-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrest-api.http
More file actions
117 lines (92 loc) · 1.88 KB
/
Copy pathrest-api.http
File metadata and controls
117 lines (92 loc) · 1.88 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
@host = https://playground-explorer-back-api-2c0b9098656f.herokuapp.com
@token = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.a.Fr6p164bihx4X6pai3BB3-Ca-pV78sv9Ud_bWfH_prA
###
GET {{host}}/api/playgrounds/
Accept: application/json
###
GET {{host}}/api/users/4
###
POST {{host}}/register
Content-Type: application/json
{
"email": "worlad@hello.fr",
"username": "adminfred",
"firstname": "world",
"lastname": "world",
"city": "world",
"password": "world",
"confirm": "world",
"role": "admin"
}
###
GET {{host}}/api/playgrounds/1/pictures
Content-Type: application/json
###
POST {{host}}/login
Content-Type: application/json
{
"username": "world",
"password": "world"
}
###
POST {{host}}/api/playgrounds
Content-Type: application/json
{
"name": "Test playground",
"lattitude": 1.234,
"longitude": 1.234,
"adress": "123 rue de la rue",
"zip_code": "12345",
"city": "Paris",
"closure": true,
"zoning": true,
"features" : [1, 2, 3],
""
}
###
POST {{host}}/api/notices
Content-Type: application/json
{
"playground_id": 1,
"user_id": 2,
"comment": "This playground is awesome !",
"rating": 3
}
###
POST {{host}}/admin/login
Content-Type: application/json
{
"username": "adminfred",
"password": "world"
}
###
GET {{host}}/api/users/9
Accept: application/json
###
GET {{host}}/api/search?query=paris
Accept: application/json
###
POST {{host}}/login
Content-Type: application/json
Accept: application/json
{
"username": "world",
"password": "world"
}
###
GET {{host}}/api/profile/
Accept: application/json
###
GET {{host}}/api/users/1/playgrounds
Accept: application/json
###
POST {{host}}/api/contact
Content-Type: application/json
{
"email": "test@test.fr",
"message": "Hello, I have a question",
"object": "Question"
}
###
GET {{host}}/api/contact?limit=10&page=1
Accept: application/json