{"info":{"_postman_id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","name":"Datastory API","description":"<html><head></head><body><p>﻿Under the <code>Variables</code> tab, add your environment variables to start making requests. You will need to request an API token to get started.</p>\n<p>Test. test</p>\n<h3 id=\"test\">test</h3>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"26185434","collectionId":"c0749d65-8cb2-45a1-a72d-78efce058ab9","publishedId":"2s9YC1Wub6","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2024-08-10T18:12:18.000Z"},"item":[{"name":"Items","item":[{"name":"Fetch Items","event":[{"listen":"test","script":{"id":"c3671aef-2a1d-484b-9301-64dc988b6ec8","exec":["var template = `","<style type=\"text/css\">","    .tftable {font-size:14px;color:#333333;width:100%;border-width: 1px;border-color: #87ceeb;border-collapse: collapse;}","    .tftable th {font-size:18px;background-color:#87ceeb;border-width: 1px;padding: 8px;border-style: solid;border-color: #87ceeb;text-align:left;}","    .tftable tr {background-color:#ffffff;}","    .tftable td {font-size:14px;border-width: 1px;padding: 8px;border-style: solid;border-color: #87ceeb;}","    .tftable tr:hover {background-color:#e0ffff;}","</style>","","<table class=\"tftable\" border=\"1\">","    <tr>","        <th>ID</th>","        <th>Property ID</th>","        <th>Statement Data Value ID</th>","        <th>Statement Data Value Name</th>","        <th>Statement Data Value Slug</th>","    </tr>","    ","    {{#each response}}","        {{#each properties}}","            {{#each statements}}","                <tr>","                    <td>{{../id}}</td>","                    <td>{{../schema.property_id}}</td>","                    <td>{{data_value.id}}</td>","                    <td>{{data_value.name}}</td>","                    <td>{{data_value.slug}}</td>","                </tr>","            {{/each}}","        {{/each}}","    {{/each}}","</table>","`;","","function constructVisualizerPayload() {","    return {response: pm.response.json()}","}","","pm.visualizer.set(template, constructVisualizerPayload());"],"type":"text/javascript","packages":{}}}],"id":"f897742b-64a0-49e3-a27b-7efaa638ab61","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"filter\": {\n        \"class_id\": {\n            \"_eq\": \"Country\"\n        }     \n    },\n    \"limit\" : 1\n}","options":{"raw":{"language":"json"}}},"url":"{{base_url}}/items/fetch","description":"<h3 id=\"fetch-items\">Fetch Items</h3>\n<p>This endpoint allows you to fetch items based on the specified filter criteria.</p>\n<h4 id=\"request-body\">Request Body</h4>\n<ul>\n<li><code>filter</code> (object) - The filter object containing the criteria for fetching items.<ul>\n<li><code>class_id</code> (object) - The class ID filter criteria.<ul>\n<li><code>_eq</code> (string) - The equal condition for the class ID.</li>\n</ul>\n</li>\n</ul>\n</li>\n<li><code>limit</code> (number) - The limit on the number of items to be fetched.</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<p>Upon a successful execution, the server will respond with a status code of 200 and a JSON array containing the fetched items. Each item object contains an <code>id</code> and a <code>properties</code> array, which in turn contains <code>id</code>, <code>statements</code>, and <code>schema</code> objects.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","name":"Datastory API","type":"collection"}},"urlObject":{"path":["items","fetch"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[{"id":"5073255c-b1d5-4edf-91c5-495dff75ba1c","name":"Fetch 10 countries","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"filter\": {\n        \"class_id\": {\n            \"_eq\": \"Country\"\n        }     \n    },\n    \"limit\" : 10\n}","options":{"raw":{"language":"json"}}},"url":"{{base_url}}/items/fetch"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":null},{"id":"cd2eea9b-f16e-40ea-b48b-d5a014258ac1","name":"Fetch with parameters","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"filter\": {\n        \"class_id\": {\n            \"_eq\": \"Country\"\n        }     \n    },\n    \"properties\" : [\n        {\n            \"id\": \"name\"\n        },\n        {\n            \"id\": \"currency\"\n        },\n        {\n            \"id\": \"wikidata_id\"\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"{{base_url}}/items/fetch"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":null},{"id":"76b5f297-2b70-407d-96ef-d525f3ca0654","name":"Fetch with all properties (incl. subclasses)","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"filter\": {\n        \"class_id\": {\n            \"_eq\": \"Place\"\n        }     \n    },\n    \"limit\":  10,\n    \"includeSubclasses\": true\n}","options":{"raw":{"language":"json"}}},"url":"{{base_url}}/items/fetch"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":null},{"id":"e9d1c8f5-8949-4023-9b80-9b9f8af14ecc","name":"Fetch with depth","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"filter\": {\n        \"class_id\": {\n            \"_eq\": \"Country\"\n        }     \n    },\n    \"limit\": 10,\n    \"depth\" : 2\n}","options":{"raw":{"language":"json"}}},"url":"{{base_url}}/items/fetch"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":null}],"_postman_id":"f897742b-64a0-49e3-a27b-7efaa638ab61"},{"name":"Delete Items","id":"a8831ed9-b60e-440b-8a65-f4b9bf5db91d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"id\": \"test_item\"\n}","options":{"raw":{"language":"json"}}},"url":"{{base_url}}/items/delete","description":"<p>Deletes an item and related statements and qualifiers.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","name":"Datastory API","type":"collection"}},"urlObject":{"path":["items","delete"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"a8831ed9-b60e-440b-8a65-f4b9bf5db91d"},{"name":"Create Items","id":"543ef959-a2d6-4a99-9c79-adc4bd9949cd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"data\": [\n        {\n            \"name\": \"Test item\",\n            \"class_id\": \"TestClass\",\n            \"workspace_id\": \"open_knowledge_graph\"\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"{{base_url}}/items/create","description":"<p>Creates items. You can pass multiple items.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","name":"Datastory API","type":"collection"}},"urlObject":{"path":["items","create"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"543ef959-a2d6-4a99-9c79-adc4bd9949cd"},{"name":"Update Items","id":"6a35068c-038b-4d05-87a0-5ffa85588f55","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"data\": [\n        {\n            \"id\": \"test_item\",\n            \"updates\": {\n                \"name\": {\"en\" : \"Test item – new name\"}\n            }\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"{{base_url}}/items/update","description":"<p>Retrieves an item</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","name":"Datastory API","type":"collection"}},"urlObject":{"path":["items","update"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"6a35068c-038b-4d05-87a0-5ffa85588f55"},{"name":"Upsert Items","id":"254285d7-57c8-4d0c-b243-2c1efc645341","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"data\": [\n        {\n            \"id\": \"test_item\",\n            \"updates\": {\n                \"name\": {\"en\" : \"Test item – new name\"}\n            }\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"{{base_url}}/items/update","description":"<p>Retrieves an item</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","name":"Datastory API","type":"collection"}},"urlObject":{"path":["items","update"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"254285d7-57c8-4d0c-b243-2c1efc645341"}],"id":"ddadf92f-779a-41c5-9e9a-e717e6ea58b7","_postman_id":"ddadf92f-779a-41c5-9e9a-e717e6ea58b7","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","name":"Datastory API","type":"collection"}}},{"name":"Schema","item":[{"name":"Get class schema","id":"ca81f9bc-d32c-46c5-832b-24cce49685ef","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"classId\" : \"Country\",\n    \"properties\" : [{\"id\" : \"name\" }]\n}","options":{"raw":{"language":"json"}}},"url":"{{base_url}}/schema/fetch","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","name":"Datastory API","type":"collection"}},"urlObject":{"path":["schema","fetch"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"ca81f9bc-d32c-46c5-832b-24cce49685ef"},{"name":"Get cube schema","event":[{"listen":"test","script":{"id":"76206f25-0689-4fc5-9764-f611f4c77ece","exec":["var template = `","<style type=\"text/css\">","    .tftable {font-size:14px;color:#333333;width:100%;border-width: 1px;border-color: #87ceeb;border-collapse: collapse;}","    .tftable th {font-size:18px;background-color:#87ceeb;border-width: 1px;padding: 8px;border-style: solid;border-color: #87ceeb;text-align:left;}","    .tftable tr {background-color:#ffffff;}","    .tftable td {font-size:14px;border-width: 1px;padding: 8px;border-style: solid;border-color: #87ceeb;}","    .tftable tr:hover {background-color:#e0ffff;}","</style>","","<table class=\"tftable\" border=\"1\">","    <tr>","        <th>Property Name</th>","        <th>Class ID</th>","        <th>Is DB Optimized</th>","        <th>Is Single</th>","        <th>Max Count</th>","        <th>Min Count</th>","        <th>Position</th>","        <th>Postgres Column</th>","        <th>Property ID</th>","        <th>Required</th>","        <th>Semantic Type ID</th>","        <th>Settings</th>","        <th>Value Classes</th>","        <th>Inherited From ID</th>","        <th>Dimension Type ID</th>","        <th>Inverse Of ID</th>","    </tr>","    ","    {{#each response}}","        <tr>","            <td>{{@key}}</td>","            <td>{{schema.class_id}}</td>","            <td>{{schema.is_db_optimized}}</td>","            <td>{{schema.is_single}}</td>","            <td>{{schema.max_count}}</td>","            <td>{{schema.min_count}}</td>","            <td>{{schema.position}}</td>","            <td>{{schema.postgres_column}}</td>","            <td>{{schema.property_id}}</td>","            <td>{{schema.required}}</td>","            <td>{{schema.semantic_type_id}}</td>","            <td>{{schema.settings}}</td>","            <td>{{schema.value_classes}}</td>","            <td>{{schema.inherited_from_id}}</td>","            <td>{{schema.dimension_type_id}}</td>","            <td>{{schema.inverse_of_id}}</td>","        </tr>","    {{/each}}","</table>","`;","","function constructVisualizerPayload() {","    return {response: pm.response.json()}","}","","pm.visualizer.set(template, constructVisualizerPayload());"],"type":"text/javascript"}}],"id":"fb5d92dd-202e-4aa9-8fc9-9bea2e1df299","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"// cube_M6Lh5is0FtqUhZ = Country, Year cube\n\n{\n    \"classId\" : \"cube_M6Lh5is0FtqUhZ\"\n}","options":{"raw":{"language":"json"}}},"url":"{{base_url}}/schema/fetch","description":"<p>This HTTP POST request is used to fetch the schema for a specific class. The request should include the \"classId\" parameter, which represents the ID of the class for which the schema needs to be fetched.</p>\n<p>The response to this request includes detailed schema information for various properties related to the specified class, such as \"country\", \"co2_emissions\", \"cube_dimensions_count\", \"id\", \"key_dimension\", \"measure_dimension\", \"name\", \"population\", \"workspace\", and \"year\".</p>\n<p>The schema information includes details about the class ID, inherited from ID, database optimization status, single/multiple values, maximum and minimum count, position, Postgres column, property ID, requirement status, semantic type ID, settings, value classes, property name, inverse of ID, and dimension type ID.</p>\n<p>The user can use this schema information to understand the structure and properties of the specified class and its related entities.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","name":"Datastory API","type":"collection"}},"urlObject":{"path":["schema","fetch"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"fb5d92dd-202e-4aa9-8fc9-9bea2e1df299"}],"id":"6dd3e5bb-053a-4240-8a3d-8bfb23ec87b8","_postman_id":"6dd3e5bb-053a-4240-8a3d-8bfb23ec87b8","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","name":"Datastory API","type":"collection"}}},{"name":"Cubes","item":[{"name":"Create cube","id":"73f1192d-c4e2-49bc-a965-71ad655c7624","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"dimensions\" : [\"property_date_UZHhnjctnvK8bp\", \"property_region_tjn_nTx4OOSxnuQxJv\", \"property_policy_OOudyCwLqwOajN\"],\n    \"workspace_id\" : \"workspace_QQiCKdxM4JCLtU\"\n}","options":{"raw":{"language":"json"}}},"url":"{{base_url}}/cubes/create","description":"<p>- Adds a cube item<br />- Adds to cube schema to describe the cube<br />- Creates the cube table<br />- Tracks any item relationships in cube table</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","name":"Datastory API","type":"collection"}},"urlObject":{"path":["cubes","create"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"73f1192d-c4e2-49bc-a965-71ad655c7624"},{"name":"Delete a cube","id":"bbba826c-423b-4b79-a0af-3618c8e578c7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"cube_id\" : \"cube_ElvhX5GL6Wf1Pr\"\n}","options":{"raw":{"language":"json"}}},"url":"{{base_url}}/cubes/delete","description":"<h3 id=\"delete-cube\">Delete Cube</h3>\n<p>This endpoint is used to delete a specific cube.</p>\n<h4 id=\"request-body\">Request Body</h4>\n<ul>\n<li><code>cube_id</code> (string, required): The ID of the cube to be deleted.</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<p>The response for this request is a JSON object conforming to the following schema:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"type\": \"object\",\n  \"properties\": {\n    \"message\": {\n      \"type\": \"string\"\n    }\n  }\n}\n\n</code></pre>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","name":"Datastory API","type":"collection"}},"urlObject":{"path":["cubes","delete"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"bbba826c-423b-4b79-a0af-3618c8e578c7"},{"name":"Re-index cube","id":"69bf1691-fd46-4842-a1d6-0a5773631b17","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"cube_id\" : \"cube_ihCgwhUVVpiN1V\"\n}","options":{"raw":{"language":"json"}}},"url":"{{base_url}}/cubes/reindex","description":"<p>Reindex cube takes care of adding relevant metadata based on the cube. Initially it helps with populating cube.measure_dimension = [...]  </p>\n<p>But it could also help derive metadata like:<br />- What timespan is the data for?<br />- Which items have data for this indicator?  </p>\n<p>Re-index materializes metadata as statements etc. but we could also consider views for some of these needs.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","name":"Datastory API","type":"collection"}},"urlObject":{"path":["cubes","reindex"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"69bf1691-fd46-4842-a1d6-0a5773631b17"},{"name":"Get cube ID","id":"51d724be-a9b6-4937-8e3c-0cf2637b1e90","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"dimensions\" : [\"country\", \"year\", \"age_interval\"],\n    \"workspace_id\" : \"workspace_sandbox\"\n}","options":{"raw":{"language":"json"}}},"url":"{{base_url}}/cubes/getId","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","name":"Datastory API","type":"collection"}},"urlObject":{"path":["cubes","getId"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"51d724be-a9b6-4937-8e3c-0cf2637b1e90"}],"id":"20546027-1f36-463b-b3b9-94536e0336eb","_postman_id":"20546027-1f36-463b-b3b9-94536e0336eb","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","name":"Datastory API","type":"collection"}}},{"name":"Observations","item":[{"name":"Get observations","id":"97a93abe-12ef-46b9-b4ce-f883b48b2f80","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"cube_id\" : \"cube_M6Lh5is0FtqUhZ\",\n    \"format\" : \"wide\"\n}","options":{"raw":{"language":"json"}}},"url":"{{base_url}}/observations/fetch","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","name":"Datastory API","type":"collection"}},"urlObject":{"path":["observations","fetch"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"97a93abe-12ef-46b9-b4ce-f883b48b2f80"},{"name":"Get observations Copy","id":"cbab3144-79a6-480a-8e48-3dbc7bfa3bd7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"cube_id\": \"property_forvarvsarbetande_dummy_8qMp6kPdWwAauQ-property_arbetslosi_atgardutbildning_dummy_RzY7PnOGARaifR-answer\",\n  \"measure_id\": \"property_anser_om_kommunal_service_bibliotek_6iFYwkcnQH0Lm6\",\n  \"limit\": 1000,\n  \"filters\": {\n    \n  },\n  \"sort\": {\n    \"field\": \"value\",\n    \"order\": \"DESC\"\n  }\n}\n","options":{"raw":{"language":"json"}}},"url":"{{base_url}}/v2/observations/fetch","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","name":"Datastory API","type":"collection"}},"urlObject":{"path":["v2","observations","fetch"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"cbab3144-79a6-480a-8e48-3dbc7bfa3bd7"},{"name":"Get observations Copy 2","id":"0898af57-6db1-417a-ab0e-b7b89c7e77d9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"cube_id\": \"cube_uDPK0LpxZiha15\",\n  \"measure_id\": \"life_expectancy\",\n  \"limit\": 1000,\n  \"filters\": {\n    \"dimensions\" : {\"gender\" : [\"female\"]},\n    \"deepFilters\": {\n      \"country\": {\n        \"_and\": [\n          {\n            \"statements\": {\n              \"property_id\": { \"_eq\": \"world_bank_region\" },\n              \"object_id\": { \"_in\": [\"south_asia_world_bank\"] }\n            }\n          },\n          {\n            \"statements\": {\n              \"property_id\": { \"_eq\": \"iso2\" },\n              \"postgres_varchar\": { \"_eq\": \"IN\" }\n            }\n          }\n        ]\n      }\n    }\n  },\n  \"sort\": {\n    \"field\": \"value\",\n    \"order\": \"DESC\"\n  }\n}\n","options":{"raw":{"language":"json"}}},"url":"{{base_url}}/v2/observations/fetch","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","name":"Datastory API","type":"collection"}},"urlObject":{"path":["v2","observations","fetch"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"0898af57-6db1-417a-ab0e-b7b89c7e77d9"},{"name":"Get observations Copy 2","id":"4c364d00-40d8-42d3-bbd4-742f97b89b95","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"cube_id\" : \"cube_M6Lh5is0FtqUhZ\",\n    \"measure_id\" : \"births\",\n    \"limit\" : 1000,\n    \"filters\" : { \n        \"dimensions\" : {\"country\" : [\"sweden\", \"japan\"]}\n        \n        }\n}","options":{"raw":{"language":"json"}}},"url":"{{base_url}}/v2/observations/fetch","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","name":"Datastory API","type":"collection"}},"urlObject":{"path":["v2","observations","fetch"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"4c364d00-40d8-42d3-bbd4-742f97b89b95"},{"name":"Get observations Copy 2","id":"a67d3bfe-fbd3-4b32-982d-0f6618d3a84e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"cube_id\" : \"cube_M6Lh5is0FtqUhZ\",\n    \"measure_id\" : \"births\",\n    \"limit\" : 1000,\n    \"filters\" : { \n        \"dimensions\" : {\"country\" : [\"sweden\", \"japan\"]}\n        \n        }\n}","options":{"raw":{"language":"json"}}},"url":"{{base_url}}/v2/observations/fetch","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","name":"Datastory API","type":"collection"}},"urlObject":{"path":["v2","observations","fetch"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"a67d3bfe-fbd3-4b32-982d-0f6618d3a84e"}],"id":"3a872453-da61-4ab5-ab4e-2015c9e6042e","_postman_id":"3a872453-da61-4ab5-ab4e-2015c9e6042e","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","name":"Datastory API","type":"collection"}}},{"name":"Classes","item":[{"name":"[WIP] Get class tree","id":"512f2e80-bda3-4532-b7c0-ada75f8225ed","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"url":"{{base_url}}/classes/tree","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","name":"Datastory API","type":"collection"}},"urlObject":{"path":["classes","tree"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"512f2e80-bda3-4532-b7c0-ada75f8225ed"}],"id":"1dce5d85-4c4e-457f-bee2-06f9a9e922fc","_postman_id":"1dce5d85-4c4e-457f-bee2-06f9a9e922fc","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","name":"Datastory API","type":"collection"}}},{"name":"Statements","item":[{"name":"Fetch statements","id":"5eb9fa69-4ae0-4dc6-92d5-85d3eefc1cc7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"filter\": {\n        \"subject_id\": {\n            \"_eq\": \"sweden\"\n        }\n    }\n}","options":{"raw":{"language":"json"}}},"url":"{{base_url}}/statements/fetch","description":"<p>Retrieves an item</p>\n","urlObject":{"path":["statements","fetch"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"5eb9fa69-4ae0-4dc6-92d5-85d3eefc1cc7"},{"name":"Delete statements","id":"beae9780-925e-40dc-8df4-a909a6fae371","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"filter\": {\n        \"subject_id\": {\n            \"_eq\": \"sweden\"\n        },\n        \"property_id\": {\n            \"_eq\": \"custom_text\"\n        }\n    }\n}","options":{"raw":{"language":"json"}}},"url":"{{base_url}}/statements/delete","urlObject":{"path":["statements","delete"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"beae9780-925e-40dc-8df4-a909a6fae371"},{"name":"Update statements","id":"be8c59a3-12b8-4202-a39e-f52052abff3d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"data\": [\n        {\n            \"id\": \"f3ce1b5c-1b76-4159-9266-a5e4481ef0ce\",\n            \"updates\": {\n                \"postgres_varchar\": \"Some new text\"\n            }\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"{{base_url}}/statements/update","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","name":"Datastory API","type":"collection"}},"urlObject":{"path":["statements","update"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"be8c59a3-12b8-4202-a39e-f52052abff3d"},{"name":"Create statements","id":"f4dd6d27-c75f-45b0-8d6b-2a65716ce296","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"data\": [\n        {\n            \"subject_id\": \"guernsey\",\n            \"property_id\": \"region\",\n            \"object_id\": \"europe\"\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"{{base_url}}/statements/create","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","name":"Datastory API","type":"collection"}},"urlObject":{"path":["statements","create"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"f4dd6d27-c75f-45b0-8d6b-2a65716ce296"}],"id":"f7a07f2b-8448-461a-9614-a8634c597803","_postman_id":"f7a07f2b-8448-461a-9614-a8634c597803","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","name":"Datastory API","type":"collection"}}},{"name":"Qualifiers","item":[{"name":"Fetch qualifiers","id":"6dfaa6dc-14ef-470e-8517-df9a8320212b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"filter\": {\n        \"property_id\": {\n            \"_eq\": \"time_precision\"\n        }\n    }\n}","options":{"raw":{"language":"json"}}},"url":"{{base_url}}/qualifiers/fetch","description":"<p>Retrieves an item</p>\n","urlObject":{"path":["qualifiers","fetch"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"6dfaa6dc-14ef-470e-8517-df9a8320212b"},{"name":"Delete qualifiers","id":"2c891b58-f51a-4212-a9f0-1327cf205099","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"filter\": {\n        \"subject_id\": {\n            \"_eq\": \"sweden\"\n        },\n        \"property_id\": {\n            \"_eq\": \"custom_text\"\n        }\n    }\n}","options":{"raw":{"language":"json"}}},"url":"{{base_url}}/qualifiers/delete","urlObject":{"path":["qualifiers","delete"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"2c891b58-f51a-4212-a9f0-1327cf205099"},{"name":"Update qualifiers","id":"daef284d-28a3-4845-a952-984a6df0343a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"data\": [\n        {\n            \"id\": \"f3ce1b5c-1b76-4159-9266-a5e4481ef0ce\",\n            \"updates\": {\n                \"postgres_varchar\": \"Some new text\"\n            }\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"{{base_url}}/qualifiers/update","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","name":"Datastory API","type":"collection"}},"urlObject":{"path":["qualifiers","update"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"daef284d-28a3-4845-a952-984a6df0343a"},{"name":"Create qualifiers","id":"ea9bdff2-fd4c-4965-a7df-20ba826e7861","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"data\": [\n        {\n            \"subject_id\": \"guernsey\",\n            \"property_id\": \"region\",\n            \"object_id\": \"europe\"\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"{{base_url}}/qualifiers/create","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","name":"Datastory API","type":"collection"}},"urlObject":{"path":["qualifiers","create"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"ea9bdff2-fd4c-4965-a7df-20ba826e7861"}],"id":"01746d1a-3256-4b5d-a0b6-bca5e42814aa","_postman_id":"01746d1a-3256-4b5d-a0b6-bca5e42814aa","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","name":"Datastory API","type":"collection"}}},{"name":"Cloud","item":[{"name":"Get usage statistics","id":"52ab5de9-ceb3-4a33-a248-ff16ef9d4899","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"url":"{{base_url}}/cloud/stats","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","name":"Datastory API","type":"collection"}},"urlObject":{"path":["cloud","stats"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"52ab5de9-ceb3-4a33-a248-ff16ef9d4899"}],"id":"876da54d-31b4-4636-b3d5-eba001873039","_postman_id":"876da54d-31b4-4636-b3d5-eba001873039","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","name":"Datastory API","type":"collection"}}},{"name":"Playground","item":[{"name":"AI Sweden","item":[{"name":"[WIP] Group by","id":"82982984-08a9-49ec-9343-b4b29c29b9bd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"config\": {\n        \"scenarios\": \"'industry_high', 'industry_low'\",\n        \"select\": [\n            \"hexagon\",\n            \"scenario\",\n            \"day_type\",\n            \"sector\",\n            \"date\",\n            \"SUM(value) as value\"\n        ],\n        \"groupBy\": [    \n            \"hexagon\",\n            \"scenario\",\n            \"sector\",\n            \"day_type\",\n            \"date\"\n        ],\n        \"day_type\": \"weekday\",\n        \"date\": \"2024-02-01\"\n    }\n}","options":{"raw":{"language":"json"}}},"url":"{{base_url}}/observations/groupBy","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","name":"Datastory API","type":"collection"}},"urlObject":{"path":["observations","groupBy"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[{"id":"3e239ed1-b2e2-4e8b-93cd-1ab121ced120","name":"Country – single time point","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"config\": {\n        \"scenarios\": \"'industry_high', 'industry_low'\",\n         \"day_type\": \"weekday\",\n        \"date\": \"2024-02-01\",\n        \"select\": [\n            \"scenario\",\n            \"day_type\",\n            \"sector\",\n            \"date\",\n            \"time\",\n            \"SUM(value) as value\"\n        ],\n        \"groupBy\": [    \n            \"scenario\",\n            \"sector\",\n            \"day_type\",\n            \"date\"\n        ]\n    }\n}","options":{"raw":{"language":"json"}}},"url":"{{base_url}}/observations/groupBy"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":null}],"_postman_id":"82982984-08a9-49ec-9343-b4b29c29b9bd"}],"id":"809b4eae-0db2-444a-a98b-9423a5aaa851","_postman_id":"809b4eae-0db2-444a-a98b-9423a5aaa851","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","name":"Datastory API","type":"collection"}}},{"name":"SHoF","item":[{"name":"Create cube Copy","id":"1380549f-86af-4f5e-899b-2a07228b56c1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"dimensions\" : [\"property_policy_rTRlp8mPV91NAe\", \"year\"],\n    \"workspace_id\" : \"workspace_1gvkVcUsilRzBA\"\n}","options":{"raw":{"language":"json"}}},"url":"{{base_url}}/cubes/create","description":"<p>- Adds a cube item<br />- Adds to cube schema to describe the cube<br />- Creates the cube table<br />- Tracks any item relationships in cube table</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","name":"Datastory API","type":"collection"}},"urlObject":{"path":["cubes","create"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"1380549f-86af-4f5e-899b-2a07228b56c1"}],"id":"6e72afda-a522-4491-9bff-912c438f6440","_postman_id":"6e72afda-a522-4491-9bff-912c438f6440","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","name":"Datastory API","type":"collection"}}},{"name":"Create Items Copy","id":"f008a6e6-6ce6-4ac8-840c-f24b67e03d9b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"data\": [\n        {\n            \"name\": \"Age interval\",\n            \"class_id\": \"Property\",\n            \"workspace_id\": \"open_knowledge_graph\"\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"{{base_url}}/items/create","description":"<p>Creates items. You can pass multiple items.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","name":"Datastory API","type":"collection"}},"urlObject":{"path":["items","create"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"f008a6e6-6ce6-4ac8-840c-f24b67e03d9b"},{"name":"Fetch Items Copy","event":[{"listen":"test","script":{"id":"c3671aef-2a1d-484b-9301-64dc988b6ec8","exec":["var template = `","<style type=\"text/css\">","    .tftable {font-size:14px;color:#333333;width:100%;border-width: 1px;border-color: #87ceeb;border-collapse: collapse;}","    .tftable th {font-size:18px;background-color:#87ceeb;border-width: 1px;padding: 8px;border-style: solid;border-color: #87ceeb;text-align:left;}","    .tftable tr {background-color:#ffffff;}","    .tftable td {font-size:14px;border-width: 1px;padding: 8px;border-style: solid;border-color: #87ceeb;}","    .tftable tr:hover {background-color:#e0ffff;}","</style>","","<table class=\"tftable\" border=\"1\">","    <tr>","        <th>ID</th>","        <th>Property ID</th>","        <th>Statement Data Value ID</th>","        <th>Statement Data Value Name</th>","        <th>Statement Data Value Slug</th>","    </tr>","    ","    {{#each response}}","        {{#each properties}}","            {{#each statements}}","                <tr>","                    <td>{{../id}}</td>","                    <td>{{../schema.property_id}}</td>","                    <td>{{data_value.id}}</td>","                    <td>{{data_value.name}}</td>","                    <td>{{data_value.slug}}</td>","                </tr>","            {{/each}}","        {{/each}}","    {{/each}}","</table>","`;","","function constructVisualizerPayload() {","    return {response: pm.response.json()}","}","","pm.visualizer.set(template, constructVisualizerPayload());"],"type":"text/javascript","packages":{}}}],"id":"4806114f-0aa2-4c97-aa54-dc8cc294072d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"filter\": {\n        \"class_id\": {\n            \"_eq\": \"Country\"\n        }     \n    },\n    \"limit\" : 1\n}","options":{"raw":{"language":"json"}}},"url":"{{base_url}}/items/fetch","description":"<h3 id=\"fetch-items\">Fetch Items</h3>\n<p>This endpoint allows you to fetch items based on the specified filter criteria.</p>\n<h4 id=\"request-body\">Request Body</h4>\n<ul>\n<li><code>filter</code> (object) - The filter object containing the criteria for fetching items.<ul>\n<li><code>class_id</code> (object) - The class ID filter criteria.<ul>\n<li><code>_eq</code> (string) - The equal condition for the class ID.</li>\n</ul>\n</li>\n</ul>\n</li>\n<li><code>limit</code> (number) - The limit on the number of items to be fetched.</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<p>Upon a successful execution, the server will respond with a status code of 200 and a JSON array containing the fetched items. Each item object contains an <code>id</code> and a <code>properties</code> array, which in turn contains <code>id</code>, <code>statements</code>, and <code>schema</code> objects.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","name":"Datastory API","type":"collection"}},"urlObject":{"path":["items","fetch"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[{"id":"7fca02f7-7af0-4aeb-b033-92a04035c44f","name":"Fetch Regions","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"filter\": {\n        \"class_id\": {\n            \"_eq\": \"Region\"\n        }     \n    },\n    \"limit\" : 10,\n    \"preserveResponse\": true\n}","options":{"raw":{"language":"json"}}},"url":"{{base_url}}/items/fetch"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":null},{"id":"33137b4a-ae8a-4693-b1da-b31d537d0f72","name":"Fetch Countries Different Properties","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"filter\": {\n        \"class_id\": {\n            \"_eq\": \"Country\"\n        }     \n    },\n    \"properties\" : [\n        {\n            \"id\": \"name\"\n        },\n        {\n            \"id\": \"currency\"\n        },\n        {\n            \"id\": \"iso3\"\n        }\n    ],\n    \"preserveResponse\": true,\n    \"limit\" : 10\n}","options":{"raw":{"language":"json"}}},"url":"{{base_url}}/items/fetch"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":null},{"id":"a16ccd90-b973-4c33-9677-8476712ac23f","name":"Fetch Countries Different Properties Copy","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"filter\": {\n        \"class_id\": {\n            \"_eq\": \"Country\"\n        }     \n    },\n    \"properties\" : [\n        {\n            \"id\": \"name\"\n        },\n        {\n            \"id\": \"currency\"\n        },\n        {\n            \"id\": \"iso3\"\n        }\n    ],\n    \"preserveResponse\": true,\n    \"limit\" : 10\n}","options":{"raw":{"language":"json"}}},"url":"{{base_url}}/items/fetch"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":null}],"_postman_id":"4806114f-0aa2-4c97-aa54-dc8cc294072d"},{"name":"Fetch Items Copy","event":[{"listen":"test","script":{"id":"c3671aef-2a1d-484b-9301-64dc988b6ec8","exec":["var template = `","<style type=\"text/css\">","    .tftable {font-size:14px;color:#333333;width:100%;border-width: 1px;border-color: #87ceeb;border-collapse: collapse;}","    .tftable th {font-size:18px;background-color:#87ceeb;border-width: 1px;padding: 8px;border-style: solid;border-color: #87ceeb;text-align:left;}","    .tftable tr {background-color:#ffffff;}","    .tftable td {font-size:14px;border-width: 1px;padding: 8px;border-style: solid;border-color: #87ceeb;}","    .tftable tr:hover {background-color:#e0ffff;}","</style>","","<table class=\"tftable\" border=\"1\">","    <tr>","        <th>ID</th>","        <th>Property ID</th>","        <th>Statement Data Value ID</th>","        <th>Statement Data Value Name</th>","        <th>Statement Data Value Slug</th>","    </tr>","    ","    {{#each response}}","        {{#each properties}}","            {{#each statements}}","                <tr>","                    <td>{{../id}}</td>","                    <td>{{../schema.property_id}}</td>","                    <td>{{data_value.id}}</td>","                    <td>{{data_value.name}}</td>","                    <td>{{data_value.slug}}</td>","                </tr>","            {{/each}}","        {{/each}}","    {{/each}}","</table>","`;","","function constructVisualizerPayload() {","    return {response: pm.response.json()}","}","","pm.visualizer.set(template, constructVisualizerPayload());"],"type":"text/javascript","packages":{}}}],"id":"1e9bdafe-effb-4d9f-80e0-571238c60a84","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"filter\": {\n        \"class_id\": {\n            \"_eq\": \"Country\"\n        }     \n    },\n    \"limit\" : 1\n}","options":{"raw":{"language":"json"}}},"url":"{{base_url}}/items/fetch","description":"<h3 id=\"fetch-items\">Fetch Items</h3>\n<p>This endpoint allows you to fetch items based on the specified filter criteria.</p>\n<h4 id=\"request-body\">Request Body</h4>\n<ul>\n<li><code>filter</code> (object) - The filter object containing the criteria for fetching items.<ul>\n<li><code>class_id</code> (object) - The class ID filter criteria.<ul>\n<li><code>_eq</code> (string) - The equal condition for the class ID.</li>\n</ul>\n</li>\n</ul>\n</li>\n<li><code>limit</code> (number) - The limit on the number of items to be fetched.</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<p>Upon a successful execution, the server will respond with a status code of 200 and a JSON array containing the fetched items. Each item object contains an <code>id</code> and a <code>properties</code> array, which in turn contains <code>id</code>, <code>statements</code>, and <code>schema</code> objects.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","name":"Datastory API","type":"collection"}},"urlObject":{"path":["items","fetch"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[{"id":"39ef6cdc-a0a2-40b4-a0ee-f80e9860c9ce","name":"Fetch 10 countries","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"filter\": {\n        \"class_id\": {\n            \"_eq\": \"Country\"\n        }     \n    },\n    \"limit\" : 10\n}","options":{"raw":{"language":"json"}}},"url":"{{base_url}}/items/fetch"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":null},{"id":"b71f9f06-395f-4559-b952-53549b9cca06","name":"Fetch with parameters","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"filter\": {\n        \"class_id\": {\n            \"_eq\": \"Country\"\n        }     \n    },\n    \"properties\" : [\n        {\n            \"id\": \"name\"\n        },\n        {\n            \"id\": \"currency\"\n        },\n        {\n            \"id\": \"wikidata_id\"\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"{{base_url}}/items/fetch"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":null},{"id":"b6e33428-31ff-47a9-b0b5-378433fa91eb","name":"Fetch with all properties (incl. subclasses)","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"filter\": {\n        \"class_id\": {\n            \"_eq\": \"Place\"\n        }     \n    },\n    \"limit\":  10,\n    \"includeSubclasses\": true\n}","options":{"raw":{"language":"json"}}},"url":"{{base_url}}/items/fetch"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":null},{"id":"cd3ec971-8eba-4d17-b7d9-1958759cc977","name":"Fetch with depth","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"filter\": {\n        \"class_id\": {\n            \"_eq\": \"Country\"\n        }     \n    },\n    \"limit\": 10,\n    \"depth\" : 2\n}","options":{"raw":{"language":"json"}}},"url":"{{base_url}}/items/fetch"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":null}],"_postman_id":"1e9bdafe-effb-4d9f-80e0-571238c60a84"}],"id":"645b2e37-f936-4979-b459-b0b1926d13b3","description":"<p>Use this folder for experiments</p>\n","_postman_id":"645b2e37-f936-4979-b459-b0b1926d13b3","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","id":"c0749d65-8cb2-45a1-a72d-78efce058ab9","name":"Datastory API","type":"collection"}}}],"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]}},"event":[{"listen":"prerequest","script":{"id":"9c0416f4-9d17-4435-a612-c9a47b99ce52","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"2dc272bc-a199-4370-9dfd-488f73cf771f","type":"text/javascript","exec":[""]}}]}