Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- LOGIN AND Authorization:
- POST: http://localhost:5000/api/Users/Register //registrerer ny bruker
- {
- "Username":"blabla",
- "Email":"bla@blabla.bla",
- "Password":"blabla"
- }
- POST: http://localhost:5000/api/Users/authenticate //Returnerer bruker med security token
- {
- "Username":"blabla",
- "Email":"bla@blabla.bla",
- "Password":"blabla"
- }
- GET: http://localhost:5000/api/Users/AuthTest //kun for å teste om autentisering fungerer
- Header: Authorization | Token from authenticate result.
- LISTINGS:
- GET: http://localhost:5000/api/Listing/GetAll //Henter ut alle annonser
- GET: http://localhost:5000/api/Listing/GetUsers //henter ut en brukes anonser
- POST: http://localhost:5000/api/Listing/Post //Post ny annonse
- Header: Authorization | Token from authenticate result.
- Body:
- {
- IID{ //Image ID's
- 1,2,3,4
- }
- Listing{
- "Visable": "true",
- "IsAuction": "false",
- "CloseAuction": 01.01.0001 00.00.00,
- "User": "UserId", //can be found in result of authenticate
- "Title": "Title",
- "Price": 500,
- "Desc":"this is a big tree"
- "filters":{
- "species":"gran",
- "quality":"S",
- "dimensions":"",
- "quantity":50,
- "location"{
- "City":"k.town",
- "County": "Aust-Agder"
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement