-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEndpoints.postman_collection.json
More file actions
92 lines (92 loc) · 3.54 KB
/
Endpoints.postman_collection.json
File metadata and controls
92 lines (92 loc) · 3.54 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
{
"info": {
"_postman_id": "casa-rural-demo-collection",
"name": "Casa Rural API Collection",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Casas Rurales",
"item": [
{
"name": "Listar casas",
"request": {
"method": "GET",
"header": [],
"url": { "raw": "http://127.0.0.1:8001/api/houses", "protocol": "http", "host": ["127.0.0.1"], "port": "8001", "path": ["api", "houses"] }
}
},
{
"name": "Crear casa",
"request": {
"method": "POST",
"header": [{"key": "Content-Type", "value": "application/json"}],
"body": { "mode": "raw", "raw": "{\n \"nombre\": \"Casa ejemplo\",\n \"descripcion\": \"Una casa rural bonita\"\n}" },
"url": { "raw": "http://127.0.0.1:8001/api/houses", "protocol": "http", "host": ["127.0.0.1"], "port": "8001", "path": ["api", "houses"] }
}
},
{
"name": "Ver casa por ID",
"request": {
"method": "GET",
"header": [],
"url": { "raw": "http://127.0.0.1:8001/api/houses/:house", "protocol": "http", "host": ["127.0.0.1"], "port": "8001", "path": ["api", "houses", ":house"] }
}
},
{
"name": "Actualizar casa",
"request": {
"method": "PUT",
"header": [{"key": "Content-Type", "value": "application/json"}],
"body": { "mode": "raw", "raw": "{\n \"nombre\": \"Casa actualizada\",\n \"descripcion\": \"Descripción actualizada\"\n}" },
"url": { "raw": "http://127.0.0.1:8001/api/houses/:house", "protocol": "http", "host": ["127.0.0.1"], "port": "8001", "path": ["api", "houses", ":house"] }
}
},
{
"name": "Eliminar casa",
"request": {
"method": "DELETE",
"header": [],
"url": { "raw": "http://127.0.0.1:8001/api/houses/:house", "protocol": "http", "host": ["127.0.0.1"], "port": "8001", "path": ["api", "houses", ":house"] }
}
}
]
},
{
"name": "Reservas",
"item": [
{
"name": "Crear reserva",
"request": {
"method": "POST",
"header": [{"key": "Content-Type", "value": "application/json"}],
"body": { "mode": "raw", "raw": "{\n \"house_id\": 1,\n \"user_id\": 1,\n \"fecha_inicio\": \"2024-07-01\",\n \"fecha_fin\": \"2024-07-07\"\n}" },
"url": { "raw": "http://127.0.0.1:8001/api/reservations", "protocol": "http", "host": ["127.0.0.1"], "port": "8001", "path": ["api", "reservations"] }
}
}
]
},
{
"name": "Usuarios",
"item": [
{
"name": "Listar usuarios",
"request": {
"method": "GET",
"header": [],
"url": { "raw": "http://127.0.0.1:8000/api/users", "protocol": "http", "host": ["127.0.0.1"], "port": "8000", "path": ["api", "users"] }
}
},
{
"name": "Login usuario",
"request": {
"method": "POST",
"header": [{"key": "Content-Type", "value": "application/json"}],
"body": { "mode": "raw", "raw": "{\n \"email\": \"usuario@demo.com\",\n \"password\": \"123456\"\n}" },
"url": { "raw": "http://127.0.0.1:8000/api/auth/login", "protocol": "http", "host": ["127.0.0.1"], "port": "8000", "path": ["api", "auth", "login"] }
}
}
]
}
]
}