{"info":{"_postman_id":"30ce779c-524c-4c9e-bf0d-4b7748b78d85","name":"OperaFR","description":"<html><head></head><body><p>OperaFR official documentation.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"10123907","collectionId":"30ce779c-524c-4c9e-bf0d-4b7748b78d85","publishedId":"2s9Y5WyjGL","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2023-08-25T14:02:41.000Z"},"item":[{"name":"files","item":[{"name":"Get file","id":"9d745f2c-05eb-48b1-89b5-4d65cb38e3a2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"authorization","value":"{{operafr_token}}","type":"text"}],"url":"{{operafr_url}}/files?folder_id=4","description":"<p>This request shows the files that correspond to the current filter.</p>\n<h3 id=\"query\">[Query]</h3>\n<p><strong>folder_id:</strong> id of the folder thar you are searching the files</p>\n<p><strong>file_name:</strong> name of the file that you are searching for. You need to pass the folder_id when using this</p>\n<p><strong>file_id:</strong> id of the file, for direct search</p>\n<p><strong>render:</strong> render the file if are the only founded in filter.</p>\n","urlObject":{"path":["files"],"host":["{{operafr_url}}"],"query":[{"disabled":true,"key":"file_name","value":"example.png"},{"disabled":true,"key":"render","value":"true"},{"disabled":true,"key":"file_id","value":"1"},{"key":"folder_id","value":"4"}],"variable":[]}},"response":[{"id":"3c6e3fc7-72fd-49b0-84e6-a6f07bdd0ac7","name":"Get file","originalRequest":{"method":"GET","header":[{"key":"authorization","value":"{{operafr_token}}","type":"text"}],"url":{"raw":"{{operafr_url}}/files","host":["{{operafr_url}}"],"path":["files"],"query":[{"key":"folder_id","value":"2","disabled":true},{"key":"file_name","value":"example.png","disabled":true},{"key":"file_id","value":"10","disabled":true},{"key":"render","value":"false","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Vary","value":"Origin"},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"203"},{"key":"ETag","value":"W/\"cb-2ixHKCi3/vbfaczUNAfoHORWR4c\""},{"key":"Date","value":"Sat, 26 Aug 2023 17:38:27 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": 200,\n    \"message\": \"Files found\",\n    \"content\": [\n        {\n            \"id\": 1,\n            \"name\": \"LogicLayer.jpg\",\n            \"path\": \"1693071500199.jpg\",\n            \"public_url\": \"35a29cd0ba0e7a9b8af2483ca93d12f088af59b551e84cdc3ac5e6de3c94ce7e\",\n            \"folderId\": 2\n        }\n    ]\n}"}],"_postman_id":"9d745f2c-05eb-48b1-89b5-4d65cb38e3a2"},{"name":"Generate public URL","id":"2074e93d-5656-4dcf-b0fe-8e36c6ea3516","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"authorization","value":"{{operafr_token}}","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"file_id\": 4\r\n}","options":{"raw":{"language":"json"}}},"url":"{{operafr_url}}/files/public_url","description":"<p>Create a hash for access the file with a public link. With the hash, you can access de file in:</p>\n<p>{{openfr_url}}/files/:hash_file</p>\n<h3 id=\"body\">[Body]</h3>\n<p><strong>file_id:</strong> id of the file</p>\n","urlObject":{"path":["files","public_url"],"host":["{{operafr_url}}"],"query":[],"variable":[]}},"response":[{"id":"4ea7ad49-6023-49db-bf4e-460527f7d05d","name":"Generate public URL","originalRequest":{"method":"POST","header":[{"key":"authorization","value":"{{operafr_token}}","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"file_id\": 1\r\n}","options":{"raw":{"language":"json"}}},"url":"{{operafr_url}}/files/public_url"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Vary","value":"Origin"},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"208"},{"key":"ETag","value":"W/\"d0-vTgAFy/faHQrwZpN3qvPSC7M0co\""},{"key":"Date","value":"Sat, 26 Aug 2023 17:38:55 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": 200,\n    \"message\": \"Public url created\",\n    \"content\": {\n        \"id\": 1,\n        \"name\": \"LogicLayer.jpg\",\n        \"path\": \"1693071500199.jpg\",\n        \"public_url\": \"93097e6fdeb72713088c79e5cc06dda4652697301da27c7a991fcc81f419e038\",\n        \"folderId\": 2\n    }\n}"}],"_postman_id":"2074e93d-5656-4dcf-b0fe-8e36c6ea3516"},{"name":"Delete public URL Copy","id":"13d9641b-3aea-4734-8efa-ea01a90f94ef","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"authorization","value":"{{operafr_token}}","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"file_id\": 2\r\n}","options":{"raw":{"language":"json"}}},"url":"{{operafr_url}}/files/public_url","description":"<p>Delete a public hash</p>\n<h3 id=\"body\">[Body]</h3>\n<p><strong>file_id:</strong> id of the file</p>\n","urlObject":{"path":["files","public_url"],"host":["{{operafr_url}}"],"query":[],"variable":[]}},"response":[{"id":"35ffe9c8-95a8-4714-9a32-8ec7c373dbcf","name":"Delete public URL Copy","originalRequest":{"method":"DELETE","header":[{"key":"authorization","value":"{{operafr_token}}","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"file_id\": 1\r\n}","options":{"raw":{"language":"json"}}},"url":"{{operafr_url}}/files/public_url"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Vary","value":"Origin"},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"144"},{"key":"ETag","value":"W/\"90-uGqRg0gnz6ILfN0UxQYdc3q+TlU\""},{"key":"Date","value":"Sat, 26 Aug 2023 17:39:43 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": 200,\n    \"message\": \"Public url deleted\",\n    \"content\": {\n        \"id\": 1,\n        \"name\": \"LogicLayer.jpg\",\n        \"path\": \"1693071500199.jpg\",\n        \"public_url\": \"\",\n        \"folderId\": 2\n    }\n}"}],"_postman_id":"13d9641b-3aea-4734-8efa-ea01a90f94ef"},{"name":"Render file","id":"ec1af149-368a-472f-832c-e6d40e270b2a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"authorization","value":"{{operafr_token}}","type":"text"}],"url":"{{operafr_url}}/files/b7873a2d27dfa470c4f2bd17b414b67576182e62f97d5b19163b63bb834bbc85?hash=true","description":"<p>This url is used to render a file uploaded. You can use as source of html elements or access directly in the browser. You will receive the :hash_file when using the route \"Generate public URL\" or inserting in \"Post file\" with body field \"public_url = 1\"</p>\n<p><strong>hash:</strong> return a sha256 hash of returned files.</p>\n","urlObject":{"path":["files","b7873a2d27dfa470c4f2bd17b414b67576182e62f97d5b19163b63bb834bbc85"],"host":["{{operafr_url}}"],"query":[{"key":"hash","value":"true"}],"variable":[]}},"response":[],"_postman_id":"ec1af149-368a-472f-832c-e6d40e270b2a"},{"name":"Delete file","id":"b03c10fe-82f6-4960-9aea-baa49899b7dd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"authorization","value":"{{operafr_token}}","type":"text"}],"url":"{{operafr_url}}/files?folder_id=4","description":"<p>Delete a uploaded file.</p>\n<h3 id=\"query\">[Query]</h3>\n<p><strong>folder_id:</strong> id of the folder that you are deleting the file. Necessary when using file_name</p>\n<p><strong>file_id:</strong> id of the file</p>\n<p><strong>file_name:</strong> name of the file. Necessary when using folder_id</p>\n","urlObject":{"path":["files"],"host":["{{operafr_url}}"],"query":[{"disabled":true,"key":"file_name","value":"1"},{"key":"folder_id","value":"4"},{"disabled":true,"key":"file_id","value":"59"}],"variable":[]}},"response":[{"id":"311a609b-7370-473b-9f74-000871aeb523","name":"Delete file","originalRequest":{"method":"DELETE","header":[{"key":"authorization","value":"{{operafr_token}}","type":"text"}],"url":{"raw":"{{operafr_url}}/files","host":["{{operafr_url}}"],"path":["files"],"query":[{"key":"file_id","value":"1","disabled":true},{"key":"file_name","value":"1","type":"text","disabled":true},{"key":"folder_id","value":"1","type":"text","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Vary","value":"Origin"},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"138"},{"key":"ETag","value":"W/\"8a-D9qq79IBQ/WfvhLbmXwLbZnugIs\""},{"key":"Date","value":"Sat, 26 Aug 2023 17:39:51 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": 200,\n    \"message\": \"File deleted\",\n    \"content\": {\n        \"id\": 1,\n        \"name\": \"LogicLayer.jpg\",\n        \"path\": \"1693071500199.jpg\",\n        \"public_url\": \"\",\n        \"folderId\": 2\n    }\n}"}],"_postman_id":"b03c10fe-82f6-4960-9aea-baa49899b7dd"},{"name":"Post file","id":"cb43a8e6-1a6b-4b3a-a1d4-c4d81c953e00","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"x-file-extension","value":"jpeg","type":"text"},{"key":"x-folder-id","value":"1","type":"text"},{"key":"Authorization","value":"{{operafr_token}}","type":"text"},{"key":"Content-Type","value":"application/octet-stream","type":"text"}],"body":{"mode":"file","file":{"src":"/home/giongo/Downloads/trab_visao/imagens_cortadas/wc.jpeg"}},"url":"{{operafr_url}}/files","description":"<p>Insert a new file in the repository.</p>\n<h3 id=\"body\">[Body]</h3>\n<p><strong>file:</strong> File coming from file input</p>\n<p><strong>folder_id:</strong> id of the folder that you are inserting a new file</p>\n<p><strong>public_url:</strong> (just 1 or 0). 1 for generate a public hash for access or 0 for not. The default state is 1.</p>\n<p><em>If you are using octet-stream for server side upload, you need to use the follow fields in the headers:</em></p>\n<h3 id=\"headers\">[Headers]</h3>\n<p><strong>x-file-extension:</strong> extension of the file</p>\n<p><strong>x-folder-id:</strong> id of the folder that you are inserting a new file</p>\n<p><strong>content-type:</strong> application/octet-stream</p>\n","urlObject":{"path":["files"],"host":["{{operafr_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"cb43a8e6-1a6b-4b3a-a1d4-c4d81c953e00"}],"id":"0cfa1b3a-2339-4d88-aed3-24a3eb69a9cd","description":"<p>Request for file resource manipulation</p>\n","_postman_id":"0cfa1b3a-2339-4d88-aed3-24a3eb69a9cd"},{"name":"users","item":[{"name":"Create user","id":"6f700909-356c-4357-b279-d4cfe42d29a1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"{{operafr_token}}","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"username\": \"sap_read\",        \r\n    \"email\": \"noemail@mhnet.com.br\" \r\n}","options":{"raw":{"language":"json"}}},"url":"{{operafr_url}}/users","description":"<p>Create a new user. This feature only will work if you are authenticated with a superuser credentials.</p>\n<h3 id=\"body\">[Body]</h3>\n<p><strong>username:</strong> username of the new user. Can't be an existing one</p>\n<p><strong>email:</strong> email of the new user. Can't be an existing one</p>\n","urlObject":{"path":["users"],"host":["{{operafr_url}}"],"query":[],"variable":[]}},"response":[{"id":"0edae538-a60e-4e5d-a02d-d0e8087788f0","name":"Create user","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"{{operafr_token}}","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"username\": \"exampleuser2\",        \r\n    \"email\": \"example_user2@domain.com\" \r\n}","options":{"raw":{"language":"json"}}},"url":"{{operafr_url}}/users"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Vary","value":"Origin"},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"134"},{"key":"ETag","value":"W/\"86-N6xC/4t4QOKEx3bqOseGfVIUNVo\""},{"key":"Date","value":"Sat, 26 Aug 2023 17:20:35 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": 201,\n    \"message\": \"User created\",\n    \"content\": {\n        \"username\": \"exampleuser2\",\n        \"email\": \"example_user2@domain.com\",\n        \"password\": \"v3z94n5c\"\n    }\n}"}],"_postman_id":"6f700909-356c-4357-b279-d4cfe42d29a1"},{"name":"Edit user","event":[{"listen":"test","script":{"id":"1ce2b4ff-e1d1-4c17-9479-e5164922f9f4","exec":[""],"type":"text/javascript"}}],"id":"23ce930a-53e2-46f3-8d4d-b12d9530b410","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Authorization","value":"{{operafr_token}}","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"username\": \"voalle\",  //Username of user to change\r\n    \"superuser\": 1        //1 = True, 0 = false\r\n}","options":{"raw":{"language":"json"}}},"url":"{{operafr_url}}/users","description":"<p>Edit an existing user. This feature only will work if you are authenticated with a superuser credentials.</p>\n<h3 id=\"body\">[Body]</h3>\n<p><strong>username:</strong> username for the user. Can't be an existing one</p>\n<p><strong>superuser:</strong> integer (0 or 1) for set a user as superuser (1 = true, 0 = false)</p>\n<p><strong>password:</strong> New password</p>\n","urlObject":{"path":["users"],"host":["{{operafr_url}}"],"query":[],"variable":[]}},"response":[{"id":"a5b99216-7fbf-4777-9938-19069b8eb842","name":"Edit user","originalRequest":{"method":"PUT","header":[{"key":"Authorization","value":"{{operafr_token}}","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"username\": \"exampleuser2\",  //Username of user to change\r\n    \"superuser\": 1        //1 = True, 0 = false\r\n}","options":{"raw":{"language":"json"}}},"url":"{{operafr_url}}/users"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Vary","value":"Origin"},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"156"},{"key":"ETag","value":"W/\"9c-/CulcQx7eEzcgZNziJhG9B3cl94\""},{"key":"Date","value":"Sat, 26 Aug 2023 17:20:46 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": 200,\n    \"message\": \"User updated successfully\",\n    \"content\": {\n        \"username\": \"exampleuser2\",\n        \"email\": \"example_user2@domain.com\",\n        \"superuser\": true,\n        \"active\": true\n    }\n}"}],"_postman_id":"23ce930a-53e2-46f3-8d4d-b12d9530b410"},{"name":"Generate token","id":"9bb86118-a447-4299-b055-84eb539474eb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"{{operafr_token}}","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"days_expiration\":\"never\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{operafr_url}}/generate_token","description":"<p>Resource to generate a token for your user. You can use this token as \"Authorization\" for upload files. The token will be generated for your user based on the current authentication.</p>\n<h3 id=\"body\">[Body]</h3>\n<p><strong>days_expiration:</strong> days until end of validation of token. you can use \"never\" for never expiration</p>\n","urlObject":{"path":["generate_token"],"host":["{{operafr_url}}"],"query":[],"variable":[]}},"response":[{"id":"ab667b78-1766-438a-ba41-d0784d822b22","name":"Generate token","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"{{operafr_token}}","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"days_expiration\":\"never\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{operafr_url}}/generate_token"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Vary","value":"Origin"},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"331"},{"key":"ETag","value":"W/\"14b-1r1EXpWGZR+z7KCWHbDLCWBDp2k\""},{"key":"Date","value":"Sat, 26 Aug 2023 17:20:26 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": 200,\n    \"message\": \"Token generated successfully\",\n    \"content\": {\n        \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MiwidXNlcm5hbWUiOiJleGFtcGxldXNlciIsImV4cGlyYXRpb25fZGF0ZSI6IjIxMDAtMDgtMjZUMTc6MjA6MjYuMDc2WiIsImlhdCI6MTY5MzA3MDQyNn0.rXX_fWZwU1fCQMOpVisTjVQ5UtDW252s7hgRl381ChA\",\n        \"expiration_date\": \"2100-08-26T17:20:26.076Z\"\n    }\n}"}],"_postman_id":"9bb86118-a447-4299-b055-84eb539474eb"},{"name":"List users","id":"098cfdb6-5eb3-4311-bcdd-d9ef3944484a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"{{operafr_token}}","type":"text"}],"url":"{{operafr_url}}/users","description":"<p>List all the users of the repository. This feature only will work if you are authenticated with a superuser credentials.</p>\n","urlObject":{"path":["users"],"host":["{{operafr_url}}"],"query":[],"variable":[]}},"response":[{"id":"d2d88e61-61d4-4eb3-ad0a-324f833259c8","name":"List users","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"{{operafr_token}}","type":"text"}],"url":"{{operafr_url}}/users"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Vary","value":"Origin"},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"158"},{"key":"ETag","value":"W/\"9e-rDJtBaD1i9A4quqF+5bqFoRqal4\""},{"key":"Date","value":"Sat, 26 Aug 2023 17:19:42 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": 200,\n    \"message\": \"Users listed\",\n    \"content\": [\n        {\n            \"username\": \"exampleuser\",\n            \"email\": \"example_user@domain.com\",\n            \"api_token\": \"\",\n            \"superuser\": true,\n            \"active\": true\n        }\n    ]\n}"}],"_postman_id":"098cfdb6-5eb3-4311-bcdd-d9ef3944484a"}],"id":"793e3041-b27a-46d3-8861-2d7add7e69b7","description":"<p>Manipulation of users in the system</p>\n","_postman_id":"793e3041-b27a-46d3-8861-2d7add7e69b7"},{"name":"folders","item":[{"name":"List folders","id":"5efd0532-4e6a-46c9-9532-ea4cf261c26a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"authorization","value":"{{operafr_token}}","type":"text"}],"url":"{{operafr_url}}/folders","description":"<p>List all the folders based on current filters</p>\n<p>Leave all field in blank to see all the folders. This feature only will work if you are authenticated with a superuser credentials</p>\n<h3 id=\"query\">[Query]</h3>\n<p><strong>folder_id:</strong> id of the specific folder</p>\n<p><strong>folder_name:</strong> name of the specific folder</p>\n<p><strong>parent_id:</strong> \"father\" of the folder. pass \"root\" if you wanna see the root folder</p>\n","urlObject":{"path":["folders"],"host":["{{operafr_url}}"],"query":[{"disabled":true,"key":"folder_id","value":"1"},{"disabled":true,"key":"folder_name","value":"root"}],"variable":[]}},"response":[{"id":"c8365c9a-84bf-42e5-8250-56c3a7a48559","name":"List folders","originalRequest":{"method":"GET","header":[{"key":"authorization","value":"{{operafr_token}}","type":"text"}],"url":{"raw":"{{operafr_url}}/folders","host":["{{operafr_url}}"],"path":["folders"],"query":[{"key":"folder_id","value":"2","disabled":true},{"key":"folder_name","value":"example","type":"text","disabled":true},{"key":"parent_id","value":"1","type":"text","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Vary","value":"Origin"},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"105"},{"key":"ETag","value":"W/\"69-0m4Rdxw/A8MyWPyQnHnHnv+HPZU\""},{"key":"Date","value":"Sat, 26 Aug 2023 17:17:58 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": 200,\n    \"message\": \"Folder(s) found\",\n    \"content\": [\n        {\n            \"id\": 2,\n            \"name\": \"system_one\",\n            \"parentFolderId\": null\n        }\n    ]\n}"}],"_postman_id":"5efd0532-4e6a-46c9-9532-ea4cf261c26a"},{"name":"Insert folder","id":"5822e42d-5f33-4829-860c-b0542d867c1b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"authorization","value":"{{operafr_token}}","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"name\":\"Validação de TCC\",\r\n    \"parent_id\": null\r\n}","options":{"raw":{"language":"json"}}},"url":"{{operafr_url}}/folders","description":"<p>Insert a new folder in the repository</p>\n<h3 id=\"body\">[Body]</h3>\n<p><strong>name:</strong> name of the new folder</p>\n<p><strong>parent_id:</strong> id of the \"father\" folder</p>\n","urlObject":{"path":["folders"],"host":["{{operafr_url}}"],"query":[],"variable":[]}},"response":[{"id":"f362f9b8-a518-4b31-84be-833a0dc55dac","name":"Insert folder","originalRequest":{"method":"POST","header":[{"key":"authorization","value":"{{operafr_token}}","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"name\":\"system_one\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{operafr_url}}/folders"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Vary","value":"Origin"},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"102"},{"key":"ETag","value":"W/\"66-U4WkJ9U2VhIv4lX09FCJlkK6XWU\""},{"key":"Date","value":"Sat, 26 Aug 2023 17:16:48 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": 201,\n    \"message\": \"Folder created\",\n    \"content\": {\n        \"id\": 1,\n        \"name\": \"system_one\",\n        \"parentFolderId\": null\n    }\n}"}],"_postman_id":"5822e42d-5f33-4829-860c-b0542d867c1b"},{"name":"Rename folder","id":"f64dd69c-75aa-4672-b5de-714fc47901df","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"authorization","value":"{{operafr_token}}","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"folder_id\": 2,\r\n    \"name\":\"mgmt\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{operafr_url}}/folders/rename","description":"<p>You can use this route if you need to rename a specific folder</p>\n<h3 id=\"body\">[Body]</h3>\n<p><strong>folder_id:</strong> id of the specific folder</p>\n<p><strong>name:</strong> new name for the folder</p>\n","urlObject":{"path":["folders","rename"],"host":["{{operafr_url}}"],"query":[],"variable":[]}},"response":[{"id":"c2f4a72b-41df-43ac-9b9a-960a6bb97329","name":"Rename folder","originalRequest":{"method":"POST","header":[{"key":"authorization","value":"{{operafr_token}}","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"folder_id\": 1,\r\n    \"name\":\"system_renamed\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{operafr_url}}/folders/rename"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Vary","value":"Origin"},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"119"},{"key":"ETag","value":"W/\"77-pHpIXg67/ArQ/fpK74ZFYv07JLA\""},{"key":"Date","value":"Sat, 26 Aug 2023 17:17:15 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": 200,\n    \"message\": \"Folder renamed successfully\",\n    \"content\": {\n        \"id\": 1,\n        \"name\": \"system_renamed\",\n        \"parentFolderId\": null\n    }\n}"}],"_postman_id":"f64dd69c-75aa-4672-b5de-714fc47901df"},{"name":"Delete folder","id":"c33b8fa6-35de-4b45-a6c3-0ca49999fbaa","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"authorization","value":"{{operafr_token}}","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"folder_id\": 1\r\n}","options":{"raw":{"language":"json"}}},"url":"{{operafr_url}}/folders","description":"<p>Route to delete a specific folder. <strong>WARNING:</strong> Deleting the folder, you will delete all files inside, with no rollback, so be carefully.</p>\n<h3 id=\"body\">[Body]</h3>\n<p><strong>folder_id:</strong> id of the folder</p>\n","urlObject":{"path":["folders"],"host":["{{operafr_url}}"],"query":[],"variable":[]}},"response":[{"id":"176aabdb-3bbb-44b4-81c6-15197e9d189b","name":"Delete folder","originalRequest":{"method":"DELETE","header":[{"key":"authorization","value":"{{operafr_token}}","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"folder_id\": 1\r\n}","options":{"raw":{"language":"json"}}},"url":"{{operafr_url}}/folders"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Vary","value":"Origin"},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"119"},{"key":"ETag","value":"W/\"77-MhFX6/LizvKKNDP7o1zHkykhHpY\""},{"key":"Date","value":"Sat, 26 Aug 2023 17:17:27 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": 200,\n    \"message\": \"Folder deleted successfully\",\n    \"content\": {\n        \"id\": 1,\n        \"name\": \"system_renamed\",\n        \"parentFolderId\": null\n    }\n}"}],"_postman_id":"c33b8fa6-35de-4b45-a6c3-0ca49999fbaa"}],"id":"dbcb5c37-80a4-4925-9333-b497e523d4b6","description":"<p>Resources for folders manipulation</p>\n","_postman_id":"dbcb5c37-80a4-4925-9333-b497e523d4b6"},{"name":"folder_permission","item":[{"name":"Give permission to user","id":"38ca8ecf-6bb8-422f-858a-6af9e22eb595","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"{{operafr_token}}","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"username\": \"sap_read\",\r\n    \"folder_id\": 1,\r\n    \"permission\":\"read\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{operafr_url}}/folders_permission","description":"<p>Create a permission for a user for a folder</p>\n<h3 id=\"body\">[Body]</h3>\n<p><strong>username:</strong> username of the user that will receive the permission</p>\n<p><strong>folder_id:</strong> id of the folder to be set the permission</p>\n<p><strong>permission:</strong> the permission for the user (can be: \"read\", \"write\" or \"admin\")</p>\n","urlObject":{"path":["folders_permission"],"host":["{{operafr_url}}"],"query":[],"variable":[]}},"response":[{"id":"710aab05-2cc0-4fbb-9ce7-afece5a3a2cb","name":"Give permission to user","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"{{operafr_token}}","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"username\": \"exampleuser2\",\r\n    \"folder_id\": 2,\r\n    \"permission\":\"admin\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{operafr_url}}/folders_permission"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Vary","value":"Origin"},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"70"},{"key":"ETag","value":"W/\"46-nDoajzlcfm6drd79sOxZ10MuGNo\""},{"key":"Date","value":"Sat, 26 Aug 2023 17:21:20 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": 200,\n    \"message\": \"successfully authorized user\",\n    \"content\": null\n}"}],"_postman_id":"38ca8ecf-6bb8-422f-858a-6af9e22eb595"},{"name":"Remove permission of user","id":"c3318d5f-4584-466e-8f1b-f41e91edddfc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"Authorization","value":"{{operafr_token}}","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"username\": \"exampleuser2\",\r\n    \"folder_id\": 2\r\n}","options":{"raw":{"language":"json"}}},"url":"{{operafr_url}}/folders_permission","description":"<p>Remove a existing permission of a folder of a specific user. This feature only will work if you are authenticated with a superuser credentials.  </p>\n<h3 id=\"body\">[Body]</h3>\n<p><strong>user_id:</strong> id of the user that you want to remove the permission</p>\n<p><strong>folder_id:</strong> id of the folder that you want to remove the permission</p>\n","urlObject":{"path":["folders_permission"],"host":["{{operafr_url}}"],"query":[],"variable":[]}},"response":[{"id":"2db81e7f-6d47-4dc4-9fdf-b29416552540","name":"Remove permission of user","originalRequest":{"method":"DELETE","header":[{"key":"Authorization","value":"{{operafr_token}}","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"username\": \"exampleuser2\",\r\n    \"folder_id\": 2\r\n}","options":{"raw":{"language":"json"}}},"url":"{{operafr_url}}/folders_permission"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Vary","value":"Origin"},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"83"},{"key":"ETag","value":"W/\"53-IAJ5kE/uPIM0HH8YFXvjwQd3x1Q\""},{"key":"Date","value":"Sat, 26 Aug 2023 17:22:13 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": 200,\n    \"message\": \"successfully removed permission from user\",\n    \"content\": null\n}"}],"_postman_id":"c3318d5f-4584-466e-8f1b-f41e91edddfc"}],"id":"193f6f20-9d94-488f-9862-cd637ff2c60e","description":"<p>Manipulate the permissions of users for specific folders. The routes below just work with superuser credentials</p>\n","_postman_id":"193f6f20-9d94-488f-9862-cd637ff2c60e"},{"name":"Version check","id":"821065f8-615f-47c3-9a2c-d466d2ca7de5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{operafr_url}}","description":"<p>Default route to check if the service is up. You can access directly in browser</p>\n","urlObject":{"host":["{{operafr_url}}"],"query":[],"variable":[]}},"response":[{"id":"c36ae664-eb70-48b4-8871-8462250ff0e5","name":"Version check","originalRequest":{"method":"GET","header":[],"url":"{{operafr_url}}"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Vary","value":"Origin"},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"77"},{"key":"ETag","value":"W/\"4d-iandGVs1/gj27xOeM/aoVVPNu5U\""},{"key":"Date","value":"Sat, 26 Aug 2023 17:09:34 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": 200,\n    \"message\": \"Welcome to Opera API. Version 0.1.0\",\n    \"content\": null\n}"}],"_postman_id":"821065f8-615f-47c3-9a2c-d466d2ca7de5"},{"name":"Login","id":"4fe4aba9-536c-4568-82b7-ca73a4dba627","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"username\":\"carlosgiongo\",\r\n    \"password\":\"12345678\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{operafr_url}}/login","description":"<p>Route for authenticate your user</p>\n<h3 id=\"body\">[Body]</h3>\n<p><strong>username:</strong> your username</p>\n<p><strong>password:</strong> your current password</p>\n","urlObject":{"path":["login"],"host":["{{operafr_url}}"],"query":[],"variable":[]}},"response":[{"id":"a5890312-05f6-46cc-b8e2-f8a67d79168b","name":"Login","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"username\":\"exampleuser\",\r\n    \"password\":\"hfx08vu8\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{operafr_url}}/login"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Vary","value":"Origin"},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"234"},{"key":"ETag","value":"W/\"ea-LYNua1r+euf6vN0/bxX04Q/fSGI\""},{"key":"Date","value":"Sat, 26 Aug 2023 17:19:51 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": 200,\n    \"message\": \"Login success\",\n    \"content\": {\n        \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MiwidXNlcm5hbWUiOiJleGFtcGxldXNlciIsImlhdCI6MTY5MzA3MDM5MSwiZXhwIjoxNjkzMDk5MTkxfQ._6qwBxHKFX_g5W8dizIJU_pZwWUJVcKjeuEjRJRLIHM\"\n    }\n}"}],"_postman_id":"4fe4aba9-536c-4568-82b7-ca73a4dba627"}]}