Advertisement
Guest User

Untitled

a guest
Mar 26th, 2019
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. LOGIN AND Authorization:
  2. POST: http://localhost:5000/api/Users/Register //registrerer ny bruker
  3. {
  4. "Username":"blabla",
  5. "Email":"bla@blabla.bla",
  6. "Password":"blabla"
  7. }
  8. POST: http://localhost:5000/api/Users/authenticate //Returnerer bruker med security token
  9. {
  10. "Username":"blabla",
  11. "Email":"bla@blabla.bla",
  12. "Password":"blabla"
  13. }
  14. GET: http://localhost:5000/api/Users/AuthTest //kun for å teste om autentisering fungerer
  15. Header: Authorization | Token from authenticate result.
  16.  
  17. LISTINGS:
  18. GET: http://localhost:5000/api/Listing/GetAll //Henter ut alle annonser
  19.  
  20. GET: http://localhost:5000/api/Listing/GetUsers //henter ut en brukes anonser
  21.  
  22. POST: http://localhost:5000/api/Listing/Post //Post ny annonse
  23. Header: Authorization | Token from authenticate result.
  24. Body:
  25. {
  26. IID{ //Image ID's
  27. 1,2,3,4
  28. }
  29. Listing{
  30. "Visable": "true",
  31. "IsAuction": "false",
  32. "CloseAuction": 01.01.0001 00.00.00,
  33. "User": "UserId", //can be found in result of authenticate
  34. "Title": "Title",
  35. "Price": 500,
  36. "Desc":"this is a big tree"
  37. "filters":{
  38. "species":"gran",
  39. "quality":"S",
  40. "dimensions":"",
  41. "quantity":50,
  42. "location"{
  43. "City":"k.town",
  44. "County": "Aust-Agder"
  45. }
  46. }
  47. }
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement