{"info":{"_postman_id":"dda3a1b6-224f-4bbd-97ce-535a590d770b","name":"Quanta-Chain","description":"<html><head></head><body><p>Quanta Chain is a restfull API that allows the interaction with the Quanta system.\nQuanta is a platform where oracles ( defined users ) can save informations and notarize them on a sidechain.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"2069291","collectionId":"dda3a1b6-224f-4bbd-97ce-535a590d770b","publishedId":"UV5TGKay","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2024-12-05T13:35:13.000Z"},"item":[{"name":"Check Struct","event":[{"listen":"test","script":{"id":"64f44887-0ef5-4641-bc36-5e061405859a","exec":["pm.test(\"Version test\", function () {","    pm.response.to.not.have.jsonBody(\"error_code\");","});"],"type":"text/javascript"}}],"id":"2146fc78-b3a2-4483-b392-bd1c76d64c11","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"{{struct_name}}\",\n    \"token\": \"0000\"\n}\n","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/struct","description":"<p>Method to get a struct description by it's unique name.\nThis will return the list of atoms that compose the struct.</p>\n<p>Parameters required are:</p>\n<ul>\n<li><strong>token</strong> that identifies the oracle</li>\n<li><strong>name</strong> of the struct</li>\n</ul>\n","urlObject":{"protocol":"http","port":"8080","path":["api","struct"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"2146fc78-b3a2-4483-b392-bd1c76d64c11"},{"name":"Create Struct","event":[{"listen":"test","script":{"id":"61a3d1fa-4e09-470f-accf-d04bb02eb0b9","exec":["pm.test(\"Version test\", function () {","    pm.response.to.not.have.jsonBody(\"error_code\");","});"],"type":"text/javascript"}}],"id":"863a8bda-b5ef-4534-8ca7-e53b582ce680","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"{{struct_name}}\",\n    \"token\": \"0000\",\n    \"dna\": [\n        \"title\",\n        \"date\",\n        \"ingr1\",\n        \"ingr2\",\n        \"best_before\"\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/struct","description":"<p>Method to create a struct.\nStruct name must be unique.</p>\n<p>Parameters required are:</p>\n<ul>\n<li><strong>name</strong></li>\n<li><strong>oracle</strong> that will own the struct</li>\n<li><strong>dna</strong> : json that contains the atoms to be part of the struct</li>\n</ul>\n","urlObject":{"protocol":"http","port":"8080","path":["api","struct"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"863a8bda-b5ef-4534-8ca7-e53b582ce680"},{"name":"Delete Struct","event":[{"listen":"test","script":{"id":"e93314ec-5cc1-4e06-8a54-e33b4d9761ea","exec":["pm.test(\"Version test\", function () {","    pm.response.to.not.have.jsonBody(\"error_code\");","});"],"type":"text/javascript"}}],"id":"f94eafd1-2240-485b-9a0e-7f1a5cfb3c11","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"{{struct_name}}\",\n    \"token\": \"0000\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/struct","description":"<p>Method to delete a struct. Struct MUST not have Quanta created using it.</p>\n<p>Required parameter:</p>\n<ul>\n<li><strong>token</strong>: this should be the token of the oracle that created the struct.</li>\n<li><strong>name</strong>: struct unique name</li>\n</ul>\n","urlObject":{"path":["api","struct"],"host":["http://localhost:8080"],"query":[],"variable":[]}},"response":[],"_postman_id":"f94eafd1-2240-485b-9a0e-7f1a5cfb3c11"},{"name":"Delete Quantum","event":[{"listen":"test","script":{"id":"b15966a7-0564-4785-81f2-320694a25041","exec":["pm.test(\"Version test\", function () {","    pm.response.to.not.have.jsonBody(\"error_code\");","});"],"type":"text/javascript"}}],"id":"9bd9e7f3-bd28-4113-915f-15f6618511b1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"{\n    \"id\": \"{{quantum_id}}\",\n    \"token\": \"0000\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/quantum","description":"<p>Method to delete a Quantum by the oracle that created it.</p>\n<p>Required parameter:</p>\n<ul>\n<li><strong>token</strong>: this should be the token of the oracle that created the struct.</li>\n<li><strong>id</strong>: quantum id</li>\n</ul>\n","urlObject":{"path":["api","quantum"],"host":["http://localhost:8080"],"query":[],"variable":[]}},"response":[],"_postman_id":"9bd9e7f3-bd28-4113-915f-15f6618511b1"},{"name":"Get Quantum","event":[{"listen":"test","script":{"id":"b46c7988-923c-4599-b448-842ed0fc510b","exec":["pm.test(\"Version test\", function () {","    pm.response.to.not.have.jsonBody(\"error_code\");","});"],"type":"text/javascript"}}],"id":"fd7584cb-c77c-47d5-835f-6b208581aca8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"{\n    \"id\": \"{{quantum_id}}\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/quantum","description":"<p>Method to get a quantum based on it's id.</p>\n<p>Required parameter:</p>\n<ul>\n<li><strong>id</strong>: quantum id</li>\n</ul>\n","urlObject":{"path":["api","quantum"],"host":["http://localhost:8080"],"query":[],"variable":[]}},"response":[],"_postman_id":"fd7584cb-c77c-47d5-835f-6b208581aca8"},{"name":"Forge Quantum","event":[{"listen":"test","script":{"id":"a4f6d694-8e6f-4cba-ad85-7ce5c8ae9fd0","exec":["var jsonData = JSON.parse(responseBody);","postman.setEnvironmentVariable(\"quantum_id\", jsonData.quantum_id);"],"type":"text/javascript"}}],"id":"8b938bcb-3057-4e24-9474-f422291853ef","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"struct_name\": \"{{struct_name}}\",\n    \"token\": \"0000\",\n    \"payload\": {\n        \"title\":\"Crema di Formaggio\",\n        \"date\":\"28/09/2021\",\n        \"ingr1\": {\n            \"value\": \"latte\",\n            \"lat\": \"44.8674\",\n            \"long\": \"7.2995\",\n            \"origin\": \"Parma\"\n        },\n        \"ingr2\": {\n            \"value\": \"sale\",\n            \"lat\": \"37.75\",\n            \"long\": \"14.25\",\n            \"origin\": \"Sicilia\"\n        },\n        \"best_before\": \"22/12/2023\"\n    }\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/forge","description":"<p>Method to forge a quantum based on a struct. Forging method is used to fill a struct with data to be then notarized on the blockchain.</p>\n<p>Required parameter:</p>\n<ul>\n<li><strong>struct_name</strong>: name of the struct to use </li>\n<li><strong>token</strong>: valid token of the oracle that will forge the quantum</li>\n<li><strong>payload</strong>: a json payload with all the field as defined from the struct</li>\n</ul>\n","urlObject":{"path":["api","forge"],"host":["http://localhost:8080"],"query":[],"variable":[]}},"response":[],"_postman_id":"8b938bcb-3057-4e24-9474-f422291853ef"},{"name":"Forge Ovo","event":[{"listen":"test","script":{"id":"a4f6d694-8e6f-4cba-ad85-7ce5c8ae9fd0","exec":["var jsonData = JSON.parse(responseBody);","postman.setEnvironmentVariable(\"quantum_id\", jsonData.quantum_id);"],"type":"text/javascript"}}],"id":"19ed6533-ee0f-4bfb-9e74-56887eff0ae4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"struct_name\": \"{{struct_name}}\",\n    \"token\": \"0000\",\n    \"payload\": {\n        \"title\":\"Crema di Formaggio\",\n        \"date\":\"28/09/2021\",\n        \"ingr1\": {\n            \"value\": \"latte\",\n            \"lat\": \"44.8674\",\n            \"long\": \"7.2995\",\n            \"origin\": \"Parma\"\n        },\n        \"ingr2\": {\n            \"value\": \"sale\",\n            \"lat\": \"37.75\",\n            \"long\": \"14.25\",\n            \"origin\": \"Sicilia\"\n        },\n        \"best_before\": \"22/12/2023\"\n    }\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/forge","description":"<p>Method to forge a quantum based on a struct. Forging method is used to fill a struct with data to be then notarized on the blockchain.</p>\n<p>Required parameter:</p>\n<ul>\n<li><strong>struct_name</strong>: name of the struct to use </li>\n<li><strong>token</strong>: valid token of the oracle that will forge the quantum</li>\n<li><strong>payload</strong>: a json payload with all the field as defined from the struct</li>\n</ul>\n","urlObject":{"path":["api","forge"],"host":["http://localhost:8080"],"query":[],"variable":[]}},"response":[],"_postman_id":"19ed6533-ee0f-4bfb-9e74-56887eff0ae4"},{"name":"CheckTransaction","id":"a4c76fe3-6fb0-4bb9-9fae-d80d5698c93a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"trx\": \"0x9f604167e5e5b78227f229efe18f0d4fd491f881fa27da809677becc0058d457\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/checkTransaction","description":"<p>Method to check a transaction as notarized on the blockchain.\nRequired parameter:</p>\n<ul>\n<li><strong>trx</strong>: transaction id as returned by the notarize method</li>\n</ul>\n","urlObject":{"path":["api","checkTransaction"],"host":["http://localhost:8080"],"query":[],"variable":[]}},"response":[],"_postman_id":"a4c76fe3-6fb0-4bb9-9fae-d80d5698c93a"},{"name":"Notarize","id":"99523131-5b8d-437d-b82b-9975e8dd3a20","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"id\": \"{{quantum_id}}\",\n    \"token\": \"0000\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/notarize","description":"<p>Method to notarize a quantum on the blockchain. This process will write and block the data creating a unique hash on the blockchain. After this the quantum can only be read but not modified.</p>\n<p>Required parameter:</p>\n<ul>\n<li><strong>id</strong>: quantum id to be notarized</li>\n<li><strong>token</strong>: token of the oracle that will notarize the quantum</li>\n</ul>\n","urlObject":{"path":["api","notarize"],"host":["http://localhost:8080"],"query":[],"variable":[]}},"response":[],"_postman_id":"99523131-5b8d-437d-b82b-9975e8dd3a20"},{"name":"Validate","id":"43ed1f14-5229-4837-943b-061ed5d0d7aa","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"{\n    \"quantum_id\": {{quantum_id}}\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/validate","description":"<p>Method to notarize a quantum on the blockchain. This process will write and block the data creating a unique hash on the blockchain. After this the quantum can only be read but not modified.</p>\n<p>Required parameter:</p>\n<ul>\n<li><strong>id</strong>: quantum id to be notarized</li>\n<li><strong>token</strong>: token of the oracle that will notarize the quantum</li>\n</ul>\n","urlObject":{"path":["api","validate"],"host":["http://localhost:8080"],"query":[],"variable":[]}},"response":[],"_postman_id":"43ed1f14-5229-4837-943b-061ed5d0d7aa"},{"name":"Version","id":"eed60a2c-9dc0-42bd-afbf-e825cc1e2622","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/version","description":"<p>Method that returns the actual version.</p>\n","urlObject":{"path":["api","version"],"host":["http://localhost:8080"],"query":[],"variable":[]}},"response":[],"_postman_id":"eed60a2c-9dc0-42bd-afbf-e825cc1e2622"},{"name":"Green Label","id":"c5272516-7d78-443d-a2f5-2424e3c206f2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/green-label?quantum={{quantum_id}}","description":"<p>Method that returns the actual version.</p>\n","urlObject":{"path":["green-label"],"host":["http://localhost:8080"],"query":[{"key":"quantum","value":"{{quantum_id}}"}],"variable":[]}},"response":[],"_postman_id":"c5272516-7d78-443d-a2f5-2424e3c206f2"}],"event":[{"listen":"prerequest","script":{"id":"cc05c497-b2e1-4594-8a84-23d172c6e524","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"aa5c5969-ab0f-4bcf-9b73-b41d90fc78c3","type":"text/javascript","exec":[""]}}],"variable":[{"key":"token","value":"0000"},{"key":"base_url","value":"http://localhost:8080"}]}