curl --location --request GET 'localhost:3000/users' \
--header 'Content-Type: application/json'
curl --location --request POST 'localhost:3000/users' \
--header 'Content-Type: application/json'
{
"error": "Missing required fields email and/or password"
}
curl --location --request POST 'localhost:3000/users' \
--header 'Content-Type: application/json' \
--data-raw '{
"email": "devjckennedy@gmail.com",
"password": "Passw0rd!23"
}'
{
"id": "hJgUcVUX7"
}
REST_API_EXAMPLE_ID="put_id_here"
curl --location --request GET "localhost:3000/users/$REST_API_EXAMPLE_ID" \
--header 'Content-Type: application/json'
curl --location --request PUT "localhost:3000/users/$REST_API_EXAMPLE_ID" \
--header 'Content-Type: application/json' \
--data-raw '{
"email": "devjckennedy@gmail.com",
"password": "Passw0rd!23",
"firstName": "Kennedy",
"lastName": "John",
"permissionLevel": 8
}'
curl --location --request PATCH "localhost:3000/users/$REST_API_EXAMPLE_ID" \
--header 'Content-Type: application/json' \
--data-raw '{
"lastName": "James"
}'
[
{
"id": "hJgUcVUX7",
"email": "devjckennedy@gmail.com",
"password": "$argon2i$v=19$m=4096,t=3,p=1$sTpFisChUy3L6rYNzVb9HQ$fm2Dd5cy/7Dof0vv0WymRrktJG3CRzTJih5uWsf0ry8",
"firstName": "Kennedy",
"lastName": "James",
"permissionLevel": 8
}
]
curl --location --request DELETE "localhost:3000/users/$REST_API_EXAMPLE_ID" \
--header 'Content-Type: application/json'