Advertisement
Guest User

Untitled

a guest
Nov 12th, 2018
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. This REST API produces an interface to manage user access. This API uses JSON format.
  2. The user can be identified by his email. Each user account has an expiration date. If the
  3. expiration date is null user have permanent access. All requests require an access token.
  4. Create or Update funded user:
  5. PUT https://news.site.com/v1/co/users
  6. Authorization : Bearer xxxxxxxxxxxxxxxxxxxx
  7. Content-Type: application/json
  8. Body:
  9. {
  10. email: " test@example.com ",
  11. expired: null,
  12. funded: true
  13. }
  14. Response:
  15. 200 {message: "OK"}
  16. 400 {message: "Bad arguments"}
  17. 401 {message: "Bad authorization"}
  18. 500 {message: "Server error"}
  19. Example:
  20. curl -d "{\"email\": \" test@example.com \", \"expired\": null, \"funded\": true}" -H "Content-Type:
  21. application/json" -H "Authorization: Bearer xxxxxxxxxxxxxxxxxxxx" -X PUT https://news.optimusfutures.com/v1/optimus-futures/users?debug=true
  22. Note:
  23. You can use debug=true (see example) get error description.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement