# Versys ### Public endpoints ```bash # request curl -XPOST 'https://versys-cb8d3b16a9ae.herokuapp.com/api/v1/auth/registration' -H 'Content-Type: application/json' \ -d '{"full_name": "Luiz Vasconcellos", "email_address": "luizpvasc@gmail.com", "username": "luizpvas", "password": "mystrongpassword", "terms_of_use": true}' # response {"user":{"username":"luizpvas","uuid":"62077054-353b-4f97-9e32-c474f09c6de3","inserted_at":"2024-02-03T21:54:18Z","email_address":"luizpvasc@gmail.com"},"token":{"value":"d072d205-5f9b-4af4-ac04-7be2efe9ac71","inserted_at":"2024-02-03T21:54:18Z","expires_at":"2025-02-02T21:54:18Z","purpose":"session"}} ``` ```bash # request curl -XPOST 'https://versys-cb8d3b16a9ae.herokuapp.com/api/v1/auth/session' -H 'Content-Type: application/json' \ -d '{"email_address": "luizpvasc@gmail.com", "password": "mystrongpassword"}' # response {"user":{"username":"luizpvas","uuid":"62077054-353b-4f97-9e32-c474f09c6de3","inserted_at":"2024-02-03T21:54:18Z","email_address":"luizpvasc@gmail.com"},"token":{"value":"a885d96b-2392-4ca1-8bb9-0a1ccd0aba6d","inserted_at":"2024-02-03T21:55:02Z","expires_at":"2025-02-02T21:55:02Z","purpose":"session"}} ``` ```bash # request curl -XPOST 'https://versys-cb8d3b16a9ae.herokuapp.com/api/v1/auth/password_reset/request_by_email' -H 'Content-Type: application/json' \ -d '{"email_address": "luizpvasc@gmail.com"}' # response {"email_address":"luizpvasc@gmail.com"} ``` ```bash # request curl -XPOST 'https://versys-cb8d3b16a9ae.herokuapp.com/api/v1/auth/password_reset/claim' -H 'Content-Type: application/json' \ -d '{"token": "1f386e54-f591-4d4b-9780-fca53583375b", "password": "mynewpassword"}' # response {"message":"password updated"} ``` ```bash # request curl -XPOST 'https://versys-cb8d3b16a9ae.herokuapp.com/api/v1/social/comment' -H 'Content-Type: application/json' \ -H 'Authorization: a885d96b-2392-4ca1-8bb9-0a1ccd0aba6d' \ -d '{"href": "https://google.com", "body_text": "This is my comment"}' # response {"comment":{"id":1,"replies":[],"reactions":{},"author_id":1,"body_text":"This is my comment","published_at":"2024-02-03T21:59:26Z","author_name":"Luiz Vasconcellos","author_profile_picture_100x100_url":"https://i.pravatar.cc/100?u=62077054-353b-4f97-9e32-c474f09c6de3"}} ``` ```bash # request curl -XPOST 'https://versys-cb8d3b16a9ae.herokuapp.com/api/v1/social/comment' -H 'Content-Type: application/json' \ -H 'Authorization: a885d96b-2392-4ca1-8bb9-0a1ccd0aba6d' \ -d '{"href": "https://google.com", "body_text": "This is a reply", "in_reply_to": 1}' # response {"comment":{"id":2,"replies":[],"reactions":{},"author_id":1,"body_text":"This is a reply","published_at":"2024-02-03T22:00:26Z","author_name":"Luiz Vasconcellos","author_profile_picture_100x100_url":"https://i.pravatar.cc/100?u=62077054-353b-4f97-9e32-c474f09c6de3"}} ``` ```bash # request curl -XGET 'https://versys-cb8d3b16a9ae.herokuapp.com/api/v1/social/comments?href=https://google.com' -H 'Content-Type: application/json' \ -H 'Authorization: a885d96b-2392-4ca1-8bb9-0a1ccd0aba6d' # response {"comments":[{"id":3,"replies":[],"author_id":1,"body_text":"This is a reply","published_at":"2024-02-03T22:03:17Z","reactions":{},"author_name":"Luiz Vasconcellos","author_profile_picture_100x100_url":"https://i.pravatar.cc/100?u=62077054-353b-4f97-9e32-c474f09c6de3"},{"id":2,"replies":[],"author_id":1,"body_text":"This is a reply","published_at":"2024-02-03T22:00:26Z","reactions":{},"author_name":"Luiz Vasconcellos","author_profile_picture_100x100_url":"https://i.pravatar.cc/100?u=62077054-353b-4f97-9e32-c474f09c6de3"},{"id":1,"replies":[{"id":4,"author_id":1,"body_text":"This is a reply","published_at":"2024-02-03T22:03:58Z","reactions":{},"author_name":"Luiz Vasconcellos","author_profile_picture_100x100_url":"https://i.pravatar.cc/100?u=62077054-353b-4f97-9e32-c474f09c6de3"}],"author_id":1,"body_text":"This is my comment","published_at":"2024-02-03T21:59:26Z","reactions":{"👍":1,"😊":1},"author_name":"Luiz Vasconcellos","author_profile_picture_100x100_url":"https://i.pravatar.cc/100?u=62077054-353b-4f97-9e32-c474f09c6de3"}],"paginator":{"next_page_cursor":false,"previous_page_cursor":false}} ``` ```bash # request curl -XPOST 'https://versys-cb8d3b16a9ae.herokuapp.com/api/v1/social/reaction' -H 'Content-Type: application/json' \ -H 'Authorization: a885d96b-2392-4ca1-8bb9-0a1ccd0aba6d' \ -d '{"comment_id": 1, "emoji": "👍"}' # response {"reaction":"created"} ```