{ "info": { "_postman_id": "cc718b53-4674-42f9-a2cd-a10043492825", "name": "devise-api", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", "_exporter_id": "4197184" }, "item": [ { "name": "Session", "item": [ { "name": "User Sign In [Session]", "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"email\": \"uriel@email.com\",\n \"password\": \"12345678\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseAuthURL}}sign_in", "host": [ "{{baseAuthURL}}sign_in" ] } }, "response": [] }, { "name": "User Sign Out [Session]", "request": { "method": "DELETE", "header": [ { "key": "access-token", "value": "{{access-token\n}}", "type": "text" }, { "key": "uid", "value": "{{uid}}", "type": "text" }, { "key": "client", "value": "{{client}}", "type": "text" } ], "url": { "raw": "{{baseAuthURL}}sign_out", "host": [ "{{baseAuthURL}}sign_out" ] } }, "response": [] } ] }, { "name": "User", "item": [ { "name": "User Sign Up", "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"email\": \"uriel.juliattivalle@gmail.com\",\n \"password\": \"12345678\",\n \"password_confirmation\": \"12345678\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseAuthURL}}", "host": [ "{{baseAuthURL}}" ] } }, "response": [] }, { "name": "User Validate Token", "request": { "method": "GET", "header": [ { "key": "access-token", "value": "{{access-token\n}}", "type": "text" }, { "key": "uid", "value": "{{uid}}", "type": "text" }, { "key": "client", "value": "{{client}}", "type": "text" } ], "url": { "raw": "{{baseAuthURL}}validate_token", "host": [ "{{baseAuthURL}}validate_token" ], "query": [ { "key": "uid", "value": "uriel.juliattivalle@gmail.com", "disabled": true }, { "key": "access-token", "value": "QrsJKfulHA884WD6DUJLPw", "disabled": true }, { "key": "client", "value": "MKEjafuFVoGN0QEXZIKmXg", "disabled": true } ] } }, "response": [] }, { "name": "User Delete", "request": { "method": "DELETE", "header": [ { "key": "access-token", "value": "{{access-token\n}}", "type": "text" }, { "key": "uid", "value": "{{uid}}", "type": "text" }, { "key": "client", "value": "{{client}}", "type": "text" } ], "url": { "raw": "{{baseAuthURL}}", "host": [ "{{baseAuthURL}}" ] } }, "response": [] }, { "name": "User Update", "request": { "method": "PUT", "header": [ { "key": "access-token", "value": "{{access-token\n}}", "type": "text" }, { "key": "uid", "value": "{{uid}}", "type": "text" }, { "key": "client", "value": "{{client}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"name\": \"Uriel\",\n \"admin\": \"true\",\n \"nickname\": \"Uriel Valle\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseAuthURL}}", "host": [ "{{baseAuthURL}}" ] } }, "response": [] }, { "name": "User Update E-mail", "request": { "method": "PUT", "header": [ { "key": "access-token", "value": "{{access-token\n}}", "type": "text" }, { "key": "uid", "value": "{{uid}}", "type": "text" }, { "key": "client", "value": "{{client}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"email\": \"uriel@email.com\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseAuthURL}}", "host": [ "{{baseAuthURL}}" ] } }, "response": [] } ] }, { "name": "Password", "item": [ { "name": "User Update Password", "request": { "method": "PUT", "header": [ { "key": "access-token", "value": "{{access-token\n}}", "type": "text" }, { "key": "uid", "value": "{{uid}}", "type": "text" }, { "key": "client", "value": "{{client}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"current_password\": \"12345678\",\n \"password\": \"12345678\",\n \"password_confirmation\": \"12345678\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseAuthURL}}", "host": [ "{{baseAuthURL}}" ] } }, "response": [] }, { "name": "User Forget Password", "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"email\": \"uriel.juliattivalle@gmail.com\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseAuthURL}}password", "host": [ "{{baseAuthURL}}password" ] } }, "response": [] }, { "name": "User Reset Password", "request": { "method": "PUT", "header": [ { "key": "access-token", "value": "kfp7qHoGyuRMvuIvZBSDmg", "type": "text" }, { "key": "client", "value": "kGxR-SKi6-nVIHhh33YCFQ", "type": "text" }, { "key": "token", "value": "kfp7qHoGyuRMvuIvZBSDmg", "type": "text" }, { "key": "uid", "value": "{{uid}}", "type": "text" } ], "body": { "mode": "raw", "raw": "// Header info From the email URL (Forget Password)\n{\n \"password\": \"12345678\",\n \"password_confirmation\": \"12345678\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseAuthURL}}/password", "host": [ "{{baseAuthURL}}" ], "path": [ "password" ] } }, "response": [] } ] }, { "name": "Confirmation", "item": [ { "name": "User Confirmation", "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "// Gera um email de confirmação\n{\n \"email\": \"uriel.juliattivalle@gmail.com\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseAuthURL}}confirmation", "host": [ "{{baseAuthURL}}confirmation" ] } }, "response": [] } ] }, { "name": "Authorized User", "item": [ { "name": "Get All Users", "request": { "method": "GET", "header": [ { "key": "access-token", "value": "{{access-token\n}}", "type": "text" }, { "key": "uid", "value": "{{uid}}", "type": "text" }, { "key": "client", "value": "{{client}}", "type": "text" } ], "url": { "raw": "{{baseURL}}users", "host": [ "{{baseURL}}users" ] } }, "response": [] }, { "name": "Get User", "request": { "method": "GET", "header": [ { "key": "access-token", "value": "{{access-token\n}}", "type": "text" }, { "key": "uid", "value": "{{uid}}", "type": "text" }, { "key": "client", "value": "{{client}}", "type": "text" } ], "url": { "raw": "{{baseURL}}/users/6", "host": [ "{{baseURL}}" ], "path": [ "users", "6" ] } }, "response": [] }, { "name": "Create User", "request": { "method": "POST", "header": [ { "key": "access-token", "value": "{{access-token\n}}", "type": "text" }, { "key": "uid", "value": "{{uid}}", "type": "text" }, { "key": "client", "value": "{{client}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"email\": \"joe@email.com\",\n \"password\": \"12345678\",\n \"password_confirmation\": \"12345678\",\n \"admin\": \"false\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseURL}}users", "host": [ "{{baseURL}}users" ] } }, "response": [] }, { "name": "Update User", "request": { "method": "PUT", "header": [ { "key": "access-token", "value": "{{access-token\n}}", "type": "text" }, { "key": "uid", "value": "{{uid}}", "type": "text" }, { "key": "client", "value": "{{client}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"name\": \"Joe Don\",\n \"nickname\": \"Joe Don\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseURL}}/users/6", "host": [ "{{baseURL}}" ], "path": [ "users", "6" ] } }, "response": [] }, { "name": "Delete User", "request": { "method": "DELETE", "header": [ { "key": "access-token", "value": "{{access-token\n}}", "type": "text" }, { "key": "uid", "value": "{{uid}}", "type": "text" }, { "key": "client", "value": "{{client}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"name\": \"Joe Don\",\n \"nickname\": \"Joe Don\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseURL}}/users/6", "host": [ "{{baseURL}}" ], "path": [ "users", "6" ] } }, "response": [] } ] }, { "name": "Get Articles", "event": [ { "listen": "prerequest", "script": { "exec": [ "pm.globals.get(\"baseURL\");", "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "pm.globals.get(\"baseURL\");" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [ { "key": "access-token", "value": "{{access-token\n}}", "type": "text" }, { "key": "client", "value": "{{client}}", "type": "text" }, { "key": "uid", "value": "{{uid}}", "type": "text" } ], "url": { "raw": "{{baseURL}}articles", "host": [ "{{baseURL}}articles" ], "query": [ { "key": "", "value": null, "disabled": true } ] } }, "response": [] }, { "name": "Get Articles V1", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/vnd.devise_api.v1", "type": "text" }, { "key": "access-token", "value": "{{access-token\n}}", "type": "text" }, { "key": "client", "value": "{{client}}", "type": "text" }, { "key": "uid", "value": "{{uid}}", "type": "text" } ], "url": { "raw": "localhost:3000/api/articles", "host": [ "localhost" ], "port": "3000", "path": [ "api", "articles" ] } }, "response": [] }, { "name": "Get Articles V2", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/vnd.devise_api.v2", "type": "text" }, { "key": "access-token", "value": "{{access-token\n}}", "type": "text" }, { "key": "client", "value": "{{client}}", "type": "text" }, { "key": "uid", "value": "{{uid}}", "type": "text" } ], "url": { "raw": "localhost:3000/api/articles", "host": [ "localhost" ], "port": "3000", "path": [ "api", "articles" ] } }, "response": [] }, { "name": "Update Article", "request": { "method": "PUT", "header": [ { "key": "access-token", "value": "{{access-token\n}}", "type": "text" }, { "key": "client", "value": "{{client}}", "type": "text" }, { "key": "uid", "value": "{{uid}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"title\": \"Artigo\",\n \"body\": \"Outro Versionamento\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "localhost:3000/api/articles/7", "host": [ "localhost" ], "port": "3000", "path": [ "api", "articles", "7" ] } }, "response": [] }, { "name": "Delete Article", "request": { "method": "DELETE", "header": [ { "key": "access-token", "value": "{{access-token\n}}", "type": "text" }, { "key": "client", "value": "{{client}}", "type": "text" }, { "key": "uid", "value": "{{uid}}", "type": "text" } ], "url": { "raw": "localhost:3000/api/articles/6", "host": [ "localhost" ], "port": "3000", "path": [ "api", "articles", "6" ] } }, "response": [] }, { "name": "Get Article", "request": { "method": "GET", "header": [ { "key": "access-token", "value": "{{access-token\n}}", "type": "text" }, { "key": "client", "value": "{{client}}", "type": "text" }, { "key": "uid", "value": "{{uid}}", "type": "text" } ], "url": { "raw": "localhost:3000/api/articles/7", "host": [ "localhost" ], "port": "3000", "path": [ "api", "articles", "7" ] } }, "response": [] }, { "name": "Create Article", "request": { "method": "POST", "header": [ { "key": "access-token", "value": "{{access-token\n}}", "type": "text" }, { "key": "client", "value": "{{client}}", "type": "text" }, { "key": "uid", "value": "{{uid}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"title\": \"Artigo\",\n \"body\": \"Artigão em body\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "localhost:3000/api/articles", "host": [ "localhost" ], "port": "3000", "path": [ "api", "articles" ] } }, "response": [] } ] }