{"info":{"_postman_id":"6d28f8e2-9b11-46cc-b2f1-d2eed3db1bdd","name":"open-data-bim-public","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"409717","collectionId":"6d28f8e2-9b11-46cc-b2f1-d2eed3db1bdd","publishedId":"2s9Yyy8Jik","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2024-02-07T10:54:09.000Z"},"item":[{"name":"ODB","item":[{"name":"/run-task (s3 case)","item":[{"name":"runTask S3","id":"7796f09e-7803-4b4c-81cd-4d9eed06c227","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n \"bucket\": \"test-stockholm-oped-data-bim\",\n \"client_task_id\": \"test_5\"\n}","options":{"raw":{"language":"json"}}},"url":"https://5eq3ebrbvj.execute-api.eu-north-1.amazonaws.com/prod/run-task","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"9zsowo7$Aag6jiNtTp-b2"}]},"isInherited":true,"source":{"_postman_id":"6d28f8e2-9b11-46cc-b2f1-d2eed3db1bdd","id":"6d28f8e2-9b11-46cc-b2f1-d2eed3db1bdd","name":"open-data-bim-public","type":"collection"}},"urlObject":{"path":["run-task"],"host":["https://5eq3ebrbvj.execute-api.eu-north-1.amazonaws.com/prod"],"query":[],"variable":[]}},"response":[],"_postman_id":"7796f09e-7803-4b4c-81cd-4d9eed06c227"}],"id":"2bdfa7d4-c9f1-43c8-ba61-b188417bd856","description":"<h1 id=\"s3-case\"><strong>S3 Case</strong></h1>\n<p>1. Create an S3 Bucket</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-bash\">aws s3api create-bucket \\\n    --bucket &lt;bucket name&gt; \\\n    --region eu-north-1 \\\n    --create-bucket-configuration LocationConstraint=eu-north-1\n\n</code></pre>\n<p>2. Create a Bucket Policy File</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-bash\">{\n    \"Version\": \"2012-10-17\",\n    \"Statement\": [\n        {\n            \"Effect\": \"Allow\",\n            \"Principal\": {\n                \"AWS\": \"arn:aws:iam::894252403637:user/test-task-user\"\n            },\n            \"Action\": [\n                \"s3:GetObject\",\n                \"s3:PutObject\",\n                \"s3:PutObjectAcl\",\n                \"s3:RestoreObject\",\n                \"s3:GetObjectAttributes\",\n                \"s3:GetObjectVersionAttributes\",\n                \"s3:GetObjectVersion\",\n                \"s3:ListBucketVersions\",\n                \"s3:ListBucket\"\n            ],\n            \"Resource\": [\n                \"arn:aws:s3:::&lt;bucket name&gt;/*\",\n                \"arn:aws:s3:::&lt;bucket name&gt;\"\n            ]\n        }\n    ]\n}\n\n</code></pre>\n<p>3. Put a Bucket Policy on S3 Bucket</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-bash\">aws s3api put-bucket-policy \\\n    --bucket &lt;bucket name&gt; \n    --policy file://policy.json\n\n</code></pre>\n<p>4. Upload file to S3 Bucket</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-bash\">aws s3 cp \\\n    \"/path/to/file/example.ifc\" \\ \n    s3://&lt;bucket name&gt;/\n\n</code></pre>\n<p>5. Use API for create convert task</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-bash\">curl --location 'https://5eq3ebrbvj.execute-api.eu-north-1.amazonaws.com/prod/run-task' \\\n--header 'Content-Type: application/json' \\\n--header &amp;#x27;Authorization: Bearer &lt;auth token&gt;&amp;#x27; \\\n--data '{\n \"bucket\": \"&lt;bucket name&gt;\",\n \"client_task_id\": \"test_593\"\n}'\n\n</code></pre>\n<p>6. Check status using task_id from response from previous step</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-bash\">curl --location 'https://5eq3ebrbvj.execute-api.eu-north-1.amazonaws.com/prod/task-info?task_id=6eb16c56-2719-40bf-8453-1b4e424f7cb1' \\\n--header &amp;#x27;Authorization: Bearer &lt;auth token&gt;&amp;#x27;\n\n</code></pre>\n","_postman_id":"2bdfa7d4-c9f1-43c8-ba61-b188417bd856","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"9zsowo7$Aag6jiNtTp-b2"}]},"isInherited":true,"source":{"_postman_id":"6d28f8e2-9b11-46cc-b2f1-d2eed3db1bdd","id":"6d28f8e2-9b11-46cc-b2f1-d2eed3db1bdd","name":"open-data-bim-public","type":"collection"}}},{"name":"/run-task (google case)","item":[{"name":"runTask Google","id":"b1808c26-28cf-4a37-ae12-3b93951b4365","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n \"google_folder\": \"1vUkdWzzNQdg8zDbhh-QpUWLTBTiDRpco\",\n \"client_task_id\": \"test_5\"\n}","options":{"raw":{"language":"json"}}},"url":"https://5eq3ebrbvj.execute-api.eu-north-1.amazonaws.com/prod/run-task","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"9zsowo7$Aag6jiNtTp-b2"}]},"isInherited":true,"source":{"_postman_id":"6d28f8e2-9b11-46cc-b2f1-d2eed3db1bdd","id":"6d28f8e2-9b11-46cc-b2f1-d2eed3db1bdd","name":"open-data-bim-public","type":"collection"}},"urlObject":{"path":["run-task"],"host":["https://5eq3ebrbvj.execute-api.eu-north-1.amazonaws.com/prod"],"query":[],"variable":[]}},"response":[],"_postman_id":"b1808c26-28cf-4a37-ae12-3b93951b4365"}],"id":"e8587a95-93ff-4a1c-8552-4f9ee1d179ea","description":"<h1 id=\"google-case\"><strong>Google Case</strong></h1>\n<p>1. Share Google Drive Folder to <a href=\"https://mailto:fileconverterservice@fileconverter-ef1c2.iam.gserviceaccount.com\">fileconverterservice@fileconverter-ef1c2.iam.gserviceaccount.com</a></p>\n<img src=\"https://content.pstmn.io/2355b908-af69-4f6a-9431-68967bfd7fdf/dGdfaW1hZ2VfMjk1NDU5NjI2Mi5qcGVn\" width=\"616\" height=\"349\" />\n\n<p>2. Use folder id (<a href=\"https://drive.google.com/drive/folders/%5C%5BGOOGLE_FOLDER%5C%5D\">https://drive.google.com/drive/folders/[GOOGLE_FOLDER]</a>)</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-bash\">curl --location 'https://5eq3ebrbvj.execute-api.eu-north-1.amazonaws.com/prod/run-task' \\\n--header 'Content-Type: application/json' \\\n--header 'Authorization: Bearer --data '{\n \"google_folder\": \"[GOOGLE_FOLDER]\",\n \"client_task_id\": \"test_593\"\n}'\n\n</code></pre>\n<p>3. Check status using task_id from response from previous step</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-bash\">curl --location 'https://5eq3ebrbvj.execute-api.eu-north-1.amazonaws.com/prod/task-info?task_id=6eb16c56-2719-40bf-8453-1b4e424f7cb1' \\\n--header &amp;#x27;Authorization: Bearer &lt;auth token&gt;&amp;#x27;\n\n</code></pre>\n","_postman_id":"e8587a95-93ff-4a1c-8552-4f9ee1d179ea","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"9zsowo7$Aag6jiNtTp-b2"}]},"isInherited":true,"source":{"_postman_id":"6d28f8e2-9b11-46cc-b2f1-d2eed3db1bdd","id":"6d28f8e2-9b11-46cc-b2f1-d2eed3db1bdd","name":"open-data-bim-public","type":"collection"}}},{"name":"/task-info","item":[{"name":"taskInfoGet","id":"4cb08862-d444-41fa-bb78-1ea2de0cc4b0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://5eq3ebrbvj.execute-api.eu-north-1.amazonaws.com/prod/task-info?task_id=d4027b28-30cb-4593-a2eb-656c940dcf1e","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"9zsowo7$Aag6jiNtTp-b2"}]},"isInherited":true,"source":{"_postman_id":"6d28f8e2-9b11-46cc-b2f1-d2eed3db1bdd","id":"6d28f8e2-9b11-46cc-b2f1-d2eed3db1bdd","name":"open-data-bim-public","type":"collection"}},"urlObject":{"path":["task-info"],"host":["https://5eq3ebrbvj.execute-api.eu-north-1.amazonaws.com/prod"],"query":[{"key":"task_id","value":"d4027b28-30cb-4593-a2eb-656c940dcf1e"}],"variable":[]}},"response":[],"_postman_id":"4cb08862-d444-41fa-bb78-1ea2de0cc4b0"}],"id":"f2e9f131-dff9-4414-9d53-912e58beb73d","description":"<p>Check status using task_id</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-bash\">curl --location 'https://5eq3ebrbvj.execute-api.eu-north-1.amazonaws.com/prod/task-info?task_id=6eb16c56-2719-40bf-8453-1b4e424f7cb1' \\\n--header &amp;#x27;Authorization: Bearer &lt;auth token&gt;&amp;#x27;\n\n</code></pre>\n","_postman_id":"f2e9f131-dff9-4414-9d53-912e58beb73d","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"9zsowo7$Aag6jiNtTp-b2"}]},"isInherited":true,"source":{"_postman_id":"6d28f8e2-9b11-46cc-b2f1-d2eed3db1bdd","id":"6d28f8e2-9b11-46cc-b2f1-d2eed3db1bdd","name":"open-data-bim-public","type":"collection"}}}],"id":"de5cbb37-fbc2-428d-aa57-eae60a20cde4","_postman_id":"de5cbb37-fbc2-428d-aa57-eae60a20cde4","description":"","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"9zsowo7$Aag6jiNtTp-b2"}]},"isInherited":true,"source":{"_postman_id":"6d28f8e2-9b11-46cc-b2f1-d2eed3db1bdd","id":"6d28f8e2-9b11-46cc-b2f1-d2eed3db1bdd","name":"open-data-bim-public","type":"collection"}}}],"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"9zsowo7$Aag6jiNtTp-b2"}]}},"event":[{"listen":"prerequest","script":{"id":"6f1690d3-e0e1-4fe9-948e-40356c416756","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"79a77a12-84bd-4cef-80a3-d5c9cda39417","type":"text/javascript","exec":[""]}}],"variable":[{"key":"baseUrl","value":"https://5eq3ebrbvj.execute-api.eu-north-1.amazonaws.com/prod","type":"string"},{"key":"Authorization","value":"9zsowo7$Aag6jiNtTp-b2","type":"string"},{"key":"basePath","value":"prod","type":"string"}]}