Skip to content

Latest commit

 

History

History
66 lines (47 loc) · 3.56 KB

api.rest

File metadata and controls

66 lines (47 loc) · 3.56 KB

### GET all product GET https://long-plum-chicken-fez.cyclic.app/api/all/

category of API following way 1.women https://long-plum-chicken-fez.cyclic.app/api/women/

2.men https://long-plum-chicken-fez.cyclic.app/api/men/

3.beauty https://long-plum-chicken-fez.cyclic.app/api/beauty/

4.furniture https://long-plum-chicken-fez.cyclic.app/api/furniture/

5.kid https://long-plum-chicken-fez.cyclic.app/api/kid/

### GET all users

GET http://localhost:9090/users/54

### Register a new user POST http://localhost:9090/user/register Content-Type: application/json

{
"username": "ab", "password": "ab", "email": "a@mail.com", "firstname": "a", "lastname": "b", "avatar": "https://cloudflare-ipfs.com/ipfs/Qmd3W5DuhgHirLHGVixi6V76LhCkZUz6pnFt5AJBiyvHye/avatar/762.jpg"

}

### Log in an existing user # eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwidXNlcm5hbWUiOiJhZG1pbiIsImZpcnN0bmFtZSI6IkFkIiwibGFzdG5hbWUiOiJNaW5pc3RlciIsImVtYWlsIjoiYWRtaW5AbWFpbC5jb20iLCJwYXNzd29yZCI6IiQyYiQxMCRsTG01THA0MHVCUjlDVXJabjU4Q2RPbDh5dTVHcDJ1bUFPLjZseS52V2NaMGEwdlVLc0hpQyIsImF2YXRhciI6Imh0dHBzOi8vY2xvdWRmbGFyZS1pcGZzLmNvbS9pcGZzL1FtZDNXNUR1aGdIaXJMSEdWaXhpNlY3NkxoQ2taVXo2cG5GdDVBSkJpeXZIeWUvYXZhdGFyLzc2Mi5qcGciLCJ1c2VyTGV2ZWwiOjQsImNyZWF0ZWRBdCI6MTY3MDE2NTk4MDYzOCwiaWF0IjoxNjcwNTc4MTk5LCJleHAiOjE2NzA1ODg5OTl9.reIIpmFiOBmMeus8aVV8eCSLANSrGmsr_1AMYVFTbco POST http://localhost:9090/user/login Content-Type: application/json

{
"username": "admin", "password": "admin"

}

### access PoshStrom's (with our token) GET http://localhost:9090/posh?userId=1 Content-Type: application/json Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwidXNlcm5hbWUiOiJhZG1pbiIsImZpcnN0bmFtZSI6IkFkIiwibGFzdG5hbWUiOiJNaW5pc3RlciIsImVtYWlsIjoiYWRtaW5AbWFpbC5jb20iLCJwYXNzd29yZCI6IiQyYiQxMCRsTG01THA0MHVCUjlDVXJabjU4Q2RPbDh5dTVHcDJ1bUFPLjZseS52V2NaMGEwdlVLc0hpQyIsImF2YXRhciI6Imh0dHBzOi8vY2xvdWRmbGFyZS1pcGZzLmNvbS9pcGZzL1FtZDNXNUR1aGdIaXJMSEdWaXhpNlY3NkxoQ2taVXo2cG5GdDVBSkJpeXZIeWUvYXZhdGFyLzc2Mi5qcGciLCJ1c2VyTGV2ZWwiOjQsImNyZWF0ZWRBdCI6MTY3MDE2NTk4MDYzOCwiaWF0IjoxNjcwNTk2Mjk1LCJleHAiOjE2NzA2MDcwOTV9.qUdm043dW3fY-bYHntcDIbAEjhdJg5X9Bz8BBiHNyEI ### access PoshStrom with its id GET http://localhost:9090/PoshStrom/86 Content-Type: application/json Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwidXNlcm5hbWUiOiJhZG1pbiIsImZpcnN0bmFtZSI6IkFkIiwibGFzdG5hbWUiOiJNaW5pc3RlciIsImVtYWlsIjoiYWRtaW5AbWFpbC5jb20iLCJwYXNzd29yZCI6IiQyYiQxMCRsTG01THA0MHVCUjlDVXJabjU4Q2RPbDh5dTVHcDJ1bUFPLjZseS52V2NaMGEwdlVLc0hpQyIsImF2YXRhciI6Imh0dHBzOi8vY2xvdWRmbGFyZS1pcGZzLmNvbS9pcGZzL1FtZDNXNUR1aGdIaXJMSEdWaXhpNlY3NkxoQ2taVXo2cG5GdDVBSkJpeXZIeWUvYXZhdGFyLzc2Mi5qcGciLCJ1c2VyTGV2ZWwiOjQsImNyZWF0ZWRBdCI6MTY3MDE2NTk4MDYzOCwiaWF0IjoxNjcwNTk2Mjk1LCJleHAiOjE2NzA2MDcwOTV9.qUdm043dW3fY-bYHntcDIbAEjhdJg5X9Bz8BBiHNyEI

### delete PoshStrom of id: jOlm9bijJc DELETE http://localhost:9090/PoshStrom/JhhTIKUUaJ Content-Type: application/json Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6InZpdmVrc2luZ2giLCJwYXNzd29yZCI6IiQyYiQxMCR2NzhTTnZBZ0Z0Z3huNWZJNUh3RlZldkw0N2I2aFlsU0ZoSEU3SEJwMUtiMnhhY040QzcuNiIsImVtYWlsIjoidnN0QG1haWwuY29tIiwiZmlyc3RuYW1lIjoiVml2ZWsiLCJsYXN0bmFtZSI6IlRvbWFyIiwiYXZhdGFyIjoiaHR0cHM6Ly9jbG91ZGZsYXJlLWlwZnMuY29tL2lwZnMvUW1kM1c1RHVoZ0hpckxIR1ZpeGk2Vjc2TGhDa1pVejZwbkZ0NUFKQml5dkh5ZS9hdmF0YXIvNzYyLmpwZyIsImNyZWF0ZWRBdCI6MTY3MDQ5NTc2OTMwNCwiaWQiOjUyLCJpYXQiOjE2NzA0OTYwMzksImV4cCI6MTY3MDUwNjgzOX0.HEVhUcBPNvt5GWmRYDnjS5E2a3dzDGYkAA8HiVbknBY

### Just want to toggle completed for JhhTIKUUaJ PATCH http://localhost:3000/api/products/1 Content-Type: application/json

{
"username":"vishal"

}