-
Notifications
You must be signed in to change notification settings - Fork 0
/
Consultas_Node.http
100 lines (71 loc) · 2.19 KB
/
Consultas_Node.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
#-----------------------------LIBROS---------------------------------------
### Obtener todos los libros
GET http://localhost:3000/api/v1/books HTTP/1.1
Content-Type: application/json
{}
### Obtener libro por ID
GET http://localhost:3000/api/v1/books/id/2 HTTP/1.1
Content-Type: application/json
{}
### Obtener libro por paginas
GET http://localhost:3000/api/v1/books/pages/200 HTTP/1.1
Content-Type: application/json
{}
### Obtener libro por author
GET http://localhost:3000/api/v1/books/author/Autor1 HTTP/1.1
Content-Type: application/json
{}
### Crear un nuevo libro
POST http://localhost:3000/api/v1/books/create HTTP/1.1
Content-Type: application/json
{
"name": "Libro 4",
"author": "Autor 4",
"pages": 250,
"description": "Una Descripcion del Libro4",
"id": 4
}
### Actualizar un libro existente
PATCH http://localhost:3000/api/v1/books/update/3 HTTP/1.1
conContent-Type: application/json
{}
### Eliminar un libro existente
DELETE http://localhost:3000/api/v1/books/delete/4 HTTP/1.1
conContent-Type: application/json
#-----------------------------CLIENTES---------------------------------------
### Obtener todos los libros
GET http://localhost:3001/api/v1/clients HTTP/1.1
Content-Type: application/json
{}
### Obtener cliente por ID
GET http://localhost:3001/api/v1/clients/id/2 HTTP/1.1
Content-Type: application/json
{}
### Obtener cliente por edad
GET http://localhost:3001/api/v1/clients/age/25 HTTP/1.1
Content-Type: application/json
{}
### Obtener cliente por genero
GET http://localhost:3001/api/v1/clients/gender/masculino HTTP/1.1
Content-Type: application/json
{}
### Crear un nuevo cliente
POST http://localhost:3001/api/v1/clients/create HTTP/1.1
Content-Type: application/json
{
"name": "cliente 5",
"lastName": "apellido 5",
"email": "[email protected]",
"gender": "femenino",
"age": 18,
"id": 5
}
### Actualizar un cliente existente
PATCH http://localhost:3001/api/v1/clients/update/4 HTTP/1.1
conContent-Type: application/json
{}
### Eliminar un cliente existente
DELETE http://localhost:3001/api/v1/clients/delete/5 HTTP/1.1
conContent-Type: application/json
##URI
##MONGO_URI=mongodb+srv://pipe2893:[email protected]/