Skip to content

Latest commit

 

History

History
89 lines (62 loc) · 1.87 KB

users.rest

File metadata and controls

89 lines (62 loc) · 1.87 KB

GET http://localhost:5000/users/ authorization: Bearer {{JWT}} ###

//create user POST http://localhost:5000/users content-type: application/json

{
"userName": "llanddewiBrefi", "password": "password", "permissions": "read-only"

}

###

DELETE http://localhost:5000/users/user6 content-type: application/json authorization: Bearer {{JWT}}

# { # "userName": "user7" # }

###

//login POST http://localhost:5000/users/login content-type: application/json

{
"userName": "LlanddewiLovesYou", "password": "Brefi1979!"

}

###

// validate token POST http://localhost:5000/users/validate Content-Type: application/json

{
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmcmllbmRzIjpbXSwiX2lkIjoiNWZmMjk1YzVjMjc3ZGJiOWM4ZGFhMjg3IiwidXNlck5hbWUiOiJMbGFuZGRld2lMb3Zlc1lvdSIsInBhc3N3b3JkIjoiJDJiJDEwJDdJWVlOTnU1RGViZm1xR3loU0F3ZHV0aU9SV0trcHF4V0xqdi9KTE5jTE4zYmRoVklFRlpPIiwicGVybWlzc2lvbnMiOiJhZG1pbiIsImNyZWF0ZWRBdCI6IjIwMjEtMDEtMDRUMDQ6MTI6NTMuODA2WiIsInVwZGF0ZWRBdCI6IjIwMjEtMDEtMDRUMDQ6MTI6NTMuODA2WiIsIl9fdiI6MCwiaWF0IjoxNjEwNjQ5NDUwLCJleHAiOjE2MTA2NTMwNTB9.i229_LtyzXsw46cU3x0SmYzvkQorEexfxxvyssy0EkY"

}

### GET http://localhost:5000/users/newuser3 Authorization: bearer {{JWT}} ###

// add friend

PATCH http://localhost:5000/users/friend/5ff4eedfbead03cc13163be2 Content-Type: application/json Authorization: Bearer {{JWT}}

###

//remove friend

PATCH http://localhost:5000/users/unfriend/5ff295c5c277dbb9c8daa287 Content-Type: application/json Authorization: Bearer {{JWT}}

###

// find Friends GET http://localhost:5000/users/friends/5ff4ef1ebead03cc13163be3 Authorization: Bearer {{JWT}}

###

// Search Users GET http://localhost:5000/users/search?q=Ll # Authorization: Bearer {{JWT}}

###

POST http://api-gamekeeper.herokuapp.com/users content-type: application/json

{
"userName": "LlanddewiLovesYou", "password": "Brefi1979!", "permissions": "admin"

}