{"info":{"_postman_id":"a146901a-151e-4157-a89f-1060eaf9cbdb","name":"DecentralizedHealthcare","description":"<html><head></head><body><p>API documentation for the Decentralized Healthcare app</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"18666298","collectionId":"a146901a-151e-4157-a89f-1060eaf9cbdb","publishedId":"2s93sZ7aDm","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2023-06-07T12:25:32.000Z"},"item":[{"name":"Authentication","item":[{"name":"Register User","id":"4cc52016-c14b-4259-aa3c-921d524a535d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{   \r\n    \"last_name\":\"piccini\",\r\n    \"email\":\"email2@email.com\",\r\n    \"password\":\"password123\",\r\n    \"create_wallet\":true,\r\n    \"user_type\":0\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8000/user/register/","description":"<p>endpoint for registering users.</p>\n<p>Users will be registered by providing their information.</p>\n<p>some fields are optional, for example the field <em>create_wallet</em> can be included optionally, otherwise it defults to false. if <em>create_wallet</em> is specified to be true it will automatically generate a new ETH wallet and set the fields <em>ethereum_public_key</em> and <em>ethereum_private_key</em> automatically. Otherwise you can link an existing wallet by including the fields <em>ethereum_public_key</em> and <em>ethereum_private_key</em> directly.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>field</strong></th>\n<th><strong>value</strong></th>\n<th><strong>optional/required</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>email</td>\n<td>string</td>\n<td>required</td>\n</tr>\n<tr>\n<td>password</td>\n<td>string</td>\n<td>required</td>\n</tr>\n<tr>\n<td>user_type</td>\n<td>[0,1] (provider, requester)</td>\n<td>required</td>\n</tr>\n<tr>\n<td>first_name</td>\n<td>string</td>\n<td>optional</td>\n</tr>\n<tr>\n<td>last_name</td>\n<td>string</td>\n<td>optional</td>\n</tr>\n<tr>\n<td>gender</td>\n<td>[0,1] (Male, Female)</td>\n<td>optional</td>\n</tr>\n<tr>\n<td>age</td>\n<td>int</td>\n<td>optional</td>\n</tr>\n<tr>\n<td>country</td>\n<td>string</td>\n<td>optional</td>\n</tr>\n<tr>\n<td>institution</td>\n<td>string</td>\n<td>optional</td>\n</tr>\n<tr>\n<td>ethereum_public_key</td>\n<td>string</td>\n<td>optional</td>\n</tr>\n<tr>\n<td>ethereum_private_key</td>\n<td>string</td>\n<td>optional</td>\n</tr>\n<tr>\n<td>create_wallet</td>\n<td>bool</td>\n<td>optional</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"http","port":"8000","path":["user","register",""],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"179b67e3-6c94-45a8-8a4f-c85372457eb4","name":"SUCCESS","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{   \r\n    \"last_name\":\"piccini\",\r\n    \"email\":\"email8@email.com\",\r\n    \"password\":\"password123\",\r\n    \"create_wallet\":true,\r\n    \"user_type\":0\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:{{port}}/user/register/"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 06 Jan 2022 11:28:08 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.7.3"},{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Accept"},{"key":"Allow","value":"POST, OPTIONS"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"Content-Length","value":"1197"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": {\n        \"code\": 200,\n        \"message\": \"registration successfull\",\n        \"status\": \"OK\",\n        \"details\": [\n            {\n                \"reason\": \"SUCCESS\"\n            }\n        ]\n    },\n    \"data\": {\n        \"transaction receipts\": [\n            {\n                \"blockHash\": \"0x73fc1473f5168157b4dd050766cef75c401ba2d9a6f354173579f564bac52a94\",\n                \"blockNumber\": 9943731,\n                \"contractAddress\": null,\n                \"cumulativeGasUsed\": 338483,\n                \"effectiveGasPrice\": 30000000000,\n                \"from\": \"0x1a5022ed8d0a1597217928064d97b3f341cec0c4\",\n                \"gasUsed\": 21000,\n                \"logs\": [],\n                \"logsBloom\": \"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\",\n                \"status\": 1,\n                \"to\": \"0x05426d0162e36b8536effc97937b3b99faa3fbbd\",\n                \"transactionHash\": \"0x1ca7b4d7ad22d2e0145b71c13be8696403c714f18ff523b3f5064d4de0730d68\",\n                \"transactionIndex\": 2,\n                \"type\": \"0x0\",\n                \"fees\": 630000000000000,\n                \"transaction name\": \"sending ether from faucet to account\"\n            }\n        ]\n    }\n}"},{"id":"737a3912-1d67-4cf0-af1c-95bc70b6a3e0","name":"ERROR","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{   \r\n    \"last_name\":\"piccini\",\r\n    \"email\":\"email7@email.com\",\r\n    \"password\":\"password123\",\r\n    \"create_wallet\":true,\r\n    \"user_type\":0\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:{{port}}/user/register/"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 06 Jan 2022 11:27:35 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.7.3"},{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Accept"},{"key":"Allow","value":"POST, OPTIONS"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"Content-Length","value":"144"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": {\n        \"code\": 400,\n        \"message\": \"validation error\",\n        \"status\": \"ERROR\",\n        \"details\": [\n            \"email: user with this email address already exists.\"\n        ]\n    },\n    \"data\": {}\n}"},{"id":"75212d1d-b51b-4520-83f9-a6115677cd69","name":"BLOCKCHAIN ERROR","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{   \r\n    \"last_name\":\"piccini\",\r\n    \"email\":\"emai@email.com\",\r\n    \"password\":\"password123\",\r\n    \"create_wallet\":true,\r\n    \"user_type\":0\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:{{port}}/user/register/"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 06 Jan 2022 11:32:00 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.7.3"},{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Accept"},{"key":"Allow","value":"POST, OPTIONS"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"Content-Length","value":"178"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": {\n        \"code\": 400,\n        \"message\": \"blockchain error\",\n        \"status\": \"ERROR\",\n        \"details\": [\n            \"invalid sender when sending ether from faucet to account\"\n        ]\n    },\n    \"data\": {\n        \"transaction receipts\": [\n            null\n        ]\n    }\n}"}],"_postman_id":"4cc52016-c14b-4259-aa3c-921d524a535d"},{"name":"User Login","id":"af8aafae-fc27-48ef-a33c-5e232b5b2cb5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"username\": \"email2@email.com\",\r\n    \"password\": \"password123\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8000/user/login/","description":"<p>this endpoint takes in email and password and gives you back the authorization token.</p>\n<p>please keep in mind that <strong>the field</strong> <em><strong>username</strong></em> <strong>requires the email</strong> of the user as that is specified as the username field.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>field</strong></th>\n<th><strong>value</strong></th>\n<th><strong>optional/required</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>username</td>\n<td>string</td>\n<td>required</td>\n</tr>\n<tr>\n<td>password</td>\n<td>string</td>\n<td>required</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"http","port":"8000","path":["user","login",""],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"5074c39d-f983-4902-bdcf-bc0cb12b26a3","name":"SUCCESS","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"username\": \"email@email.com\",\r\n    \"password\": \"password123\"\r\n    \r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:{{port}}/user/login/"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 06 Jan 2022 11:33:13 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.7.3"},{"key":"Content-Type","value":"application/json"},{"key":"Allow","value":"POST, OPTIONS"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"Content-Length","value":"148"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": {\n        \"code\": 200,\n        \"message\": \"login successfull\",\n        \"status\": \"OK\",\n        \"details\": [\n            \"SUCCESS\"\n        ]\n    },\n    \"data\": {\n        \"token\": \"d0743ce74e5ed7cca55b57c21342c2325853c275\"\n    }\n}"},{"id":"982bd638-8598-486f-98c7-46e5743ad602","name":"ERROR","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"username\": \"email@email.com\"\r\n    \r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:{{port}}/user/login/"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 06 Jan 2022 11:32:22 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.7.3"},{"key":"Content-Type","value":"application/json"},{"key":"Allow","value":"POST, OPTIONS"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"Content-Length","value":"155"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": {\n        \"code\": 400,\n        \"message\": \"validation error\",\n        \"status\": \"ERROR\",\n        \"details\": [\n            \"password: This field is required.\"\n        ]\n    },\n    \"data\": {\n        \"transaction receipts\": [\n            null\n        ]\n    }\n}"}],"_postman_id":"af8aafae-fc27-48ef-a33c-5e232b5b2cb5"}],"id":"cafd7700-362c-432e-9643-57eaa1d34284","description":"<p>test the DecentralizedHealthcare API uses Token authentication which simply means that when user register through the register user endpoint they will be assigned a Token. The token can be retrieved using the user login endpoints. Once the user is logged in, all it takes to authorize the call to a private endpoint is to include the authentication token in the Header.</p>\n","_postman_id":"cafd7700-362c-432e-9643-57eaa1d34284"},{"name":"Private User Endpoints","item":[{"name":"Retrieve User Private Information","id":"380de7d7-3504-4eb5-b200-8713f1b57da3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:{{port}}/user/authenticated/","description":"<p>retrieve user data.</p>\n<p>This enpoint retrieves users data including private information such as ethereum address and private key.</p>\n","urlObject":{"protocol":"http","port":"{{port}}","path":["user","authenticated",""],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"b821fb72-49a4-499f-8724-144ef24183f5","name":"SUCCESS","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Token df87fbfb23c5c88666e794a93b88682b5fb51f2b","type":"text"}],"url":"http://localhost:{{port}}/user/authenticated/"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 06 Jan 2022 11:34:38 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.7.3"},{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Accept"},{"key":"Allow","value":"GET, HEAD, OPTIONS"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"Content-Length","value":"530"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": {\n        \"code\": 200,\n        \"message\": \"user private data retrieved successfully\",\n        \"status\": \"OK\",\n        \"details\": [\n            \"SUCCESS\"\n        ]\n    },\n    \"data\": {\n        \"users\": [\n            {\n                \"id\": 9,\n                \"first_name\": null,\n                \"last_name\": \"piccini\",\n                \"email\": \"email7@email.com\",\n                \"gender\": null,\n                \"age\": null,\n                \"password\": \"pbkdf2_sha256$150000$Oxogv2Zftj3n$QCDymSBoti/ZbtjhS5qkNGGT2SToJr7QEBGe6pe+jjk=\",\n                \"user_type\": 0,\n                \"ethereum_public_key\": \"0x12df409E711D3651945675c600e25cE900Fad77D\",\n                \"ethereum_private_key\": \"0xcd09e587d87c8ddfe5f4bf171467ab17b392d0dc9b416735be179d8ed8b39b26\",\n                \"country\": null,\n                \"institution\": null\n            }\n        ]\n    }\n}"},{"id":"1ebdee45-d1eb-4666-9ca4-58e3e06a5217","name":"ERROR","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Token df87fbfb23c5c88666e794a93b88682b5fb51f2B","type":"text"}],"url":"http://localhost:{{port}}/user/authenticated/"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 06 Jan 2022 11:35:26 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.7.3"},{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Accept"},{"key":"Allow","value":"GET, HEAD, OPTIONS"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"Content-Length","value":"136"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": {\n        \"code\": 401,\n        \"message\": \"validation error\",\n        \"status\": \"ERROR\",\n        \"details\": [\n            \"Invalid token.\"\n        ]\n    },\n    \"data\": {\n        \"transaction receipts\": [\n            null\n        ]\n    }\n}"}],"_postman_id":"380de7d7-3504-4eb5-b200-8713f1b57da3"},{"name":"User Update Information","id":"882cc5d0-032a-47e3-aa39-5a7befad441c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Authorization","value":"Token 4f7691f2c2f5bab013c31d850c8e25e72f1664cb","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"create_wallet\":true\r\n\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:{{port}}/user/authenticated/update/","description":"<p>enpoint for updating user information.</p>\n<p>all fields are optional.</p>\n<p>You can include any of the fields present in the user register endpoint including the \"create_wallet\" field.</p>\n","urlObject":{"protocol":"http","port":"{{port}}","path":["user","authenticated","update",""],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"ef5562a9-82c9-43ce-bf9b-139925180480","name":"SUCCESS WITHOUR BLOCKCHAIN","originalRequest":{"method":"PUT","header":[{"key":"Authorization","value":"Token df87fbfb23c5c88666e794a93b88682b5fb51f2b","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"first_name\":\"new_name\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:{{port}}/user/authenticated/update/"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 06 Jan 2022 11:37:45 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.7.3"},{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Accept"},{"key":"Allow","value":"PUT, OPTIONS"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"Content-Length","value":"133"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": {\n        \"code\": 200,\n        \"message\": \"update user successfull\",\n        \"status\": \"OK\",\n        \"details\": [\n            \"SUCCESS\"\n        ]\n    },\n    \"data\": {\n        \"transaction receipts\": [\n            null\n        ]\n    }\n}"},{"id":"b2fe24f5-23e9-487f-b02e-ba46815ab9ad","name":"SUCCESS WITH BLOCKCHAIN","originalRequest":{"method":"PUT","header":[{"key":"Authorization","value":"Token df87fbfb23c5c88666e794a93b88682b5fb51f2b","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"create_wallet\":true\r\n\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:{{port}}/user/authenticated/update/"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 06 Jan 2022 11:36:53 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.7.3"},{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Accept"},{"key":"Allow","value":"PUT, OPTIONS"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"Content-Length","value":"1185"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": {\n        \"code\": 200,\n        \"message\": \"update user successfull\",\n        \"status\": \"OK\",\n        \"details\": [\n            \"SUCCESS\"\n        ]\n    },\n    \"data\": {\n        \"transaction receipts\": [\n            {\n                \"blockHash\": \"0x3008f70664ed5b48ebb353699a0ac5b5d1677dec41a96d1051fcdd076393b006\",\n                \"blockNumber\": 9943766,\n                \"contractAddress\": null,\n                \"cumulativeGasUsed\": 767340,\n                \"effectiveGasPrice\": 30000000000,\n                \"from\": \"0x1a5022ed8d0a1597217928064d97b3f341cec0c4\",\n                \"gasUsed\": 21000,\n                \"logs\": [],\n                \"logsBloom\": \"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\",\n                \"status\": 1,\n                \"to\": \"0x5f7f0ac38047b98e658089de54b096dc5a708125\",\n                \"transactionHash\": \"0x7c10e74c9061f6370fdb1d7ed40dcb8f9fe2b5e941950854e99296d122fff1fa\",\n                \"transactionIndex\": 4,\n                \"type\": \"0x0\",\n                \"fees\": 630000000000000,\n                \"transaction name\": \"sending ether from faucet to account\"\n            }\n        ]\n    }\n}"},{"id":"102c7a9a-13ac-4275-8bfd-cbed323a3c11","name":"BLOCKCHAIN ERROR","originalRequest":{"method":"PUT","header":[{"key":"Authorization","value":"Token df87fbfb23c5c88666e794a93b88682b5fb51f2b","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"create_wallet\":true\r\n\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:{{port}}/user/authenticated/update/"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 06 Jan 2022 11:35:47 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.7.3"},{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Accept"},{"key":"Allow","value":"PUT, OPTIONS"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"Content-Length","value":"178"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": {\n        \"code\": 400,\n        \"message\": \"blockchain error\",\n        \"status\": \"ERROR\",\n        \"details\": [\n            \"invalid sender when sending ether from faucet to account\"\n        ]\n    },\n    \"data\": {\n        \"transaction receipts\": [\n            null\n        ]\n    }\n}"}],"_postman_id":"882cc5d0-032a-47e3-aa39-5a7befad441c"}],"id":"20f14621-716e-449e-9238-513ed722d247","description":"<p>the following section contains endpoints that <strong>require authentication of the user through Token authentication</strong>.</p>\n<p>All of the request in this section can be called by both data requester and data providers. See the Authentication section for more specific details on how to authenticate the user.</p>\n","_postman_id":"20f14621-716e-449e-9238-513ed722d247"},{"name":"Data Provider Endpoints","item":[{"name":"Upload Data","id":"ebb61abb-00cf-4f92-a7cc-694576dc9fdb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Token 53db486da80745c0639fc7b4e97bad31b0fadddc","type":"text"}],"body":{"mode":"raw","raw":"{   \r\n    \"estimate\":false,\r\n    \"description\":\"ds\",\r\n    \"link\":\"http://link.com\",\r\n    \"no_restrictions\":false,\r\n    \"open_to_general_research_and_clinical_care\":false,\r\n    \"open_to_HMB_research\":false,\r\n    \"open_to_population_and_ancestry_research\":false,\r\n    \"open_to_disease_specific\":false\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8000/contract/dataUpload/","description":"<p><em><strong>-- NOT FINISHED --</strong></em></p>\n<p>use this endpoint for uploading a new dataset.</p>\n<p>you can include variable \"estimate\" true if you just want to retrieve a gas fee estimate of the blockchain transaction</p>\n","urlObject":{"protocol":"http","port":"8000","path":["contract","dataUpload",""],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"2be24044-b8f5-403f-9dff-b75684565219","name":"ERROR","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Token df87fbfb23c5c88666e794a93b88682b5fb51f2b","type":"text"}],"body":{"mode":"raw","raw":"{   \r\n    \"estimate\":false,\r\n    \"description\":\"ds\",\r\n    \"link\":\"http://link2.com\",\r\n    \"open_to_general_research_and_clinical_care\":false,\r\n    \"open_to_HMB_research\":false,\r\n    \"open_to_population_and_ancestry_research\":false,\r\n    \"open_to_disease_specific\":false\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:{{port}}/contract/dataUpload/"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 06 Jan 2022 11:49:16 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.7.3"},{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Accept"},{"key":"Allow","value":"GET, POST, HEAD, OPTIONS"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"Content-Length","value":"133"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": {\n        \"code\": 400,\n        \"message\": \"validation error\",\n        \"status\": \"ERROR\",\n        \"details\": [\n            \"no_restrictions: This field is required.\"\n        ]\n    },\n    \"data\": {}\n}"},{"id":"0ac8353c-88fd-4a33-af1f-1e108108ca31","name":"BLOCKCHAIN ERROR","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Token df87fbfb23c5c88666e794a93b88682b5fb51f2b","type":"text"}],"body":{"mode":"raw","raw":"{   \r\n    \"estimate\":false,\r\n    \"description\":\"ds\",\r\n    \"link\":\"http://link2.com\",\r\n    \"no_restrictions\":false,\r\n    \"open_to_general_research_and_clinical_care\":false,\r\n    \"open_to_HMB_research\":false,\r\n    \"open_to_population_and_ancestry_research\":false,\r\n    \"open_to_disease_specific\":false\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:{{port}}/contract/dataUpload/"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 06 Jan 2022 11:49:52 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.7.3"},{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Accept"},{"key":"Allow","value":"GET, POST, HEAD, OPTIONS"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"Content-Length","value":"167"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": {\n        \"code\": 400,\n        \"message\": \"blockchain error\",\n        \"status\": \"ERROR\",\n        \"details\": [\n            \"invalid sender when deployment of ConsentCode\"\n        ]\n    },\n    \"data\": {\n        \"transaction receipts\": [\n            null\n        ]\n    }\n}"},{"id":"fb0f0641-4d79-498e-b226-2353e00641d3","name":"SUCCESS","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Token df87fbfb23c5c88666e794a93b88682b5fb51f2b","type":"text"}],"body":{"mode":"raw","raw":"{   \r\n    \"estimate\":false,\r\n    \"description\":\"ds\",\r\n    \"link\":\"http://link2.com\",\r\n    \"no_restrictions\":false,\r\n    \"open_to_general_research_and_clinical_care\":false,\r\n    \"open_to_HMB_research\":false,\r\n    \"open_to_population_and_ancestry_research\":false,\r\n    \"open_to_disease_specific\":false\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:{{port}}/contract/dataUpload/"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 06 Jan 2022 12:14:28 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.7.3"},{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Accept"},{"key":"Allow","value":"GET, POST, HEAD, OPTIONS"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"Content-Length","value":"4784"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": {\n        \"code\": 200,\n        \"message\": \"data published successfully\",\n        \"status\": \"OK\",\n        \"details\": [\n            \"SUCCESS\"\n        ]\n    },\n    \"data\": {\n        \"contracts\": [\n            {\n                \"user\": 9,\n                \"description\": \"ds\",\n                \"licence\": 1,\n                \"contract_address\": \"0xCc6559aF2e10e8358e2b796B3c0e5CC73375146f\",\n                \"consent_contract\": {\n                    \"contract_address\": \"0x90c4265702730e1328463c3Ed8084e0aA5f9E196\",\n                    \"user_id\": 9,\n                    \"restrictions\": {\n                        \"id\": 32,\n                        \"no_restrictions\": false,\n                        \"open_to_general_research_and_clinical_care\": false,\n                        \"open_to_HMB_research\": false,\n                        \"open_to_population_and_ancestry_research\": false,\n                        \"open_to_disease_specific\": false\n                    }\n                }\n            }\n        ],\n        \"transaction receipts\": [\n            {\n                \"blockHash\": \"0xf0ab096278ff7b8885228153fc292a23612ccf2e44cc7917cdb5f806763b59f3\",\n                \"blockNumber\": 9943913,\n                \"contractAddress\": \"0x90c4265702730e1328463c3Ed8084e0aA5f9E196\",\n                \"cumulativeGasUsed\": 371002,\n                \"effectiveGasPrice\": 20000000000,\n                \"from\": \"0x5f7f0ac38047b98e658089de54b096dc5a708125\",\n                \"gasUsed\": 53000,\n                \"logs\": [],\n                \"logsBloom\": \"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\",\n                \"status\": 1,\n                \"to\": null,\n                \"transactionHash\": \"0xe6a3ae5e3da898cafc741c907872d4a7a18c7ad25e7d937db6639de93188e28c\",\n                \"transactionIndex\": 3,\n                \"type\": \"0x0\",\n                \"fees\": 1060000000000000,\n                \"transaction name\": \"deployment of ConsentCode\"\n            },\n            {\n                \"blockHash\": \"0xbbff2e948ca596b5f3481ed934593a4b84e435600ce600aede473dd42760b645\",\n                \"blockNumber\": 9943914,\n                \"contractAddress\": \"0xCc6559aF2e10e8358e2b796B3c0e5CC73375146f\",\n                \"cumulativeGasUsed\": 346119,\n                \"effectiveGasPrice\": 20000000000,\n                \"from\": \"0x5f7f0ac38047b98e658089de54b096dc5a708125\",\n                \"gasUsed\": 53000,\n                \"logs\": [],\n                \"logsBloom\": \"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\",\n                \"status\": 1,\n                \"to\": null,\n                \"transactionHash\": \"0xb5b9400dee585ba04094d6f640f5e2bb8c18538f279a81b2a0751c7682c1e02e\",\n                \"transactionIndex\": 2,\n                \"type\": \"0x0\",\n                \"fees\": 1060000000000000,\n                \"transaction name\": \"deployment of LuceMain\"\n            },\n            {\n                \"blockHash\": \"0x8c9bb47b39b59299192ef8b787b0663dbc396c4dc96f642ca5738e784b51c133\",\n                \"blockNumber\": 9943915,\n                \"contractAddress\": null,\n                \"cumulativeGasUsed\": 167941,\n                \"effectiveGasPrice\": 20000000000,\n                \"from\": \"0x5f7f0ac38047b98e658089de54b096dc5a708125\",\n                \"gasUsed\": 21432,\n                \"logs\": [],\n                \"logsBloom\": \"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\",\n                \"status\": 1,\n                \"to\": \"0xcc6559af2e10e8358e2b796b3c0e5cc73375146f\",\n                \"transactionHash\": \"0xa84cf7e09c34696608cb71d29d3ac35269e7fa385f6599b896bb4a8adc2e89da\",\n                \"transactionIndex\": 1,\n                \"type\": \"0x0\",\n                \"fees\": 428640000000000,\n                \"transaction name\": \"setting registry address in Dataset contract\"\n            },\n            {\n                \"blockHash\": \"0xa5f35b5304e559209545cf12ec9cca5cb29c3e0987bbcf494db1ff2f8ade5a36\",\n                \"blockNumber\": 9943916,\n                \"contractAddress\": null,\n                \"cumulativeGasUsed\": 22236,\n                \"effectiveGasPrice\": 20000000000,\n                \"from\": \"0x5f7f0ac38047b98e658089de54b096dc5a708125\",\n                \"gasUsed\": 22236,\n                \"logs\": [],\n                \"logsBloom\": \"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\",\n                \"status\": 1,\n                \"to\": \"0xcc6559af2e10e8358e2b796b3c0e5cc73375146f\",\n                \"transactionHash\": \"0xf09ed4d87b31205d5c419d12281d83be75a0b9f9994ac77f1cdfb1a46e947c74\",\n                \"transactionIndex\": 0,\n                \"type\": \"0x0\",\n                \"fees\": 444720000000000,\n                \"transaction name\": \"calling publishData function in Dataset Contract\"\n            }\n        ]\n    }\n}"}],"_postman_id":"ebb61abb-00cf-4f92-a7cc-694576dc9fdb"}],"id":"72d7f73e-38e3-4c13-acb8-6364fb58f4e8","description":"<p>the following section is for data provider endpoints</p>\n","_postman_id":"72d7f73e-38e3-4c13-acb8-6364fb58f4e8"},{"name":"Data Requester Endpoints","item":[{"name":"Request Access","id":"3eef7a99-16bd-4765-bafb-f919d72c1dc7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Token 53db486da80745c0639fc7b4e97bad31b0fadddc","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"estimate\":false,\r\n    \"dataset_addresses\":[\"0xDB093f7d979B248b76B05CD51c762EA470B94702\"],\r\n    \"general_research_purpose\": {\r\n        \"use_for_methods_development\":true  ,\r\n        \"use_for_reference_or_control_material\":true,\r\n        \"use_for_populations_research\":true,\r\n        \"use_for_ancestry_research\":true,\r\n        \"use_for_HMB_research\":true\r\n    },\r\n    \"HMB_research_purpose\": {\r\n        \"use_for_research_concerning_fundamental_biology\": false,\r\n        \"use_for_research_concerning_genetics\": false,\r\n        \"use_for_research_concerning_drug_development\": false,\r\n        \"use_for_research_concerning_any_disease\": false,\r\n        \"use_for_research_concerning_age_categories\": false,\r\n        \"use_for_research_concerning_gender_categories\": false\r\n    },\r\n    \"clinical_purpose\":{\r\n        \"use_for_decision_support\": false, \r\n        \"use_for_disease_support\":false\r\n    }\r\n\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8000/contract/requestAccess/","urlObject":{"protocol":"http","port":"8000","path":["contract","requestAccess",""],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"3eef7a99-16bd-4765-bafb-f919d72c1dc7"},{"name":"get Link","id":"48bb2954-bb2e-4158-9cff-a784adcbf0fb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Token 53db486da80745c0639fc7b4e97bad31b0fadddc","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"estimate\": false,\n    \"dataset_address\":\"0xDB093f7d979B248b76B05CD51c762EA470B94702\"\n    ,\n    \"proof\": \"0x19dab90061cb5b5d96ad20d988d7b48e7eb54d6c54fd1d0e74d6f2dc3c1a2ea71dd2c7369ee0b683b87d506b9e895581266c2743a34bd67b107bdbfd41b9e81f2eee60e63759f7a302c83fa7b3e6488aae8f10ace7f483fcb368aa2c8b8b3bd1043f891572392fec7324b08fe5b4300bbe8201db7f6bc7a14ed7e2ffcf5aac7614127cd60b5fea30051f82b413de7ebe98d5938b0ab2e3f68e9992ead29ff279155dd32d5015b9069d3eb3208a720b79127590a9611815e24354022a21de8ff809b87afc93c29004cec0ed4f3ef30c5ef23f643a53be7cc0134818bec2e578d11a664805d9af39ac22f10ca3694f30442181aae8cba46d871d8412c91ed3cb3801cb90ff7dfd7e37db1ed00e5dbc94c5cf1616356c5540e90cbc152a8bc287b60201bf23a7e551cc02c4a17ab2e552495740e6341d3a88cd2a86930f445025b801cb90ff7dfd7e37db1ed00e5dbc94c5cf1616356c5540e90cbc152a8bc287b622147f5f75394157ce93256c815439e04335a3d60e5a8f85ca095db55efba19b1a1cc8f00ca19843063f69aa9982774f085bc566931fc38be16062765761b6961c95628ec7c9b4a6b816143f571b36050fa5c337adfc191b6d9082ea6b3095161ab72ba0ca3b4a7eeab41ced2546f6a60640570fd8da71052909fd9335433d280d4e779f8b1626a5089b5f43fc74a913b9a6bed6a463f4f3447e264bbb159961079b4bb44520da25c761eae2b08608a7cc702f021f01490a5885eb7cfeb59e1c0272e32d91e66f724b61e35a9a7b0a74eeb9dfe1c4c49013b82e7d76294edef103a6ec6e51432d8b3869f598813f847c5bda34b873c66c00fd1006c6398b00bc07583e6b5d80f611f147775461917462358c7bee93a9d5f9cb39ae868b3be69400e807b5b46ce60c728beb4eddf38480357ec29ab65e2dcca94fc2e802de2f170f87c56a3a330d2e486fcb5ac28afc17f90053c3673ab635b936fab7017b61d7006736feda20887b604bceb72ee0b3d7e5e4fb119664633f05d72cd2294014e70da8b355597c48ffa748c5c311012aafc3418fbc2e8cfcef6a78363cd214c87921725e6b03c5c1c47337387bd264d874becb62e33370ea8ca0ee057bfd0c0e0e\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8000/contract/getLink/","urlObject":{"protocol":"http","port":"8000","path":["contract","getLink",""],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"48bb2954-bb2e-4158-9cff-a784adcbf0fb"}],"id":"9da033dc-bc9f-49cf-a8fb-e9037f3036da","description":"<p>the following section contains endpoints that require authentication of the user through Token authentication.</p>\n<p>only data requesters can call the following endpoints</p>\n","_postman_id":"9da033dc-bc9f-49cf-a8fb-e9037f3036da"},{"name":"Public User Endpoints","item":[{"name":"Retrieve User Public Information","id":"411e5235-3a03-40a4-9a16-b296d7a5a6b2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:{{port}}/user/3/","description":"<p>public endpoint for retrieving user information that it's not sensitive (anyone should be able to call this endpoint)</p>\n","urlObject":{"protocol":"http","port":"{{port}}","path":["user","3",""],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"3f4b5df4-aa3e-4ced-985b-4fc39249332d","name":"SUCCESS","originalRequest":{"method":"GET","header":[],"url":"http://localhost:{{port}}/user/3/"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 06 Jan 2022 11:51:33 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.7.3"},{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Accept"},{"key":"Allow","value":"GET, HEAD, OPTIONS"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"Content-Length","value":"305"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": {\n        \"code\": 200,\n        \"message\": \"user public data retrieved successfully\",\n        \"status\": \"OK\",\n        \"details\": [\n            \"SUCCESS\"\n        ]\n    },\n    \"data\": {\n        \"users\": [\n            {\n                \"id\": 3,\n                \"first_name\": null,\n                \"last_name\": \"piccini\",\n                \"email\": \"email1@email.com\",\n                \"gender\": null,\n                \"age\": null,\n                \"user_type\": 0,\n                \"ethereum_public_key\": null,\n                \"country\": null,\n                \"institution\": null\n            }\n        ]\n    }\n}"}],"_postman_id":"411e5235-3a03-40a4-9a16-b296d7a5a6b2"},{"name":"Retrieve All Users","id":"2622c59a-03cc-4685-b78a-4f002d0e39e1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:{{port}}/user/all/","description":"<p>this endpoint is for retrieving all of the users at once. it is not clear if this is going to be used in the live app but it is useful for debugging</p>\n","urlObject":{"protocol":"http","port":"{{port}}","path":["user","all",""],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"6b258f2d-c110-40f5-8ac2-e85f5f5eb284","name":"SUCCESS","originalRequest":{"method":"GET","header":[],"url":"http://localhost:{{port}}/user/all/"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 06 Jan 2022 11:52:04 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.7.3"},{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Accept"},{"key":"Allow","value":"GET, HEAD, OPTIONS"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"Content-Length","value":"2011"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": {\n        \"code\": 200,\n        \"message\": \"all user data retrieved successfully\",\n        \"status\": \"OK\",\n        \"details\": [\n            \"SUCCESS\"\n        ]\n    },\n    \"data\": {\n        \"users\": [\n            [\n                {\n                    \"id\": 1,\n                    \"first_name\": null,\n                    \"last_name\": \"piccini\",\n                    \"email\": \"new@email.com\",\n                    \"gender\": null,\n                    \"age\": null,\n                    \"user_type\": 0,\n                    \"ethereum_public_key\": \"0x42291C316Ba7a3dc853ee09854509FA8cCdAa260\",\n                    \"country\": null,\n                    \"institution\": null\n                },\n                {\n                    \"id\": 2,\n                    \"first_name\": null,\n                    \"last_name\": \"piccini\",\n                    \"email\": \"email@email.com\",\n                    \"gender\": null,\n                    \"age\": null,\n                    \"user_type\": 0,\n                    \"ethereum_public_key\": null,\n                    \"country\": null,\n                    \"institution\": null\n                },\n                {\n                    \"id\": 3,\n                    \"first_name\": null,\n                    \"last_name\": \"piccini\",\n                    \"email\": \"email1@email.com\",\n                    \"gender\": null,\n                    \"age\": null,\n                    \"user_type\": 0,\n                    \"ethereum_public_key\": null,\n                    \"country\": null,\n                    \"institution\": null\n                },\n                {\n                    \"id\": 4,\n                    \"first_name\": null,\n                    \"last_name\": \"piccini\",\n                    \"email\": \"email2@email.com\",\n                    \"gender\": null,\n                    \"age\": null,\n                    \"user_type\": 0,\n                    \"ethereum_public_key\": null,\n                    \"country\": null,\n                    \"institution\": null\n                },\n                {\n                    \"id\": 5,\n                    \"first_name\": null,\n                    \"last_name\": \"piccini\",\n                    \"email\": \"email3@email.com\",\n                    \"gender\": null,\n                    \"age\": null,\n                    \"user_type\": 0,\n                    \"ethereum_public_key\": null,\n                    \"country\": null,\n                    \"institution\": null\n                },\n                {\n                    \"id\": 6,\n                    \"first_name\": null,\n                    \"last_name\": \"piccini\",\n                    \"email\": \"email4@email.com\",\n                    \"gender\": null,\n                    \"age\": null,\n                    \"user_type\": 0,\n                    \"ethereum_public_key\": null,\n                    \"country\": null,\n                    \"institution\": null\n                },\n                {\n                    \"id\": 7,\n                    \"first_name\": null,\n                    \"last_name\": \"piccini\",\n                    \"email\": \"email5@email.com\",\n                    \"gender\": null,\n                    \"age\": null,\n                    \"user_type\": 0,\n                    \"ethereum_public_key\": null,\n                    \"country\": null,\n                    \"institution\": null\n                },\n                {\n                    \"id\": 8,\n                    \"first_name\": null,\n                    \"last_name\": \"piccini\",\n                    \"email\": \"email6@email.com\",\n                    \"gender\": null,\n                    \"age\": null,\n                    \"user_type\": 0,\n                    \"ethereum_public_key\": null,\n                    \"country\": null,\n                    \"institution\": null\n                },\n                {\n                    \"id\": 9,\n                    \"first_name\": \"new_name\",\n                    \"last_name\": \"piccini\",\n                    \"email\": \"email7@email.com\",\n                    \"gender\": null,\n                    \"age\": null,\n                    \"user_type\": 0,\n                    \"ethereum_public_key\": \"0x5f7F0aC38047B98e658089De54b096Dc5A708125\",\n                    \"country\": null,\n                    \"institution\": null\n                },\n                {\n                    \"id\": 10,\n                    \"first_name\": null,\n                    \"last_name\": \"piccini\",\n                    \"email\": \"email8@email.com\",\n                    \"gender\": null,\n                    \"age\": null,\n                    \"user_type\": 0,\n                    \"ethereum_public_key\": \"0x05426d0162e36B8536eFfc97937B3b99fAA3fbBD\",\n                    \"country\": null,\n                    \"institution\": null\n                }\n            ]\n        ]\n    }\n}"}],"_postman_id":"2622c59a-03cc-4685-b78a-4f002d0e39e1"},{"name":"Retrieve Contract","id":"93143adf-480a-4402-98c8-53e9900d7a4c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:{{port}}/contract/1/","description":"<p><em><strong>-- NOT FINISHED --</strong></em></p>\n<p>this endpoint is used to get all of the contracts of a user with all of the information inside it.</p>\n","urlObject":{"protocol":"http","port":"{{port}}","path":["contract","1",""],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"f2de76be-f1c5-4ad7-9271-5ede8f6b8d76","name":"SUCCESS","originalRequest":{"method":"GET","header":[],"url":"http://localhost:{{port}}/contract/9/"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 06 Jan 2022 11:58:31 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.7.3"},{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Accept"},{"key":"Allow","value":"GET, HEAD, OPTIONS"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"Content-Length","value":"7557"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": {\n        \"code\": 200,\n        \"message\": \"contracts retrieved successfully\",\n        \"status\": \"OK\",\n        \"details\": [\n            \"SUCCESS\"\n        ]\n    },\n    \"data\": {\n        \"contracts\": [\n            {\n                \"user\": 9,\n                \"description\": \"ds\",\n                \"licence\": 1,\n                \"contract_address\": null,\n                \"consent_contract\": {\n                    \"contract_address\": null,\n                    \"user_id\": 9,\n                    \"restrictions\": {\n                        \"id\": 3,\n                        \"no_restrictions\": false,\n                        \"open_to_general_research_and_clinical_care\": false,\n                        \"open_to_HMB_research\": false,\n                        \"open_to_population_and_ancestry_research\": false,\n                        \"open_to_disease_specific\": false\n                    }\n                }\n            },\n            {\n                \"user\": 9,\n                \"description\": \"ds\",\n                \"licence\": 1,\n                \"contract_address\": null,\n                \"consent_contract\": {\n                    \"contract_address\": null,\n                    \"user_id\": 9,\n                    \"restrictions\": {\n                        \"id\": 4,\n                        \"no_restrictions\": false,\n                        \"open_to_general_research_and_clinical_care\": false,\n                        \"open_to_HMB_research\": false,\n                        \"open_to_population_and_ancestry_research\": false,\n                        \"open_to_disease_specific\": false\n                    }\n                }\n            },\n            {\n                \"user\": 9,\n                \"description\": \"ds\",\n                \"licence\": 1,\n                \"contract_address\": null,\n                \"consent_contract\": {\n                    \"contract_address\": null,\n                    \"user_id\": 9,\n                    \"restrictions\": {\n                        \"id\": 5,\n                        \"no_restrictions\": false,\n                        \"open_to_general_research_and_clinical_care\": false,\n                        \"open_to_HMB_research\": false,\n                        \"open_to_population_and_ancestry_research\": false,\n                        \"open_to_disease_specific\": false\n                    }\n                }\n            },\n            {\n                \"user\": 9,\n                \"description\": \"ds\",\n                \"licence\": 1,\n                \"contract_address\": null,\n                \"consent_contract\": {\n                    \"contract_address\": null,\n                    \"user_id\": 9,\n                    \"restrictions\": {\n                        \"id\": 6,\n                        \"no_restrictions\": false,\n                        \"open_to_general_research_and_clinical_care\": false,\n                        \"open_to_HMB_research\": false,\n                        \"open_to_population_and_ancestry_research\": false,\n                        \"open_to_disease_specific\": false\n                    }\n                }\n            },\n            {\n                \"user\": 9,\n                \"description\": \"ds\",\n                \"licence\": 1,\n                \"contract_address\": null,\n                \"consent_contract\": {\n                    \"contract_address\": null,\n                    \"user_id\": 9,\n                    \"restrictions\": {\n                        \"id\": 7,\n                        \"no_restrictions\": false,\n                        \"open_to_general_research_and_clinical_care\": false,\n                        \"open_to_HMB_research\": false,\n                        \"open_to_population_and_ancestry_research\": false,\n                        \"open_to_disease_specific\": false\n                    }\n                }\n            },\n            {\n                \"user\": 9,\n                \"description\": \"ds\",\n                \"licence\": 1,\n                \"contract_address\": null,\n                \"consent_contract\": {\n                    \"contract_address\": null,\n                    \"user_id\": 9,\n                    \"restrictions\": {\n                        \"id\": 8,\n                        \"no_restrictions\": false,\n                        \"open_to_general_research_and_clinical_care\": false,\n                        \"open_to_HMB_research\": false,\n                        \"open_to_population_and_ancestry_research\": false,\n                        \"open_to_disease_specific\": false\n                    }\n                }\n            },\n            {\n                \"user\": 9,\n                \"description\": \"ds\",\n                \"licence\": 1,\n                \"contract_address\": null,\n                \"consent_contract\": {\n                    \"contract_address\": null,\n                    \"user_id\": 9,\n                    \"restrictions\": {\n                        \"id\": 9,\n                        \"no_restrictions\": false,\n                        \"open_to_general_research_and_clinical_care\": false,\n                        \"open_to_HMB_research\": false,\n                        \"open_to_population_and_ancestry_research\": false,\n                        \"open_to_disease_specific\": false\n                    }\n                }\n            },\n            {\n                \"user\": 9,\n                \"description\": \"ds\",\n                \"licence\": 1,\n                \"contract_address\": null,\n                \"consent_contract\": {\n                    \"contract_address\": null,\n                    \"user_id\": 9,\n                    \"restrictions\": {\n                        \"id\": 10,\n                        \"no_restrictions\": false,\n                        \"open_to_general_research_and_clinical_care\": false,\n                        \"open_to_HMB_research\": false,\n                        \"open_to_population_and_ancestry_research\": false,\n                        \"open_to_disease_specific\": false\n                    }\n                }\n            },\n            {\n                \"user\": 9,\n                \"description\": \"ds\",\n                \"licence\": 1,\n                \"contract_address\": null,\n                \"consent_contract\": {\n                    \"contract_address\": null,\n                    \"user_id\": 9,\n                    \"restrictions\": {\n                        \"id\": 12,\n                        \"no_restrictions\": false,\n                        \"open_to_general_research_and_clinical_care\": false,\n                        \"open_to_HMB_research\": false,\n                        \"open_to_population_and_ancestry_research\": false,\n                        \"open_to_disease_specific\": false\n                    }\n                }\n            },\n            {\n                \"user\": 9,\n                \"description\": \"ds\",\n                \"licence\": 1,\n                \"contract_address\": null,\n                \"consent_contract\": {\n                    \"contract_address\": null,\n                    \"user_id\": 9,\n                    \"restrictions\": {\n                        \"id\": 13,\n                        \"no_restrictions\": false,\n                        \"open_to_general_research_and_clinical_care\": false,\n                        \"open_to_HMB_research\": false,\n                        \"open_to_population_and_ancestry_research\": false,\n                        \"open_to_disease_specific\": false\n                    }\n                }\n            },\n            {\n                \"user\": 9,\n                \"description\": \"ds\",\n                \"licence\": 1,\n                \"contract_address\": null,\n                \"consent_contract\": {\n                    \"contract_address\": null,\n                    \"user_id\": 9,\n                    \"restrictions\": {\n                        \"id\": 15,\n                        \"no_restrictions\": false,\n                        \"open_to_general_research_and_clinical_care\": false,\n                        \"open_to_HMB_research\": false,\n                        \"open_to_population_and_ancestry_research\": false,\n                        \"open_to_disease_specific\": false\n                    }\n                }\n            },\n            {\n                \"user\": 9,\n                \"description\": \"ds\",\n                \"licence\": 1,\n                \"contract_address\": null,\n                \"consent_contract\": {\n                    \"contract_address\": null,\n                    \"user_id\": 9,\n                    \"restrictions\": {\n                        \"id\": 18,\n                        \"no_restrictions\": false,\n                        \"open_to_general_research_and_clinical_care\": false,\n                        \"open_to_HMB_research\": false,\n                        \"open_to_population_and_ancestry_research\": false,\n                        \"open_to_disease_specific\": false\n                    }\n                }\n            },\n            {\n                \"user\": 9,\n                \"description\": \"ds\",\n                \"licence\": 1,\n                \"contract_address\": null,\n                \"consent_contract\": {\n                    \"contract_address\": null,\n                    \"user_id\": 9,\n                    \"restrictions\": {\n                        \"id\": 19,\n                        \"no_restrictions\": false,\n                        \"open_to_general_research_and_clinical_care\": false,\n                        \"open_to_HMB_research\": false,\n                        \"open_to_population_and_ancestry_research\": false,\n                        \"open_to_disease_specific\": false\n                    }\n                }\n            },\n            {\n                \"user\": 9,\n                \"description\": \"ds\",\n                \"licence\": 1,\n                \"contract_address\": null,\n                \"consent_contract\": {\n                    \"contract_address\": null,\n                    \"user_id\": 9,\n                    \"restrictions\": {\n                        \"id\": 20,\n                        \"no_restrictions\": false,\n                        \"open_to_general_research_and_clinical_care\": false,\n                        \"open_to_HMB_research\": false,\n                        \"open_to_population_and_ancestry_research\": false,\n                        \"open_to_disease_specific\": false\n                    }\n                }\n            },\n            {\n                \"user\": 9,\n                \"description\": \"ds\",\n                \"licence\": 1,\n                \"contract_address\": null,\n                \"consent_contract\": {\n                    \"contract_address\": null,\n                    \"user_id\": 9,\n                    \"restrictions\": {\n                        \"id\": 22,\n                        \"no_restrictions\": false,\n                        \"open_to_general_research_and_clinical_care\": false,\n                        \"open_to_HMB_research\": false,\n                        \"open_to_population_and_ancestry_research\": false,\n                        \"open_to_disease_specific\": false\n                    }\n                }\n            },\n            {\n                \"user\": 9,\n                \"description\": \"ds\",\n                \"licence\": 1,\n                \"contract_address\": null,\n                \"consent_contract\": {\n                    \"contract_address\": null,\n                    \"user_id\": 9,\n                    \"restrictions\": {\n                        \"id\": 23,\n                        \"no_restrictions\": false,\n                        \"open_to_general_research_and_clinical_care\": false,\n                        \"open_to_HMB_research\": false,\n                        \"open_to_population_and_ancestry_research\": false,\n                        \"open_to_disease_specific\": false\n                    }\n                }\n            },\n            {\n                \"user\": 9,\n                \"description\": \"ds\",\n                \"licence\": 1,\n                \"contract_address\": null,\n                \"consent_contract\": {\n                    \"contract_address\": null,\n                    \"user_id\": 9,\n                    \"restrictions\": {\n                        \"id\": 24,\n                        \"no_restrictions\": false,\n                        \"open_to_general_research_and_clinical_care\": false,\n                        \"open_to_HMB_research\": false,\n                        \"open_to_population_and_ancestry_research\": false,\n                        \"open_to_disease_specific\": false\n                    }\n                }\n            },\n            {\n                \"user\": 9,\n                \"description\": \"ds\",\n                \"licence\": 1,\n                \"contract_address\": null,\n                \"consent_contract\": {\n                    \"contract_address\": null,\n                    \"user_id\": 9,\n                    \"restrictions\": {\n                        \"id\": 25,\n                        \"no_restrictions\": false,\n                        \"open_to_general_research_and_clinical_care\": false,\n                        \"open_to_HMB_research\": false,\n                        \"open_to_population_and_ancestry_research\": false,\n                        \"open_to_disease_specific\": false\n                    }\n                }\n            },\n            {\n                \"user\": 9,\n                \"description\": \"ds\",\n                \"licence\": 1,\n                \"contract_address\": null,\n                \"consent_contract\": {\n                    \"contract_address\": null,\n                    \"user_id\": 9,\n                    \"restrictions\": {\n                        \"id\": 26,\n                        \"no_restrictions\": false,\n                        \"open_to_general_research_and_clinical_care\": false,\n                        \"open_to_HMB_research\": false,\n                        \"open_to_population_and_ancestry_research\": false,\n                        \"open_to_disease_specific\": false\n                    }\n                }\n            },\n            {\n                \"user\": 9,\n                \"description\": \"ds\",\n                \"licence\": 1,\n                \"contract_address\": null,\n                \"consent_contract\": {\n                    \"contract_address\": null,\n                    \"user_id\": 9,\n                    \"restrictions\": {\n                        \"id\": 27,\n                        \"no_restrictions\": false,\n                        \"open_to_general_research_and_clinical_care\": false,\n                        \"open_to_HMB_research\": false,\n                        \"open_to_population_and_ancestry_research\": false,\n                        \"open_to_disease_specific\": false\n                    }\n                }\n            },\n            {\n                \"user\": 9,\n                \"description\": \"ds\",\n                \"licence\": 1,\n                \"contract_address\": null,\n                \"consent_contract\": {\n                    \"contract_address\": null,\n                    \"user_id\": 9,\n                    \"restrictions\": {\n                        \"id\": 29,\n                        \"no_restrictions\": false,\n                        \"open_to_general_research_and_clinical_care\": false,\n                        \"open_to_HMB_research\": false,\n                        \"open_to_population_and_ancestry_research\": false,\n                        \"open_to_disease_specific\": false\n                    }\n                }\n            },\n            {\n                \"user\": 9,\n                \"description\": \"ds\",\n                \"licence\": 1,\n                \"contract_address\": null,\n                \"consent_contract\": {\n                    \"contract_address\": null,\n                    \"user_id\": 9,\n                    \"restrictions\": {\n                        \"id\": 30,\n                        \"no_restrictions\": false,\n                        \"open_to_general_research_and_clinical_care\": false,\n                        \"open_to_HMB_research\": false,\n                        \"open_to_population_and_ancestry_research\": false,\n                        \"open_to_disease_specific\": false\n                    }\n                }\n            },\n            {\n                \"user\": 9,\n                \"description\": null,\n                \"licence\": 1,\n                \"contract_address\": null,\n                \"consent_contract\": null\n            }\n        ]\n    }\n}"},{"id":"cfd6f4ff-7658-44b1-8322-354387a9b583","name":"ERROR","originalRequest":{"method":"GET","header":[],"url":"http://localhost:{{port}}/contract/900/"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 06 Jan 2022 11:59:04 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.7.3"},{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Accept"},{"key":"Allow","value":"GET, HEAD, OPTIONS"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"Content-Length","value":"110"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": {\n        \"code\": 400,\n        \"message\": \"validation error\",\n        \"status\": \"ERROR\",\n        \"details\": \"user does not exist\"\n    },\n    \"data\": {}\n}"}],"_postman_id":"93143adf-480a-4402-98c8-53e9900d7a4c"}],"id":"317a3e6e-443d-42da-829e-5b173cf37a79","description":"<p>this section has endpoints that do not require authentication of the user</p>\n","_postman_id":"317a3e6e-443d-42da-829e-5b173cf37a79"},{"name":"admin","item":[{"name":"Deploying Luce Registry","id":"685fc336-90d8-4238-b6c0-e39851a44036","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Token 53db486da80745c0639fc7b4e97bad31b0fadddc","type":"text"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://localhost:8000/admin/deployRegistry/","description":"<p><em><strong>-- NOT FINISHED --</strong></em></p>\n<p>this endpoint is for deploying the luceRegistry from a admin account</p>\n","urlObject":{"protocol":"http","port":"8000","path":["admin","deployRegistry",""],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"29b8cc22-d845-4bc2-a2bd-92331be76a97","name":"SUCCESS","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Token 697446c3245a14a3192ab08a3576023df9a23a6a","type":"text"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://localhost:{{port}}/admin/deployRegistry/"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 06 Jan 2022 12:12:56 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.7.3"},{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Accept"},{"key":"Allow","value":"GET, POST, HEAD, OPTIONS"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"Content-Length","value":"1283"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": {\n        \"code\": 200,\n        \"message\": \"luceRegistry was deployed successfully\",\n        \"status\": \"OK\",\n        \"details\": [\n            \"SUCCESS\"\n        ]\n    },\n    \"data\": {\n        \"contracts\": [\n            {\n                \"user_id\": 1,\n                \"contract_address\": \"0xc0E61c2Aa531f452240ac974A23bd0Bb0a28a3EB\"\n            }\n        ],\n        \"transaction receipts\": [\n            {\n                \"blockHash\": \"0x2c6f3872be7af773f8fe661b1e7f595e7cc1154147c9a3a257c78a1a7266d47c\",\n                \"blockNumber\": 9943910,\n                \"contractAddress\": \"0xc0E61c2Aa531f452240ac974A23bd0Bb0a28a3EB\",\n                \"cumulativeGasUsed\": 234112,\n                \"effectiveGasPrice\": 20000000000,\n                \"from\": \"0x42291c316ba7a3dc853ee09854509fa8ccdaa260\",\n                \"gasUsed\": 53000,\n                \"logs\": [],\n                \"logsBloom\": \"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\",\n                \"status\": 1,\n                \"to\": null,\n                \"transactionHash\": \"0x0c2800ab1c9c893c963bafc6d6cf740c105023d7754694806d24a9ed78961346\",\n                \"transactionIndex\": 2,\n                \"type\": \"0x0\",\n                \"fees\": 1060000000000000,\n                \"transaction name\": \"deployment of LUCERegistry\"\n            }\n        ]\n    }\n}"},{"id":"167efba6-bd0b-4995-b2c1-93fe4ce9277e","name":"BLOCKCHAIN ERROR","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Token 697446c3245a14a3192ab08a3576023df9a23a6a","type":"text"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://localhost:{{port}}/admin/deployRegistry/"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 06 Jan 2022 12:09:23 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.7.3"},{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Accept"},{"key":"Allow","value":"GET, POST, HEAD, OPTIONS"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"Content-Length","value":"168"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": {\n        \"code\": 400,\n        \"message\": \"blockchain error\",\n        \"status\": \"ERROR\",\n        \"details\": [\n            \"invalid sender when deployment of LUCERegistry\"\n        ]\n    },\n    \"data\": {\n        \"transaction receipts\": [\n            null\n        ]\n    }\n}"},{"id":"97498f13-3479-43af-ac49-6e223abe69b9","name":"ERROR","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Token 50272e37b40babf3f5ae7ba5b19c0777940528a1","type":"text"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://localhost:{{port}}/admin/deployRegistry/"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 06 Jan 2022 12:15:56 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.7.3"},{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Accept"},{"key":"Allow","value":"GET, POST, HEAD, OPTIONS"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"Content-Length","value":"123"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": {\n        \"code\": 400,\n        \"message\": \"validation error\",\n        \"status\": \"ERROR\",\n        \"details\": \"user must connect a wallet first\"\n    },\n    \"data\": {}\n}"}],"_postman_id":"685fc336-90d8-4238-b6c0-e39851a44036"}],"id":"8784d23e-a112-4daa-8525-60878ffed35a","description":"<p>the following section is for endpoints that require admin access</p>\n","_postman_id":"8784d23e-a112-4daa-8525-60878ffed35a"}]}