{"info":{"_postman_id":"b21212ee-3415-4d93-a805-2b548950678a","name":"greenlight","description":"<html><head></head><body><p>A fully featured JSON API for creating, retrieving and managing information about movies and users of the API.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"20112637","collectionId":"b21212ee-3415-4d93-a805-2b548950678a","publishedId":"2s93Y3uLLY","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2023-04-20T16:15:29.000Z"},"item":[{"name":"Users","item":[{"name":"registerUserApi","id":"1cd8f4c9-cbfd-4821-a442-de87bf369b20","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"name\": \"foo\",\n    \"email\": \"foo@gmail.com\",\n    \"password\": \"1234567890\",\n    \"role\": \"contributor\"\n}"},"url":"localhost:4000/v1/users","description":"<ol>\n<li>API endpoint to <strong>register</strong> a new user.</li>\n<li>Expected response code: 202 Status Accepted</li>\n<li>A welcome mesage containing the user account activation token will be sent to the user's email, this activation token is valid for only 3days or which the user must request for another activation token if the account has not yet been activated.</li>\n<li>All fields are necessary.</li>\n<li>If the role of a user is anything but \"contributor\" (case sensitive) the user will only have permissions to view movies but not create a new movie.</li>\n</ol>\n","urlObject":{"port":"4000","path":["v1","users"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"c4b7df5a-bb74-4590-a850-852890c06d85","name":"registerUserExample","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"name\": \"foo\",\n    \"email\": \"foo@gmail.com\",\n    \"password\": \"1234567890\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:4000/v1/users"},"status":"Accepted","code":202,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","description":"","type":"text"},{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Authorization"},{"key":"Date","value":"Wed, 19 Apr 2023 12:16:07 GMT"},{"key":"Content-Length","value":"153"}],"cookie":[],"responseTime":null,"body":"{\n    \"user\": {\n        \"id\": 1,\n        \"created_at\": \"2023-04-19T12:16:07Z\",\n        \"name\": \"foo\",\n        \"email\": \"foo@gmail.com\",\n        \"activated\": false,\n        \"admin\": false\n    }\n}"}],"_postman_id":"1cd8f4c9-cbfd-4821-a442-de87bf369b20"},{"name":"createActivationTokenApi","id":"82fd3958-6e00-4788-873c-7929acc447e3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"email\": \"foo@gmail.com\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:4000/v1/tokens/activation","description":"<ol>\n<li>API endpoint to <strong>create activation token</strong> for a user account.</li>\n<li>Expected response code: 202 Status Accepted</li>\n<li>If the user hasn't activated their account in 3days or for some reason didn't receive their activation token, create a new activation token which will be sent to the user email.</li>\n</ol>\n","urlObject":{"port":"4000","path":["v1","tokens","activation"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"e4360c70-4c5d-4155-a7a2-8f832b8b8c90","name":"createActivationTokenExample","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"foo@gmail.com\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:4000/v1/tokens/activation"},"status":"Accepted","code":202,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Authorization"},{"key":"Date","value":"Wed, 19 Apr 2023 14:22:03 GMT"},{"key":"Content-Length","value":"82"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"an email will be sent to you containing activation instructions\"\n}"}],"_postman_id":"82fd3958-6e00-4788-873c-7929acc447e3"},{"name":"activateUserAccountApi","id":"164d0ac1-38bf-487d-bc70-052af9c70666","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\"token\": \"FOAL7YFXPGK5VBMKT4EXJTA2WI\"}","options":{"raw":{"language":"json"}}},"url":"localhost:4000/v1/users/activated","description":"<ol>\n<li>API endpoint to <strong>activate</strong> user account.</li>\n<li>Expected response code: 200 OK</li>\n<li>Acivated field should now be set to true in the response</li>\n</ol>\n","urlObject":{"port":"4000","path":["v1","users","activated"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"a5218a2c-e11e-47e2-9edd-7fa893ab76ee","name":"activateUserExample","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"  {\"token\": \"FE6STSD3GL7KYEWACGL3CGFAFU\"}","options":{"raw":{"language":"json"}}},"url":"localhost:4000/v1/users/activated"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Authorization"},{"key":"Date","value":"Wed, 19 Apr 2023 12:20:40 GMT"},{"key":"Content-Length","value":"152"}],"cookie":[],"responseTime":null,"body":"{\n    \"user\": {\n        \"id\": 1,\n        \"created_at\": \"2023-04-19T12:16:07Z\",\n        \"name\": \"foo\",\n        \"email\": \"foo@gmail.com\",\n        \"activated\": true,\n        \"admin\": false\n    }\n}"}],"_postman_id":"164d0ac1-38bf-487d-bc70-052af9c70666"},{"name":"userAuthenticationApi","id":"a686bfed-1de6-4d5c-ad10-c9e53ee0f0e3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{    \"email\": \"foo@gmail.com\",\n    \"password\": \"1234567890\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:4000/v1/tokens/authentication","description":"<ol>\n<li>API endpoint to <strong>authenticate</strong> a user.</li>\n<li>Expected response code: 201 Created.</li>\n<li>A new authentication token and expiry time of the token will be returned.</li>\n</ol>\n","urlObject":{"port":"4000","path":["v1","tokens","authentication"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"68b5bbc8-fc15-4b92-a40e-c06d0d7df542","name":"userAuthenticationExample","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{    \"email\": \"foo@gmail.com\",\n    \"password\": \"1234567890\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:4000/v1/tokens/authentication"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Authorization"},{"key":"Date","value":"Wed, 19 Apr 2023 12:22:10 GMT"},{"key":"Content-Length","value":"120"}],"cookie":[],"responseTime":null,"body":"{\n    \"authentication_token\": {\n        \"token\": \"WD4JAIL2MTUBWKGXZ76SAU6VWY\",\n        \"expiry\": \"2023-04-20T12:22:10.839739168Z\"\n    }\n}"}],"_postman_id":"a686bfed-1de6-4d5c-ad10-c9e53ee0f0e3"},{"name":"changePasswordApi","id":"bbe0ea43-2ec6-4726-8c1f-ff1d517967a9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Authorization","value":"Bearer 2CETCZEBRLNRMYMEMFSFEPGHCY","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n     \"currentpassword\": \"pa5555word\",\n    \"password\": \"1234567890\",\n    \"confirmpassword\": \"1234567890\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:4000/v1/users/change-password","description":"<ol>\n<li>API endpoint to <strong>change user password</strong>.</li>\n<li>Expected response code: 200 OK</li>\n<li>User must be authenticated, a new token will be returned so the user wouldn't have to log in again.</li>\n</ol>\n","urlObject":{"port":"4000","path":["v1","users","change-password"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"c8d55c34-7b8a-487b-8e0d-5837c1d16360","name":"changePasswordExample","originalRequest":{"method":"PUT","header":[{"key":"Authorization","value":"Bearer 2CETCZEBRLNRMYMEMFSFEPGHCY","type":"text"}],"body":{"mode":"raw","raw":"{\n     \"currentpassword\": \"pa5555word\",\n    \"password\": \"1234567890\",\n    \"confirmpassword\": \"1234567890\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:4000/v1/users/change-password"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Authorization"},{"key":"Date","value":"Wed, 19 Apr 2023 12:36:56 GMT"},{"key":"Content-Length","value":"105"}],"cookie":[],"responseTime":null,"body":"{\n    \"token\": {\n        \"token\": \"Y7LWJSI7ZZGEGJTH4BQ5N3LZA4\",\n        \"expiry\": \"2023-04-20T12:36:56.621324453Z\"\n    }\n}"}],"_postman_id":"bbe0ea43-2ec6-4726-8c1f-ff1d517967a9"},{"name":"passwordResetTokenApi","id":"651bcf27-9f7c-4075-8d31-5ac88dccbe2d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"email\": \"foo@gmail.com\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:4000/v1/tokens/password","description":"<ol>\n<li>API endpoint to <strong>create password reset token</strong>.</li>\n<li>Expected response code: 202 Status Accepted</li>\n<li>A password reset token will be sent to the request user's email.</li>\n</ol>\n","urlObject":{"port":"4000","path":["v1","tokens","password"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"8e5ff3ca-5bb9-490e-a4e5-0b7fd0954c2e","name":"passwordResetTokenExample","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"foo@gmail.com\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:4000/v1/tokens/password"},"status":"Accepted","code":202,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Authorization"},{"key":"Date","value":"Wed, 19 Apr 2023 14:13:46 GMT"},{"key":"Content-Length","value":"86"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"an email will be sent to you containing password reset instructions\"\n}"}],"_postman_id":"651bcf27-9f7c-4075-8d31-5ac88dccbe2d"},{"name":"resetUserPasswordApi","id":"7e378138-c510-4aeb-93e5-fe624cb5ddd5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"  {\"password\": \"newPassword\", \"token\": \"ZJ2ZINU5VDTFK6GW7DLR6I3HYI\"}","options":{"raw":{"language":"json"}}},"url":"localhost:4000/v1/users/password","description":"<ol>\n<li>API endpoint to <strong>reset user password</strong>.</li>\n<li>Expected response code: 200 OK</li>\n</ol>\n","urlObject":{"port":"4000","path":["v1","users","password"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"80dbd101-63f6-4eb6-87b4-6107d243dc7a","name":"resetUserPasswordExample","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"  {\"password\": \"newPassword\", \"token\": \"ZJ2ZINU5VDTFK6GW7DLR6I3HYI\"}","options":{"raw":{"language":"json"}}},"url":"localhost:4000/v1/users/password"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Authorization"},{"key":"Date","value":"Wed, 19 Apr 2023 14:16:34 GMT"},{"key":"Content-Length","value":"55"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"your password was successfully reset\"\n}"}],"_postman_id":"7e378138-c510-4aeb-93e5-fe624cb5ddd5"},{"name":"updateUserDetailsApi","id":"0b673261-8146-4a67-9a7d-5dca0f03e431","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer DZEUBLXE7WL2IIJWSECKYE6TFI","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"email\": \"foofoo@gmail.com\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:4000/v1/users/update-details","description":"<ol>\n<li>API endpoint to <strong>update a user's name or email or both</strong>.</li>\n<li>Expected response code: 200 OK.</li>\n</ol>\n","urlObject":{"port":"4000","path":["v1","users","update-details"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"b631c0ea-1f27-4a9d-a236-55f9985569c6","name":"updateUserDetailsExampleName","originalRequest":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer DZEUBLXE7WL2IIJWSECKYE6TFI","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"name\": \"foofoo\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:4000/v1/users/update-details"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Authorization"},{"key":"Date","value":"Wed, 19 Apr 2023 14:30:18 GMT"},{"key":"Content-Length","value":"155"}],"cookie":[],"responseTime":null,"body":"{\n    \"user\": {\n        \"id\": 1,\n        \"created_at\": \"2023-04-19T12:16:07Z\",\n        \"name\": \"foofoo\",\n        \"email\": \"foo@gmail.com\",\n        \"activated\": true,\n        \"admin\": false\n    }\n}"},{"id":"923e3b1a-4cd2-4dd8-94e8-92ac4bbd216e","name":"updateUserDetailsExampleEmail","originalRequest":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer DZEUBLXE7WL2IIJWSECKYE6TFI","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"email\": \"foofoo@gmail.com\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:4000/v1/users/update-details"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Authorization"},{"key":"Date","value":"Wed, 19 Apr 2023 14:31:12 GMT"},{"key":"Content-Length","value":"158"}],"cookie":[],"responseTime":null,"body":"{\n    \"user\": {\n        \"id\": 1,\n        \"created_at\": \"2023-04-19T12:16:07Z\",\n        \"name\": \"foofoo\",\n        \"email\": \"foofoo@gmail.com\",\n        \"activated\": true,\n        \"admin\": false\n    }\n}"}],"_postman_id":"0b673261-8146-4a67-9a7d-5dca0f03e431"},{"name":"deleteUserAccountApi","id":"a05fcd09-6245-4636-890b-643cecb719c3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer YVJP3W5FSE4MHNKBK2JTF32P3A","type":"text"}],"url":"localhost:4000/v1/users/delete","description":"<ol>\n<li>API endpoint to <strong>delete user account</strong>.</li>\n<li>Expected response code: 200 OK</li>\n<li>User account and every data related to the user would be deleted.</li>\n</ol>\n","urlObject":{"port":"4000","path":["v1","users","delete"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"fc881b83-2063-4e61-9efe-9128d6ba3578","name":"deleteUserAccountExample","originalRequest":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer YVJP3W5FSE4MHNKBK2JTF32P3A","type":"text"}],"url":"localhost:4000/v1/users/delete"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Authorization"},{"key":"Date","value":"Wed, 19 Apr 2023 14:34:04 GMT"},{"key":"Content-Length","value":"52"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"user account successfully deleted\"\n}"}],"_postman_id":"a05fcd09-6245-4636-890b-643cecb719c3"},{"name":"userLogoutApi","id":"9545b0fc-7f95-4f8e-926c-8774f231f0ce","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer 4Y6WNR57O6GOZN4L6TPF4VHW2M","type":"text"}],"url":"localhost:4000/v1/users/logout","description":"<ol>\n<li>API endpoint to <strong>log a user out</strong> from the currently logged in device.</li>\n<li>Expected response code: 200 OK</li>\n</ol>\n","urlObject":{"port":"4000","path":["v1","users","logout"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"c8b2ec6e-88e1-47c0-911d-c7d96261feb9","name":"userLogoutExample","originalRequest":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer 4RZ2U64YY4PXK633KWABPRB3CM","type":"text"}],"url":"localhost:4000/v1/users/logout"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Authorization"},{"key":"Date","value":"Wed, 19 Apr 2023 14:38:05 GMT"},{"key":"Content-Length","value":"46"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"user sucessfully logged out\"\n}"}],"_postman_id":"9545b0fc-7f95-4f8e-926c-8774f231f0ce"},{"name":"userProfilePictureApi","id":"fbe2cc9f-86de-4aaf-87f8-538b41fd346a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Authorization","value":"Bearer IJY24MSKZ3PAUSA3BTBFWTYHOM","type":"text"},{"warning":"This is a duplicate header and will be overridden by the Content-Type header generated by Postman.","key":"Content-Type","value":"multipart/form-data","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"file","type":"file","src":"/home/lyrx/Downloads/WhatsApp Img/me.jpeg"}]},"url":"http://localhost:4000/v1/users/profile","description":"<ol>\n<li>API endpoint to <strong>update default profile picture</strong>.</li>\n<li>Expected response code: 200 OK.</li>\n<li>Image must be 1:1 and mot more than 2mb.</li>\n<li>Allowed Extensions: .jpg, .jpeg and .png.</li>\n<li>The path to the uploaded image would be returned.</li>\n</ol>\n","urlObject":{"protocol":"http","port":"4000","path":["v1","users","profile"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"67200acf-4216-4433-bd94-75059429fd56","name":"userProfilePictureExample","originalRequest":{"method":"PUT","header":[{"key":"Authorization","value":"Bearer IJY24MSKZ3PAUSA3BTBFWTYHOM","type":"text"},{"warning":"This is a duplicate header and will be overridden by the Content-Type header generated by Postman.","key":"Content-Type","value":"multipart/form-data","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"file","type":"file","src":"/home/lyrx/Downloads/WhatsApp Img/me.jpeg"}]},"url":"http://localhost:4000/v1/users/profile"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Authorization"},{"key":"Date","value":"Wed, 19 Apr 2023 14:41:06 GMT"},{"key":"Content-Length","value":"52"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"profile/11681915266457856343.jpeg\"\n}"}],"_postman_id":"fbe2cc9f-86de-4aaf-87f8-538b41fd346a"},{"name":"getUserDetailsApi","id":"574dbf04-1771-4bbc-ab1b-9246122a0131","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer IJY24MSKZ3PAUSA3BTBFWTYHOM","type":"text"}],"url":"localhost:4000/v1/user/profile","description":"<ol>\n<li>API endpoint to <strong>get user details</strong>: email, name, profile picture, id, creatd at.</li>\n<li>Expected response code: 200 OK</li>\n</ol>\n","urlObject":{"port":"4000","path":["v1","user","profile"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"f0864287-4bc1-461c-9d33-8428a09a2a8c","name":"getUserDetailsExample","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Bearer IJY24MSKZ3PAUSA3BTBFWTYHOM","type":"text"}],"url":"localhost:4000/v1/user/profile"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Authorization"},{"key":"Date","value":"Wed, 19 Apr 2023 14:42:59 GMT"},{"key":"Content-Length","value":"171"}],"cookie":[],"responseTime":null,"body":"{\n    \"movie\": {\n        \"ID\": 1,\n        \"CreatedAt\": \"2023-04-19T12:16:07Z\",\n        \"Name\": \"foofoo\",\n        \"Email\": \"foofoo@gmail.com\",\n        \"ImagePath\": \"profile/11681915266457856343.jpeg\"\n    }\n}"}],"_postman_id":"574dbf04-1771-4bbc-ab1b-9246122a0131"},{"name":"showProfilePictureApi","id":"bd55d55f-50ba-4ac3-a87c-3f059a07f380","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer WADQ4E4V7FHMX3LBYK44TXEF2A","type":"text"},{"key":"Accept-Encoding","value":"application/gzip","type":"text"}],"url":"localhost:4000/profile/11681915266457856343.jpeg","description":"<ol>\n<li>API endpoint to <strong>serve request user profile picture</strong></li>\n<li>Expected response code: 200 OK</li>\n<li>The profile picture image should be returned.</li>\n</ol>\n","urlObject":{"port":"4000","path":["profile","11681915266457856343.jpeg"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"c8ad7991-78b7-416f-a6e7-168a8bdca568","name":"showProfilePictureExample","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Bearer IJY24MSKZ3PAUSA3BTBFWTYHOM","type":"text"}],"url":"localhost:4000/profile/11681915266457856343.jpeg"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":null}],"_postman_id":"bd55d55f-50ba-4ac3-a87c-3f059a07f380"}],"id":"e6518d44-0ec7-41ee-8b70-75025d8bcd3f","description":"<p>This folder consists of all API associated with managing the user data.</p>\n","_postman_id":"e6518d44-0ec7-41ee-8b70-75025d8bcd3f"},{"name":"Movies","item":[{"name":"listMovieApi","id":"cced3d27-b54c-47cf-85de-baee5880c7b3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer IJY24MSKZ3PAUSA3BTBFWTYHOM","type":"text"}],"url":"localhost:4000/v1/movies?page=1&page_size=5&title=game&genre=adventure,action&sort=-id","description":"<ol>\n<li>API endpoint to <strong>list movies</strong>.</li>\n<li>Expected response code: 200 OK</li>\n<li>Query Params:<br /> page: The page returned<br /> page_size: The value the returned data should be paginated by.<br /> title: search parameter to filter movies by title.<br /> genre: search parameter to filter movies by genre<br /> sort: the data returned can be sorted based on id, -id, title, -title, year, -year, runtime, -runtime, minus(-) means descending order.</li>\n</ol>\n","urlObject":{"port":"4000","path":["v1","movies"],"host":["localhost"],"query":[{"key":"page","value":"1"},{"key":"page_size","value":"5"},{"key":"title","value":"game"},{"key":"genre","value":"adventure,action"},{"key":"sort","value":"-id"}],"variable":[]}},"response":[{"id":"c2db76e3-9fec-4fb8-b260-6e1df7ad442b","name":"listMovieExampleGetMovies","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Bearer IJY24MSKZ3PAUSA3BTBFWTYHOM","type":"text"}],"url":{"raw":"localhost:4000/v1/movies?page=1&page_size=5","host":["localhost"],"port":"4000","path":["v1","movies"],"query":[{"key":"page","value":"1"},{"key":"page_size","value":"5"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Authorization"},{"key":"Date","value":"Wed, 19 Apr 2023 17:35:07 GMT"},{"key":"Content-Length","value":"951"}],"cookie":[],"responseTime":null,"body":"{\n    \"metadata\": {\n        \"current_page\": 1,\n        \"page_size\": 5,\n        \"first_page\": 1,\n        \"last_page\": 2,\n        \"total_records\": 8\n    },\n    \"movies\": [\n        {\n            \"id\": 1,\n            \"title\": \"Game of Thrones\",\n            \"year\": 2014,\n            \"runtime\": \"200 mins\",\n            \"genres\": [\n                \"Adventure\",\n                \"Action\"\n            ],\n            \"version\": 1\n        },\n        {\n            \"id\": 2,\n            \"title\": \"Raven\",\n            \"year\": 2014,\n            \"runtime\": \"200 mins\",\n            \"genres\": [\n                \"Comedy\",\n                \"Animation\"\n            ],\n            \"version\": 3\n        },\n        {\n            \"id\": 3,\n            \"title\": \"Game of Thrones\",\n            \"year\": 2014,\n            \"runtime\": \"150 mins\",\n            \"genres\": [\n                \"Adventure\",\n                \"Action\"\n            ],\n            \"version\": 2\n        },\n        {\n            \"id\": 4,\n            \"title\": \"Dragon Soldier\",\n            \"year\": 2014,\n            \"runtime\": \"200 mins\",\n            \"genres\": [\n                \"Adventure\",\n                \"Action\",\n                \"Animation\"\n            ],\n            \"version\": 2\n        },\n        {\n            \"id\": 5,\n            \"title\": \"Game of Thrones\",\n            \"year\": 2014,\n            \"runtime\": \"200 mins\",\n            \"genres\": [\n                \"Adventure\",\n                \"Action\"\n            ],\n            \"version\": 1\n        }\n    ]\n}"},{"id":"e3301258-2322-4248-941e-93c5eb3137c0","name":"listMovieExampleGetAndSort","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Bearer IJY24MSKZ3PAUSA3BTBFWTYHOM","type":"text"}],"url":{"raw":"localhost:4000/v1/movies?page=1&page_size=5&sort=-id","host":["localhost"],"port":"4000","path":["v1","movies"],"query":[{"key":"page","value":"1"},{"key":"page_size","value":"5"},{"key":"sort","value":"-id"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Authorization"},{"key":"Date","value":"Wed, 19 Apr 2023 17:36:35 GMT"},{"key":"Content-Length","value":"966"}],"cookie":[],"responseTime":null,"body":"{\n    \"metadata\": {\n        \"current_page\": 1,\n        \"page_size\": 5,\n        \"first_page\": 1,\n        \"last_page\": 2,\n        \"total_records\": 8\n    },\n    \"movies\": [\n        {\n            \"id\": 8,\n            \"title\": \"Dragon Ball\",\n            \"year\": 2014,\n            \"runtime\": \"200 mins\",\n            \"genres\": [\n                \"Adventure\",\n                \"Action\",\n                \"Animation\"\n            ],\n            \"version\": 1\n        },\n        {\n            \"id\": 7,\n            \"title\": \"Vikings\",\n            \"year\": 2015,\n            \"runtime\": \"200 mins\",\n            \"genres\": [\n                \"Adventure\",\n                \"Action\"\n            ],\n            \"version\": 2\n        },\n        {\n            \"id\": 6,\n            \"title\": \"Game of Thrones\",\n            \"year\": 2014,\n            \"runtime\": \"200 mins\",\n            \"genres\": [\n                \"Adventure\",\n                \"Action\"\n            ],\n            \"version\": 1\n        },\n        {\n            \"id\": 5,\n            \"title\": \"Game of Thrones\",\n            \"year\": 2014,\n            \"runtime\": \"200 mins\",\n            \"genres\": [\n                \"Adventure\",\n                \"Action\"\n            ],\n            \"version\": 1\n        },\n        {\n            \"id\": 4,\n            \"title\": \"Dragon Soldier\",\n            \"year\": 2014,\n            \"runtime\": \"200 mins\",\n            \"genres\": [\n                \"Adventure\",\n                \"Action\",\n                \"Animation\"\n            ],\n            \"version\": 2\n        }\n    ]\n}"},{"id":"0db5a47f-d3e9-4a09-902c-2a2beed97569","name":"listMovieExampleGetQuerySort","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Bearer IJY24MSKZ3PAUSA3BTBFWTYHOM","type":"text"}],"url":{"raw":"localhost:4000/v1/movies?page=1&page_size=5&title=game&genre=adventure,action&sort=title","host":["localhost"],"port":"4000","path":["v1","movies"],"query":[{"key":"page","value":"1"},{"key":"page_size","value":"5"},{"key":"title","value":"game"},{"key":"genre","value":"adventure,action"},{"key":"sort","value":"title"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Authorization"},{"key":"Date","value":"Wed, 19 Apr 2023 17:41:05 GMT"},{"key":"Content-Length","value":"783"}],"cookie":[],"responseTime":null,"body":"{\n    \"metadata\": {\n        \"current_page\": 1,\n        \"page_size\": 5,\n        \"first_page\": 1,\n        \"last_page\": 1,\n        \"total_records\": 4\n    },\n    \"movies\": [\n        {\n            \"id\": 6,\n            \"title\": \"Game of Thrones\",\n            \"year\": 2014,\n            \"runtime\": \"200 mins\",\n            \"genres\": [\n                \"Adventure\",\n                \"Action\"\n            ],\n            \"version\": 1\n        },\n        {\n            \"id\": 5,\n            \"title\": \"Game of Thrones\",\n            \"year\": 2014,\n            \"runtime\": \"200 mins\",\n            \"genres\": [\n                \"Adventure\",\n                \"Action\"\n            ],\n            \"version\": 1\n        },\n        {\n            \"id\": 3,\n            \"title\": \"Game of Thrones\",\n            \"year\": 2014,\n            \"runtime\": \"150 mins\",\n            \"genres\": [\n                \"Adventure\",\n                \"Action\"\n            ],\n            \"version\": 2\n        },\n        {\n            \"id\": 1,\n            \"title\": \"Game of Thrones\",\n            \"year\": 2014,\n            \"runtime\": \"200 mins\",\n            \"genres\": [\n                \"Adventure\",\n                \"Action\"\n            ],\n            \"version\": 1\n        }\n    ]\n}"}],"_postman_id":"cced3d27-b54c-47cf-85de-baee5880c7b3"},{"name":"showMovieApi","id":"f707a963-d042-473d-b37e-647b588587f2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer IJY24MSKZ3PAUSA3BTBFWTYHOM","type":"text"}],"url":"localhost:4000//v1/movies/1","description":"<ol>\n<li>API endpoint to <strong>get details about a movie</strong> by ID.</li>\n<li>Expected response code: 200 OK</li>\n</ol>\n","urlObject":{"port":"4000","path":["","v1","movies","1"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"8ae2b720-b172-4f66-9914-13a118520782","name":"showMovieExample","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Bearer IJY24MSKZ3PAUSA3BTBFWTYHOM","type":"text"}],"url":"localhost:4000//v1/movies/1"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Authorization"},{"key":"Date","value":"Wed, 19 Apr 2023 14:55:21 GMT"},{"key":"Content-Length","value":"163"}],"cookie":[],"responseTime":null,"body":"{\n    \"movie\": {\n        \"id\": 1,\n        \"title\": \"Game of Thrones\",\n        \"year\": 2014,\n        \"runtime\": \"200 mins\",\n        \"genres\": [\n            \"Adventure\",\n            \"Action\"\n        ],\n        \"version\": 1\n    }\n}"}],"_postman_id":"f707a963-d042-473d-b37e-647b588587f2"},{"name":"createMovieApi","id":"24909637-00f8-4871-9130-6a203f5fce83","protocolProfileBehavior":{"disableBodyPruning":true,"disabledSystemHeaders":{"content-type":true}},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"Bearer IJY24MSKZ3PAUSA3BTBFWTYHOM","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"title\": \"Dragon Ball\",\n    \"genres\": [\"Adventure\", \"Action\", \"Animation\"],\n    \"runtime\": \"200 mins\",\n    \"year\": 2014\n}"},"url":"localhost:4000//v1/movies","description":"<ol>\n<li>API endpoint for <strong>contributors</strong> to <strong>create a new movie</strong>.</li>\n<li>Expected response code: 201 CREATED</li>\n<li>Data:<ol>\n<li>title: string e.g \"Game of Thrones\"</li>\n<li>genres: json array e.g [\"Adventure\", \"Action\"]</li>\n<li>runtime: string, format: \"200 mins\"</li>\n<li>year: int e.g 2004</li>\n</ol>\n</li>\n</ol>\n","urlObject":{"port":"4000","path":["","v1","movies"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"8a96b4f2-8c1c-4695-a652-88178e55b851","name":"createMovieExample","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"Bearer IJY24MSKZ3PAUSA3BTBFWTYHOM","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"title\": \"Game Of Thrones\",\n    \"genres\": [\"Adventure\", \"Action\"],\n    \"runtime\": \"200 mins\",\n    \"year\": 2014\n}","options":{"raw":{"language":"json"}}},"url":"localhost:4000//v1/movies"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Location","value":"/v1/movies/1"},{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Authorization"},{"key":"Date","value":"Wed, 19 Apr 2023 14:54:10 GMT"},{"key":"Content-Length","value":"163"}],"cookie":[],"responseTime":null,"body":"{\n    \"movie\": {\n        \"id\": 1,\n        \"title\": \"Game of Thrones\",\n        \"year\": 2014,\n        \"runtime\": \"200 mins\",\n        \"genres\": [\n            \"Adventure\",\n            \"Action\"\n        ],\n        \"version\": 1\n    }\n}"}],"_postman_id":"24909637-00f8-4871-9130-6a203f5fce83"},{"name":"updateMovieApi","id":"65ae9b49-804d-40bb-99fe-9668ced1d6f8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer IJY24MSKZ3PAUSA3BTBFWTYHOM","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"title\": \"Dragon Soldier\",\n    \"genres\": [\"Adventure\", \"Action\", \"Animation\"],\n    \"runtime\": \"200 mins\",\n    \"year\": 2014\n}","options":{"raw":{"language":"json"}}},"url":"localhost:4000//v1/movies/4","description":"<ol>\n<li>API endpoint for a request user to <strong>update a movie</strong> he/she made</li>\n<li>Expected response code: 200 OK</li>\n</ol>\n","urlObject":{"port":"4000","path":["","v1","movies","4"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"8d82ee33-160c-491d-8708-ee19d1e811a1","name":"updateMovieExampleTitle","originalRequest":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer IJY24MSKZ3PAUSA3BTBFWTYHOM","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"title\": \"Raven\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:4000//v1/movies/2"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Authorization"},{"key":"Date","value":"Wed, 19 Apr 2023 15:00:55 GMT"},{"key":"Content-Length","value":"153"}],"cookie":[],"responseTime":null,"body":"{\n    \"movie\": {\n        \"id\": 2,\n        \"title\": \"Raven\",\n        \"year\": 2014,\n        \"runtime\": \"200 mins\",\n        \"genres\": [\n            \"Adventure\",\n            \"Action\"\n        ],\n        \"version\": 2\n    }\n}"},{"id":"84464361-a04e-4543-b543-5c5e819b46a6","name":"updateMovieExampleRuntime","originalRequest":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer IJY24MSKZ3PAUSA3BTBFWTYHOM","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"runtime\": \"150 mins\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:4000//v1/movies/3"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Authorization"},{"key":"Date","value":"Wed, 19 Apr 2023 15:02:31 GMT"},{"key":"Content-Length","value":"163"}],"cookie":[],"responseTime":null,"body":"{\n    \"movie\": {\n        \"id\": 3,\n        \"title\": \"Game of Thrones\",\n        \"year\": 2014,\n        \"runtime\": \"150 mins\",\n        \"genres\": [\n            \"Adventure\",\n            \"Action\"\n        ],\n        \"version\": 2\n    }\n}"},{"id":"a86fe75f-1a42-46e5-b4e6-19703e888158","name":"updateMovieExampleYear","originalRequest":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer IJY24MSKZ3PAUSA3BTBFWTYHOM","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{   \n    \"year\": 2015\n}","options":{"raw":{"language":"json"}}},"url":"localhost:4000//v1/movies/7"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Authorization"},{"key":"Date","value":"Wed, 19 Apr 2023 15:03:55 GMT"},{"key":"Content-Length","value":"155"}],"cookie":[],"responseTime":null,"body":"{\n    \"movie\": {\n        \"id\": 7,\n        \"title\": \"Vikings\",\n        \"year\": 2015,\n        \"runtime\": \"200 mins\",\n        \"genres\": [\n            \"Adventure\",\n            \"Action\"\n        ],\n        \"version\": 2\n    }\n}"},{"id":"960c282b-e4a3-4538-b323-007e8530d08d","name":"updateMovieExampleGenres","originalRequest":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer IJY24MSKZ3PAUSA3BTBFWTYHOM","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{   \n    \"genres\": [\n        \"Comedy\",\n        \"Animation\"\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"localhost:4000//v1/movies/2"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Authorization"},{"key":"Date","value":"Wed, 19 Apr 2023 15:05:55 GMT"},{"key":"Content-Length","value":"153"}],"cookie":[],"responseTime":null,"body":"{\n    \"movie\": {\n        \"id\": 2,\n        \"title\": \"Raven\",\n        \"year\": 2014,\n        \"runtime\": \"200 mins\",\n        \"genres\": [\n            \"Comedy\",\n            \"Animation\"\n        ],\n        \"version\": 3\n    }\n}"},{"id":"2f8540f1-6c63-49a8-be1d-e06532b73762","name":"updateMovieExampleAll","originalRequest":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer IJY24MSKZ3PAUSA3BTBFWTYHOM","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"title\": \"Dragon Soldier\",\n    \"genres\": [\"Adventure\", \"Action\", \"Animation\"],\n    \"runtime\": \"200 mins\",\n    \"year\": 2014\n}","options":{"raw":{"language":"json"}}},"url":"localhost:4000//v1/movies/4"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Authorization"},{"key":"Date","value":"Wed, 19 Apr 2023 15:07:36 GMT"},{"key":"Content-Length","value":"178"}],"cookie":[],"responseTime":null,"body":"{\n    \"movie\": {\n        \"id\": 4,\n        \"title\": \"Dragon Soldier\",\n        \"year\": 2014,\n        \"runtime\": \"200 mins\",\n        \"genres\": [\n            \"Adventure\",\n            \"Action\",\n            \"Animation\"\n        ],\n        \"version\": 2\n    }\n}"}],"_postman_id":"65ae9b49-804d-40bb-99fe-9668ced1d6f8"},{"name":"deleteMovieApi","id":"8ae1f5ae-a340-4c35-853a-62790cc48f11","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer XMZ2VHMURDOO34IYBEKA3HVKZI","type":"text"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"localhost:4000//v1/movies/8","description":"<ol>\n<li>API endpoint to <strong>Delete a movie</strong> by ID</li>\n<li>Expected response code: 200 OK</li>\n</ol>\n","urlObject":{"port":"4000","path":["","v1","movies","8"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"3f808c94-bc55-4b52-b8f6-5156f78fa341","name":"deleteMovieExample","originalRequest":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer XMZ2VHMURDOO34IYBEKA3HVKZI","type":"text"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"localhost:4000//v1/movies/8"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Authorization"},{"key":"Date","value":"Thu, 20 Apr 2023 15:42:45 GMT"},{"key":"Content-Length","value":"45"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"movie successfully deleted\"\n}"}],"_postman_id":"8ae1f5ae-a340-4c35-853a-62790cc48f11"}],"id":"b1b6c263-4aad-440c-aef0-cf7364e254d3","description":"<p>This folder consists of all API associated with managing the movies data.<br />Note. To create, update or delete a movie the request user's role on registration must have been \"contributor\" (case sensitive) or the permissions granted to a normal user by an admin user, see PermissionsByAdmin folder.</p>\n","_postman_id":"b1b6c263-4aad-440c-aef0-cf7364e254d3"},{"name":"Metrics","item":[{"name":"healthCheckApi","id":"3b921a9e-f886-48c6-86cb-68a74debab3a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"localhost:4000//v1/healthcheck","description":"<ol>\n<li>API endpoint to check application enviroment, status and version by the git hash</li>\n<li>Expected response code: 200 OK</li>\n</ol>\n","urlObject":{"port":"4000","path":["","v1","healthcheck"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"8e3cc034-818e-43a9-8436-2aa611c9fa73","name":"healthCheckExample","originalRequest":{"method":"GET","header":[],"url":"localhost:4000//v1/healthcheck"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Authorization"},{"key":"Date","value":"Thu, 20 Apr 2023 15:56:55 GMT"},{"key":"Content-Length","value":"115"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"available\",\n    \"system_info\": {\n        \"environment\": \"development\",\n        \"version\": \"v1.0.0-58-g9cb8f58\"\n    }\n}"}],"_postman_id":"3b921a9e-f886-48c6-86cb-68a74debab3a"},{"name":"appDebugMetrics","id":"a1d2bf40-df21-48a9-a250-5fdd3ceee2ec","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"description":"<ol>\n<li>API endpoint to <strong>show application metrics</strong></li>\n<li>Expected response code: 200 OK</li>\n</ol>\n","urlObject":{"query":[],"variable":[]},"url":""},"response":[{"id":"1c5ef4cf-186f-4758-be79-a08543652727","name":"appDebugMetricsExample","originalRequest":{"method":"GET","header":[],"url":"localhost:4000/debug/vars"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Authorization"},{"key":"Date","value":"Thu, 20 Apr 2023 15:58:48 GMT"},{"key":"Transfer-Encoding","value":"chunked"}],"cookie":[],"responseTime":null,"body":"{\n    \"cmdline\": [\n        \"/home/greenlight/greenlight\"\n    ],\n    \"database\": {\n        \"MaxOpenConnections\": 25,\n        \"OpenConnections\": 1,\n        \"InUse\": 0,\n        \"Idle\": 1,\n        \"WaitCount\": 0,\n        \"WaitDuration\": 0,\n        \"MaxIdleClosed\": 0,\n        \"MaxIdleTimeClosed\": 0,\n        \"MaxLifetimeClosed\": 0\n    },\n    \"goroutines\": 8,\n    \"memstats\": {\n        \"Alloc\": 602328,\n        \"TotalAlloc\": 602328,\n        \"Sys\": 12958736,\n        \"Lookups\": 0,\n        \"Mallocs\": 2620,\n        \"Frees\": 127,\n        \"HeapAlloc\": 602328,\n        \"HeapSys\": 3571712,\n        \"HeapIdle\": 1843200,\n        \"HeapInuse\": 1728512,\n        \"HeapReleased\": 1777664,\n        \"HeapObjects\": 2493,\n        \"StackInuse\": 622592,\n        \"StackSys\": 622592,\n        \"MSpanInuse\": 39456,\n        \"MSpanSys\": 48816,\n        \"MCacheInuse\": 4800,\n        \"MCacheSys\": 15600,\n        \"BuckHashSys\": 4251,\n        \"GCSys\": 8129608,\n        \"OtherSys\": 566157,\n        \"NextGC\": 4194304,\n        \"LastGC\": 0,\n        \"PauseTotalNs\": 0,\n        \"PauseNs\": [\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0\n        ],\n        \"PauseEnd\": [\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0,\n            0\n        ],\n        \"NumGC\": 0,\n        \"NumForcedGC\": 0,\n        \"GCCPUFraction\": 0,\n        \"EnableGC\": true,\n        \"DebugGC\": false,\n        \"BySize\": [\n            {\n                \"Size\": 0,\n                \"Mallocs\": 0,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 8,\n                \"Mallocs\": 90,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 16,\n                \"Mallocs\": 864,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 24,\n                \"Mallocs\": 219,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 32,\n                \"Mallocs\": 143,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 48,\n                \"Mallocs\": 256,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 64,\n                \"Mallocs\": 116,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 80,\n                \"Mallocs\": 77,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 96,\n                \"Mallocs\": 63,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 112,\n                \"Mallocs\": 306,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 128,\n                \"Mallocs\": 47,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 144,\n                \"Mallocs\": 17,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 160,\n                \"Mallocs\": 38,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 176,\n                \"Mallocs\": 7,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 192,\n                \"Mallocs\": 0,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 208,\n                \"Mallocs\": 44,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 224,\n                \"Mallocs\": 6,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 240,\n                \"Mallocs\": 1,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 256,\n                \"Mallocs\": 16,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 288,\n                \"Mallocs\": 15,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 320,\n                \"Mallocs\": 7,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 352,\n                \"Mallocs\": 21,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 384,\n                \"Mallocs\": 4,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 416,\n                \"Mallocs\": 40,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 448,\n                \"Mallocs\": 0,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 480,\n                \"Mallocs\": 0,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 512,\n                \"Mallocs\": 9,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 576,\n                \"Mallocs\": 8,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 640,\n                \"Mallocs\": 7,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 704,\n                \"Mallocs\": 4,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 768,\n                \"Mallocs\": 0,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 896,\n                \"Mallocs\": 2,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 1024,\n                \"Mallocs\": 10,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 1152,\n                \"Mallocs\": 10,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 1280,\n                \"Mallocs\": 7,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 1408,\n                \"Mallocs\": 1,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 1536,\n                \"Mallocs\": 1,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 1792,\n                \"Mallocs\": 3,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 2048,\n                \"Mallocs\": 3,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 2304,\n                \"Mallocs\": 3,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 2688,\n                \"Mallocs\": 3,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 3072,\n                \"Mallocs\": 0,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 3200,\n                \"Mallocs\": 1,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 3456,\n                \"Mallocs\": 0,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 4096,\n                \"Mallocs\": 3,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 4864,\n                \"Mallocs\": 0,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 5376,\n                \"Mallocs\": 3,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 6144,\n                \"Mallocs\": 2,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 6528,\n                \"Mallocs\": 4,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 6784,\n                \"Mallocs\": 0,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 6912,\n                \"Mallocs\": 0,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 8192,\n                \"Mallocs\": 1,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 9472,\n                \"Mallocs\": 5,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 9728,\n                \"Mallocs\": 0,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 10240,\n                \"Mallocs\": 0,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 10880,\n                \"Mallocs\": 1,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 12288,\n                \"Mallocs\": 0,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 13568,\n                \"Mallocs\": 0,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 14336,\n                \"Mallocs\": 0,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 16384,\n                \"Mallocs\": 0,\n                \"Frees\": 0\n            },\n            {\n                \"Size\": 18432,\n                \"Mallocs\": 1,\n                \"Frees\": 0\n            }\n        ]\n    },\n    \"timestamp\": 1682006328,\n    \"total_processing_metrics_time_μs\": 122,\n    \"total_processing_time_μs\": 131,\n    \"total_requests_received\": 3,\n    \"total_responses_sent\": 2,\n    \"total_responses_sent_by_status\": {\n        \"200\": 1,\n        \"301\": 1\n    },\n    \"version\": \"v1.0.0-58-g9cb8f58\"\n}"}],"_postman_id":"a1d2bf40-df21-48a9-a250-5fdd3ceee2ec"}],"id":"31a9df07-e161-498f-b846-1424fdbfa4bb","_postman_id":"31a9df07-e161-498f-b846-1424fdbfa4bb","description":""},{"name":"PermissionsByAdmin","item":[{"name":"addMovieWritePermissionForUser","id":"019ac361-b621-499a-b388-a253b202ada6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer IJY24MSKZ3PAUSA3BTBFWTYHOM","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"email\": \"foofoo@gmail.com\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:4000/v1/users/movie-permission","description":"<ol>\n<li>API endpoint to grant a user movie write permissions.</li>\n<li>Expected response code: 200 OK</li>\n</ol>\n","urlObject":{"port":"4000","path":["v1","users","movie-permission"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"2e97d83b-8513-49f8-af4d-ad05b4903337","name":"addMovieWritePermissionForUserExample","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Bearer IJY24MSKZ3PAUSA3BTBFWTYHOM","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"email\": \"foofoo@gmail.com\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:4000/v1/users/movie-permission"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Authorization"},{"key":"Date","value":"Wed, 19 Apr 2023 14:53:11 GMT"},{"key":"Content-Length","value":"40"}],"cookie":[],"responseTime":null,"body":"{\n    \"write movies\": \"foofoo@gmail.com\"\n}"}],"_postman_id":"019ac361-b621-499a-b388-a253b202ada6"}],"id":"5cfc162d-ee82-46a3-a83c-58bc4cf7a654","description":"<p>This folder consists of all API associated with admins granting users permissions.</p>\n","_postman_id":"5cfc162d-ee82-46a3-a83c-58bc4cf7a654"}]}