Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Ejercicio-Teoria-API-Rest/userRequests.http
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
39 lines (29 sloc)
1.04 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ejercicio APIs Rest | |
# Autores: Agustín Borrego, Inma Hernández, David Ruiz | |
# Fecha creación: noviembre 2020 | |
@base= http://localhost:8080/api/v1 | |
### Obtener todos los usuarios | |
GET {{base}}/users | |
### Obtener todos los usuarios ordenados de forma creciente por “nombre” (ascendente) | |
GET {{base}}/users?_sort=name | |
### Obtener todos los usuarios ordenados de forma creciente por “nombre” (decreciente) | |
GET {{base}}/users?_sort=name&_order=desc | |
### Obtener 3 usuarios de la página 2 | |
### Cuidado la numeración de páginas empieza en 0 | |
GET {{base}}/users?_limit=3&_page=1 | |
### Insertar el usuario (“Iluminada Castillo”, “Sevilla”, “2020-09-07”) | |
POST {{base}}/users | |
Content-Type: application/json | |
{ | |
"name": "Iluminada Castillo", | |
"province": "Sevilla", | |
"startDate": "2020-09-07" | |
} | |
### Actualizar el nombre del usuario con userId=2 con el valor (“Pablo”, “Málaga”, “2020-10-11”) | |
PUT {{base}}/users/2 | |
Content-Type: application/json | |
{ | |
"name": "Pablo", | |
"province": "Málaga", | |
"startDate": "2020-10-11" | |
} | |