{"info":{"_postman_id":"841c1cba-1c32-46bd-9eb8-9e9f6573dca4","name":"API v2 Docs","description":"<html><head></head><body><p>Le API permettono di accedere ai dati raccolti dai display INTOWAY, utilizzando software terzi.</p>\n<p>Richieste e risposte utilizzano JSON come formato salvo poche eccezioni.</p>\n<p>Le API sono attive solo se si dispone di una licenza che le includa.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"581650","collectionId":"841c1cba-1c32-46bd-9eb8-9e9f6573dca4","publishedId":"RWgjahAb","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF580D"},"publishDate":"2018-09-30T14:02:49.000Z"},"item":[{"name":"Autenticazione","item":[],"id":"56ca18cd-3de5-4532-87f4-0ed98546d286","description":"<p>L'autenticazione avviene tramite la standard HTTP Basic Authentication utilizzando la chiave di accesso sotto forma di username e password:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>Authorization: Basic SzEyMzQ6c2VjcmV0\n</code></pre><hr />\n<p>In questo caso è stata utilizzata la chiave con id \"1234\" e secret \"secret\". Questi due parametri diventano rispettivamente:</p>\n<ul>\n<li>username : \"K1234\"</li>\n<li>password : \"secret\"</li>\n</ul>\n<p>In linea con il protocollo HTTP bisogna codificare la stringa \"K1234:secret\" in base64 e si ottiene appunto <strong>SzEyMzQ6c2VjcmV0</strong>.</p>\n<p>È possibile ottenere la chiave attraverso la propria dashboard, seguendo queste istruzioni:</p>\n<ul>\n<li>Accedere alla dashboard</li>\n<li>In alto a destra, fare click sul menu a tendina e poi su <strong>Impostazioni</strong></li>\n<li>Nel menu di sinistra cliccare su <strong>Accessi</strong> e poi scegliere la scheda <strong>API</strong></li>\n<li>Utilizzare il bottone <strong>+</strong> per creare la nuova chiave</li>\n<li>Assegnargli un nome arbitrario e completare l'operazione</li>\n</ul>\n<p><strong>NOTA</strong> sarà possibile visualizzare la secret della chiave generata solo per 24h</p>\n","event":[{"listen":"prerequest","script":{"id":"8381b317-89ad-454b-83aa-5b9a56e3b6cd","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"f6f88ff8-c178-463b-809e-bbd63c0dcdbf","type":"text/javascript","exec":[""]}}],"_postman_id":"56ca18cd-3de5-4532-87f4-0ed98546d286"},{"name":"Buckets","item":[],"id":"184e3d57-b579-4ede-afaf-3b639959f290","description":"<p>I Buckets rappresentano i contenitori all'interno del quale vengono raccolti i dati. Ogni bucket può acquisire dati da uno solo dei software di INTOWAY.\nÈ possibile tramite un apposito metodo ottenere la lista dei Buckets, e la loro configurazione.</p>\n","event":[{"listen":"prerequest","script":{"id":"7a961f34-cd42-4b40-9f90-d4af589df064","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"a0674922-f92c-49c1-a0b8-55da08255ff0","type":"text/javascript","exec":[""]}}],"_postman_id":"184e3d57-b579-4ede-afaf-3b639959f290"},{"name":"Struttura dati","item":[],"id":"a491bb82-d4ee-4572-81f0-c412c1a2cd6e","description":"<p>Ogni interazione con gli schermi INTOWAY genera un documento, contenente più informazioni possibili su tale evento.\nUn evento, ad esempio, può essere la compilazione di un questionario di soddisfazione, il riempimento di un form o lo scatto di una foto con INTOSELFIE. Ogni evento genera una struttura dati, il cui scheletro comune è:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    \"id\" : \"... id documento...\",\n    \"timestamp\" : \"ISO Date\",\n    \"timezone\" : \"string\",\n    \"bucket\" : int,\n    \"data\" : {},\n    \"meta\" . {\n        ...\n        \"valid\" : boolean, // indicatore generico di validità teorica del documento \n        \"software\" : int, // codice del software che ha generato il documento\n        ....\n    }\n}\n</code></pre><ul>\n<li><strong>data</strong> è il contenitore dei dati generati dall'interazione diretta dell'utente con il software, come ad esempio la risposta ad una domanda del questionario.</li>\n<li><strong>meta</strong> è il contenitore dei dati ausiliari o elaborati in secondo momento</li>\n</ul>\n","event":[{"listen":"prerequest","script":{"id":"65be8560-50e8-47d6-a25b-eb4eeb98583b","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"2e1c9765-ec0f-4533-b16d-20f5dbe269d8","type":"text/javascript","exec":[""]}}],"_postman_id":"a491bb82-d4ee-4572-81f0-c412c1a2cd6e"},{"name":"Survey","item":[],"id":"defbfd72-172c-4f89-b48e-730275fb85fc","description":"<p>La tecnologia INTOWAY è basata su strutture di raccolta dati chiamate \"<strong>survey</strong>\", composti a loro volta da molteplici \"<strong>question</strong>\".</p>\n<p>Una <strong>question</strong> è la rappresentazione di una domanda sottoposta all'utente. La risposta ad una <strong>question</strong> genera una dato che verrà salvato nel database, assocciato all'id di quest'ultima. Tutte le risposte alle \"<strong>question</strong>\" saranno salvate in un documento associato all'id della <strong>survey</strong>.</p>\n<p>Il documento generato dalla survey avrà questa struttura:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    ...\n    \"data\" : {\n        ...\n        \"111\" : 3, // la risposta alla question con id 111 è 3\n        ....\n    },\n    \"meta\" . {\n        ...\n        \"survey_id\" : 333, // id della survey\n        ....\n    }\n}\n</code></pre><p>Ogni sessione da parte dell'utente genera un documento anche quando la \"<strong>survey</strong>\" non viene completata. Quando scatta il tempo limite di inattività, il display ripristina la schermata iniziale e i dati parzialmente raccolti vengono inviati. In questo caso sarà presente il campo <strong>meta:abandoned</strong>, il cui valore rappresenta l'ultima domanda non risposta, e il campo <strong>meta:valid</strong> risulterà <code>false</code>.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    ...\n    \"meta\" : {\n        ...\n        \"valid\" : false,\n        \"abandoned\" : 111\n        ...\n    }\n    ...\n}\n</code></pre>","event":[{"listen":"prerequest","script":{"id":"c7d94546-0cde-4583-8742-562edc393001","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"1d96a522-66b4-4954-8f3b-347914f078c5","type":"text/javascript","exec":[""]}}],"_postman_id":"defbfd72-172c-4f89-b48e-730275fb85fc"},{"name":"Query","item":[{"name":"Campi","item":[],"id":"fe0debcd-fa73-461b-b8ab-4e5e2988a733","description":"<p>I campi della struttura dati, sono anche rappresentabili tramite stringhe che ne riassumono il percorso.</p>\n<ul>\n<li><strong>id</strong> univoco del documento</li>\n<li><strong>timestamp</strong> fuso orario in formato ISO 8601</li>\n<li><strong>timezone</strong> dove il documento è stato registrato</li>\n<li><strong>bucket</strong> id del bucket in cui il documento è stato registrato</li>\n<li><strong>data:{target}</strong> dato all'interno del contenitore data. <strong>target</strong> può essere ad esempio l'id di una <strong>question</strong></li>\n<li><strong>meta:valid</strong> <code>bool</code> indicatore di validità del documento</li>\n<li><strong>meta:abandoned</strong> <code>null|int</code> solo per INTOWAY indica se il questionario è stato lasciato incompleto. Se diverso da <code>null</code> di conseguenza <strong>meta:valid</strong> sarà uguale a <code>false</code></li>\n<li><strong>meta:vss_na</strong> <code>null|bool</code> solo per INTOWAY, qualora la tecnologia <strong>vss</strong> avesse bloccatto la sessione, questo campo risulterà uguale a <code>true</code> e di conseguenza <strong>meta:valid</strong> sarà uguale a <code>false</code></li>\n<li><strong>meta:vss_na_for</strong> <code>null|string</code>solo per INTOWAY qualora <strong>meta:vss_na</strong> fosse uguale a <code>true</code> questo campo conterrà una stringa che ne indica la causa. <code>\"dupl\"</code> qualora si tratti di una sessione duplicata o <code>\"deny\"</code> in caso di sessione non autorizzata.</li>\n<li><strong>meta:face_id</strong> <code>null|string</code> solo per INTOWAY qualora <strong>meta:vss_na</strong> fosse uguale a <code>true</code> questo campo conterrà una stringa con un codice anonimo, che identifica l'entità non autorizzata dalla tecnologia vss. Tale codice non è referenziabile ad alcun altro dato, se non allo stesso codice presente in altri documenti per fornire un'indicazione quantitativa.</li>\n<li><strong>meta:biometric_age</strong> <code>null|int</code> solo per INTOWAY indica l'età rilevata dal sistema biometrico (se attivo).</li>\n<li><strong>meta:biometric_gender</strong> <code>null|string</code> solo per INTOWAY indica il sesso rilevato dal sistema biometrico (se attivo) con una stringa <code>\"m\"|\"f\"</code></li>\n<li><strong>meta:moderation_na</strong> <code>null|bool</code> solo per INTOSELFIE è uguale a <code>ŧrue</code> qualora il sistema di moderazione delle immagini fosse attivo e avesse contrassegnato il selfie come non adatto</li>\n<li><strong>meta:facebook_id</strong> <code>null|string</code> solo per INTOSELFIE l'id del post facebook generato</li>\n<li><strong>meta:facebook_entity_exists</strong> <code>null|bool</code> solo per INTOSELFIE indica se il post facebook esiste ancora: se <code>null</code> sta a significare che il suo stato è non verificato, se <code>true</code> indica che esiste, se invece è <code>false</code> indica che non esiste più.</li>\n<li><strong>meta:facebook_stat_post_impressions_organic_unique</strong> <code>null|int</code> solo per INTOSELFIE indica il numero di impressioni sul post generato</li>\n<li><strong>meta:facebook_stat_post_clicks_unique</strong> <code>null|int</code> solo per INTOSELFIE indica il numero di click sul post generato</li>\n<li><strong>meta:facebook_stat_post_reactions_like_total</strong> <code>null|int</code> solo per INTOSELFIE indica il numero di like sul post generato</li>\n<li><strong>meta:facebook_stat_post_reactions_love_total</strong> <code>null|int</code> solo per INTOSELFIE</li>\n<li><strong>meta:facebook_stat_post_reactions_wow_total</strong> <code>null|int</code> solo per INTOSELFIE</li>\n<li><strong>meta:facebook_stat_post_reactions_haha_total</strong> <code>null|int</code> solo per INTOSELFIE</li>\n<li><strong>meta:facebook_stat_post_reactions_sorry_total</strong> <code>null|int</code> solo per INTOSELFIE</li>\n<li><strong>meta:facebook_stat_post_reactions_anger_total</strong> <code>null|int</code> solo per INTOSELFIE</li>\n<li><strong>meta:facebook_stat_post_reactions_total</strong> <code>null|int</code> solo per INTOSELFIE</li>\n</ul>\n","event":[{"listen":"prerequest","script":{"id":"99c8f985-963c-43cd-9e02-a7ed379124c8","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"ac8cb3bb-2650-4911-85b2-da644b4a06ff","type":"text/javascript","exec":[""]}}],"_postman_id":"fe0debcd-fa73-461b-b8ab-4e5e2988a733"},{"name":"Filtri","item":[],"id":"4e925c76-5513-4d6f-847c-3e37f3db0b74","description":"<p>I filtri rappresentano un potente strumento per estrarre solo i dati desiderati, ovvero che rispondano ad una determinata condizione.\nPer applicare un filtro a qualsiasi query è sufficiente passare l'oggetto <code>filters</code> all'interno del body della query:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    ...\n    \"filters\" : {\n        \"meta:valid\" : true\n    }\n    ...\n}\n</code></pre><h2 id=\"operatori-di-ricerca\">Operatori di ricerca</h2>\n<p>Sono presenti diversi operatori per confrontare i dati. Ad esempio per ottenere tutti i dati raccolti tra l' 1 Gennaio 2018 e il 31 Dicembre 2018 ( UTC ):</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>\"filters\" : {\n    \"timestamp\" : {\n        \"&gt;=\" : 1514764800,\n        \"&lt;=\" : 1546300799\n    }\n}\n</code></pre><p>oppure per estrarre tutti i dati riguardanti solo buckets 111, 222 e 333 :</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>\"filters\" : {\n    \"bucket\" : {\n        \"in\" : [111,222,333]\n    }\n}\n</code></pre><p>Da notare che l'espressione:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>\"filters\" : {\n    \"meta:abandoned\" : null\n}\n</code></pre><p>equivale a:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>\"filters\" : {\n    \"meta:abandoned\" : {\n        \"=\" : null\n    }\n}\n</code></pre><p>I possibili operatori sono:</p>\n<ul>\n<li><strong>uguale</strong> <code>\"=\" : null | int | float | string | bool</code></li>\n<li><strong>diverso</strong> <code>\"!\" : null | int | float | string | bool</code></li>\n<li><strong>maggiore</strong> <code>\"&gt;\" : int | float | string</code></li>\n<li><strong>maggiore o uguale</strong> <code>\"&gt;=\" : int | float | string</code></li>\n<li><strong>minore</strong> <code>\"&lt;\" : int | float | string</code></li>\n<li><strong>minore o uguale</strong> <code>\"&lt;=\" : int | float | string</code></li>\n<li><strong>uno di</strong> <code>\"in\" : []</code></li>\n<li><strong>non uno di</strong> <code>\"!in\" : []</code></li>\n</ul>\n<p>Ovviamente non tutti gli operatori sono disponibili su ogni campo. A seconda della tipologia di campo saranno presenti determinati operatori. Ad esempio, un campo con valori ammessi <code>true</code> e <code>null</code> non disporrà degli operatori <code> &lt; &lt;= &gt; &gt;= in !in</code></p>\n","event":[{"listen":"prerequest","script":{"id":"1cc857e9-7e53-4f9e-9886-a3fb3be81acd","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"77c2cf7f-adeb-46f5-89df-138322b325a2","type":"text/javascript","exec":[""]}}],"_postman_id":"4e925c76-5513-4d6f-847c-3e37f3db0b74"}],"id":"81bfe54c-df0a-4133-8097-86936df822c5","description":"<p>Le query rappresentano l'insieme dei metodi di accesso ai dati. Si suddividono in:</p>\n<ul>\n<li><strong>count</strong>: la query più semplice utilizzabile per ottenere il solo numero di documenti che rispondono alle condizioni della query.</li>\n<li><strong>fetch</strong>: restituisce l'intera lista di documenti \"paginati\". È anche disponibile la variante <strong>fetch/csv</strong> nella quale la risposta è un file CSV.</li>\n</ul>\n","event":[{"listen":"prerequest","script":{"id":"0e02af64-ed6c-433e-8d3d-a70af5093733","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"9b90722d-e295-4923-947a-75499eda4c11","type":"text/javascript","exec":[""]}}],"_postman_id":"81bfe54c-df0a-4133-8097-86936df822c5"},{"name":"Errori","item":[],"id":"8f17ea9f-1e30-40ea-b913-768caa6781fc","description":"<p>Quando avviene un errore la risposta risulterà simile alla seguente:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    \"status\": \"error\",\n    \"code\": 80,\n    \"message\": \"Entity not exists\",\n}\n</code></pre><p>I codici di errore possibili sono:</p>\n<h6 id=\"50-generic-error\">50 generic error</h6>\n<p>Errore generico non gestito. Potrebbe trattarsi di un problema tecnico.</p>\n<h6 id=\"60-firewall-error\">60 firewall error</h6>\n<p>Il client ( IP o account ) ha raggiunto la quota limite di utilizzo. Dovresti aspettare prima di eseguire una nuova chiamata.</p>\n<h6 id=\"61-auth-required\">61 auth required</h6>\n<p>È richiesta l'autenticazione per questa richiesta, e non sono state inviate le credenziali.</p>\n<h6 id=\"70-input-errors\">70 Input errors</h6>\n<p>Il corpo della richiesa non è un JSON valido, o il contenuto non è formattato come da specifiche.</p>\n<h6 id=\"80-entity-not-exists\">80 Entity Not exists</h6>\n<p>È stata richiesta una risorsa ( bucket, survey ...) che non esiste.</p>\n<h6 id=\"102-auth-not-valid\">102 Auth not valid</h6>\n<p>I parametri di autenticazione sono stati forniti ma non sono validi.</p>\n<h6 id=\"104-account-disabled\">104 Account disabled</h6>\n<p>Account disabilitato</p>\n<h6 id=\"105-deny\">105 Deny</h6>\n<p>L'accesso è stato negato</p>\n","event":[{"listen":"prerequest","script":{"id":"ed422b9c-789f-4092-b257-532872139139","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"fb8b1f86-bcd1-47fa-a2de-b2c5f63e5726","type":"text/javascript","exec":[""]}}],"_postman_id":"8f17ea9f-1e30-40ea-b913-768caa6781fc"},{"name":"Metodi","item":[{"name":"/bucket","item":[{"name":"/","id":"db174ac1-e3e3-43ee-89b1-6912eb3e6ac2","request":{"method":"GET","header":[],"url":"https://api.intoway.net/v2/bucket","description":"<p>Ottieni la lista dei buckets, e la loro configurazione.\nL'oggetto <strong>tags</strong> riassume tramite due sotto oggetti tutti i tag esistenti, unendo quelli assegnati ad ogni bucket</p>\n","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"<username>"},{"key":"password","value":"<password>"}]},"isInherited":true,"source":{"_postman_id":"7c9fe0ce-9889-4349-b24d-0f876a89f7f9","id":"7c9fe0ce-9889-4349-b24d-0f876a89f7f9","name":"Metodi","type":"folder"}},"urlObject":{"protocol":"https","path":["v2","bucket"],"host":["api","intoway","net"],"query":[],"variable":[]}},"response":[{"id":"ca8c3e78-ae53-481c-807a-8d679a6d240b","name":"Example 1","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Basic SzEyMzQ6c2VjcmV0"}],"url":"https://api.intoway.net/v2/bucket"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"origin, x-requested-with, content-type","name":"Access-Control-Allow-Headers","description":"Used in response to a preflight request to indicate which HTTP headers can be used when making the actual request."},{"key":"Access-Control-Allow-Headers","value":"X-AUTH-TOKEN, X-INTOWAY-NetSource, X-INTOWAY-ResponseFormat","name":"Access-Control-Allow-Headers","description":"Used in response to a preflight request to indicate which HTTP headers can be used when making the actual request."},{"key":"Access-Control-Allow-Methods","value":"PUT, GET, POST, DELETE, OPTIONS","name":"Access-Control-Allow-Methods","description":"Specifies the method or methods allowed when accessing the resource. This is used in response to a preflight request."},{"key":"Access-Control-Allow-Origin","value":"*","name":"Access-Control-Allow-Origin","description":"Specifies a URI that may access the resource. For requests without credentials, the server may specify '*' as a wildcard, thereby allowing any origin to access the resource."},{"key":"Connection","value":"Keep-Alive","name":"Connection","description":"Options that are desired for the connection"},{"key":"Content-Length","value":"281","name":"Content-Length","description":"The length of the response body in octets (8-bit bytes)"},{"key":"Content-Type","value":"application/json; charset=utf-8","name":"Content-Type","description":"The mime type of this content"},{"key":"Date","value":"Sat, 29 Sep 2018 14:48:55 GMT","name":"Date","description":"The date and time that the message was sent"},{"key":"Keep-Alive","value":"timeout=5, max=100","name":"Keep-Alive","description":"Custom header"},{"key":"Server","value":"Apache/2.4.25 (Debian)","name":"Server","description":"A name for the server"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"ok\",\n    \"buckets\": [\n        {\n            \"id\": 101,\n            \"name\": \"Milano\",\n            \"software_id\": 1,\n            \"software\": \"INTOFEEDBACK\",\n            \"tags\": {\n                \"region\": \"Lombardia\",\n                \"position\": \"Accoglienza\"\n            },\n            \"software_settings\": {\n                \"survey\": 1596\n            }\n        },\n        {\n            \"id\": 204,\n            \"name\": \"Torino\",\n            \"software_id\": 1,\n            \"software\": \"INTOFEEDBACK\",\n            \"tags\": {\n                \"region\": \"Piemonte\",\n                \"position\": \"Uffici\"\n            },\n            \"software_settings\": {\n                \"survey\": 1770\n            }\n        },\n        {\n            \"id\": 387,\n            \"name\": \"Roma\",\n            \"software_id\": 1,\n            \"software\": \"INTOFEEDBACK\",\n            \"tags\": {\n                \"region\": \"Lazio\",\n                \"position\": \"Accoglienza\"\n            },\n            \"software_settings\": {\n                \"survey\": 1596\n            }\n        },\n        {\n            \"id\": 900,\n            \"name\": \"INTOSELFIE\",\n            \"software_id\": 3,\n            \"software\": \"INTOSELFIE\",\n            \"tags\": {},\n            \"software_settings\": {}\n        }\n    ],\n    \"tags\": {\n        \"keys\": [\n            \"region\",\n            \"position\"\n        ],\n        \"tags\": {\n            \"region\": [\n                \"Lombardia\",\n                \"Piemonte\",\n                \"Lazio\"\n            ],\n            \"position\": [\n                \"Uffici\",\n                \"Accoglienza\"\n            ]\n        }\n    }\n}"}],"_postman_id":"db174ac1-e3e3-43ee-89b1-6912eb3e6ac2"},{"name":"/:id","id":"d2bce094-67d2-45dd-9e10-bc9e0f7205b9","request":{"method":"GET","header":[],"url":"https://api.intoway.net/v2/bucket/{{bucket_id}}","description":"<p>Ottieni i dettagli di un singolo bucket</p>\n","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"<username>"},{"key":"password","value":"<password>"}]},"isInherited":true,"source":{"_postman_id":"7c9fe0ce-9889-4349-b24d-0f876a89f7f9","id":"7c9fe0ce-9889-4349-b24d-0f876a89f7f9","name":"Metodi","type":"folder"}},"urlObject":{"protocol":"https","path":["v2","bucket","{{bucket_id}}"],"host":["api","intoway","net"],"query":[],"variable":[]}},"response":[{"id":"21e0e93a-40e3-4089-a356-b08f41e3a4af","name":"Example 1","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Basic SzEyMzQ6c2VjcmV0"}],"url":"https://api.intoway.net/v2/bucket/101"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"origin, x-requested-with, content-type","name":"Access-Control-Allow-Headers","description":"Used in response to a preflight request to indicate which HTTP headers can be used when making the actual request."},{"key":"Access-Control-Allow-Headers","value":"X-AUTH-TOKEN, X-INTOWAY-NetSource, X-INTOWAY-ResponseFormat","name":"Access-Control-Allow-Headers","description":"Used in response to a preflight request to indicate which HTTP headers can be used when making the actual request."},{"key":"Access-Control-Allow-Methods","value":"PUT, GET, POST, DELETE, OPTIONS","name":"Access-Control-Allow-Methods","description":"Specifies the method or methods allowed when accessing the resource. This is used in response to a preflight request."},{"key":"Access-Control-Allow-Origin","value":"*","name":"Access-Control-Allow-Origin","description":"Specifies a URI that may access the resource. For requests without credentials, the server may specify '*' as a wildcard, thereby allowing any origin to access the resource."},{"key":"Connection","value":"Keep-Alive","name":"Connection","description":"Options that are desired for the connection"},{"key":"Content-Length","value":"145","name":"Content-Length","description":"The length of the response body in octets (8-bit bytes)"},{"key":"Content-Type","value":"application/json; charset=utf-8","name":"Content-Type","description":"The mime type of this content"},{"key":"Date","value":"Sat, 29 Sep 2018 15:02:52 GMT","name":"Date","description":"The date and time that the message was sent"},{"key":"Keep-Alive","value":"timeout=5, max=100","name":"Keep-Alive","description":"Custom header"},{"key":"Server","value":"Apache/2.4.25 (Debian)","name":"Server","description":"A name for the server"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"ok\",\n    \"bucket\": {\n        \"id\": 101,\n        \"name\": \"Milano\",\n        \"software_id\": 1,\n        \"software\": \"INTOFEEDBACK\",\n        \"tags\": {\n        \t\"region\": \"Lombardia\",\n\t\t\t\"position\": \"Accoglienza\"\n        },\n        \"software_settings\": {\n            \"survey\": 1596\n        }\n    }\n}"}],"_postman_id":"d2bce094-67d2-45dd-9e10-bc9e0f7205b9"}],"id":"d4a7a8b7-a8ef-4a8a-814f-e9c0af174b9d","_postman_id":"d4a7a8b7-a8ef-4a8a-814f-e9c0af174b9d","description":"","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"<username>"},{"key":"password","value":"<password>"}]},"isInherited":true,"source":{"_postman_id":"7c9fe0ce-9889-4349-b24d-0f876a89f7f9","id":"7c9fe0ce-9889-4349-b24d-0f876a89f7f9","name":"Metodi","type":"folder"}}},{"name":"/survey","item":[{"name":"/","id":"31ec058c-7d69-41eb-a63d-6a7b206edef5","request":{"method":"GET","header":[],"url":"https://api.intoway.net/v2/survey","description":"<p>Restituisce la lista di survey ordinata per <code>position</code> crescente.\nL'array restituito <code>surveys</code> contiente un oggetto per ogni survey. Ogni oggetto tuttavia non include le specifiche \"<strong>question</strong>\".\nPer ottenere i dettagli di ogni <strong>survey</strong> é necessario eseguire la chiamata specifica illustrata in seguito.</p>\n","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"<username>"},{"key":"password","value":"<password>"}]},"isInherited":true,"source":{"_postman_id":"7c9fe0ce-9889-4349-b24d-0f876a89f7f9","id":"7c9fe0ce-9889-4349-b24d-0f876a89f7f9","name":"Metodi","type":"folder"}},"urlObject":{"protocol":"https","path":["v2","survey"],"host":["api","intoway","net"],"query":[],"variable":[]}},"response":[{"id":"58e60698-f671-4ab1-addd-61e0b2da0263","name":"Example 1","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Basic SzEyMzQ6c2VjcmV0"}],"url":"https://api.intoway.net/v2/survey"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"origin, x-requested-with, content-type","name":"Access-Control-Allow-Headers","description":"Used in response to a preflight request to indicate which HTTP headers can be used when making the actual request."},{"key":"Access-Control-Allow-Headers","value":"X-AUTH-TOKEN, X-INTOWAY-NetSource, X-INTOWAY-ResponseFormat","name":"Access-Control-Allow-Headers","description":"Used in response to a preflight request to indicate which HTTP headers can be used when making the actual request."},{"key":"Access-Control-Allow-Methods","value":"PUT, GET, POST, DELETE, OPTIONS","name":"Access-Control-Allow-Methods","description":"Specifies the method or methods allowed when accessing the resource. This is used in response to a preflight request."},{"key":"Access-Control-Allow-Origin","value":"*","name":"Access-Control-Allow-Origin","description":"Specifies a URI that may access the resource. For requests without credentials, the server may specify '*' as a wildcard, thereby allowing any origin to access the resource."},{"key":"Connection","value":"Keep-Alive","name":"Connection","description":"Options that are desired for the connection"},{"key":"Content-Length","value":"1483","name":"Content-Length","description":"The length of the response body in octets (8-bit bytes)"},{"key":"Content-Type","value":"application/json; charset=utf-8","name":"Content-Type","description":"The mime type of this content"},{"key":"Date","value":"Sat, 29 Sep 2018 15:07:51 GMT","name":"Date","description":"The date and time that the message was sent"},{"key":"Keep-Alive","value":"timeout=5, max=100","name":"Keep-Alive","description":"Custom header"},{"key":"Server","value":"Apache/2.4.25 (Debian)","name":"Server","description":"A name for the server"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"ok\",\n    \"surveys\": [\n        {\n            \"id\": 1596,\n            \"name\": \"Questionario Accoglienza\",\n            \"description\": null,\n            \"order\": 1,\n            \"created\": \"2018-04-03T10:03:17+0000\",\n            \"last_update\": \"2018-04-03T10:03:17+0000\"\n        },\n        {\n            \"id\": 1770,\n            \"name\": \"Questionario Uffici\",\n            \"description\": \"Attivato su tutti i display presenti presso gli uffici dei servizi al pubblico\",\n            \"order\": 3,\n            \"created\": \"2018-04-23T06:27:04+0000\",\n            \"last_update\": \"2018-04-23T06:27:04+0000\"\n        }\n    ]\n}"}],"_postman_id":"31ec058c-7d69-41eb-a63d-6a7b206edef5"},{"name":"/:id","id":"53d7cac2-933b-4f1e-9fcd-0d5ec91c4bd7","request":{"method":"GET","header":[],"url":"https://api.intoway.net/v2/survey/{{survey_id}}","description":"<p>Ottieni i dettagli di una singolo survey</p>\n","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"<username>"},{"key":"password","value":"<password>"}]},"isInherited":true,"source":{"_postman_id":"7c9fe0ce-9889-4349-b24d-0f876a89f7f9","id":"7c9fe0ce-9889-4349-b24d-0f876a89f7f9","name":"Metodi","type":"folder"}},"urlObject":{"protocol":"https","path":["v2","survey","{{survey_id}}"],"host":["api","intoway","net"],"query":[],"variable":[]}},"response":[{"id":"d0118cb5-f76e-41ba-ae6a-0af8121f0ad2","name":"Example 1","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Basic SzEyMzQ6c2VjcmV0"}],"url":"https://api.intoway.net/v2/survey/1596"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"origin, x-requested-with, content-type","name":"Access-Control-Allow-Headers","description":"Used in response to a preflight request to indicate which HTTP headers can be used when making the actual request."},{"key":"Access-Control-Allow-Headers","value":"X-AUTH-TOKEN, X-INTOWAY-NetSource, X-INTOWAY-ResponseFormat","name":"Access-Control-Allow-Headers","description":"Used in response to a preflight request to indicate which HTTP headers can be used when making the actual request."},{"key":"Access-Control-Allow-Methods","value":"PUT, GET, POST, DELETE, OPTIONS","name":"Access-Control-Allow-Methods","description":"Specifies the method or methods allowed when accessing the resource. This is used in response to a preflight request."},{"key":"Access-Control-Allow-Origin","value":"*","name":"Access-Control-Allow-Origin","description":"Specifies a URI that may access the resource. For requests without credentials, the server may specify '*' as a wildcard, thereby allowing any origin to access the resource."},{"key":"Connection","value":"Keep-Alive","name":"Connection","description":"Options that are desired for the connection"},{"key":"Content-Length","value":"1740","name":"Content-Length","description":"The length of the response body in octets (8-bit bytes)"},{"key":"Content-Type","value":"application/json; charset=utf-8","name":"Content-Type","description":"The mime type of this content"},{"key":"Date","value":"Sat, 29 Sep 2018 15:13:56 GMT","name":"Date","description":"The date and time that the message was sent"},{"key":"Keep-Alive","value":"timeout=5, max=100","name":"Keep-Alive","description":"Custom header"},{"key":"Server","value":"Apache/2.4.25 (Debian)","name":"Server","description":"A name for the server"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"ok\",\n    \"survey\": {\n        \"id\": 1596,\n        \"name\": \"Questionario Accoglienza\",\n        \"description\": null,\n        \"order\": 1,\n        \"created\": \"2018-04-03T10:03:17+0000\",\n        \"last_update\": \"2018-04-03T10:03:17+0000\",\n        \"questions\": [\n            {\n                \"id\": 988,\n                \"name\": \"D1 comfort ambienti\",\n                \"order\": 1,\n                \"type\": 1,\n                \"answers\": [\n            \t\t1,\n                \t2,\n                    3,\n                    4\n                ],\n                \"created\": \"2018-04-03T10:03:17+0000\",\n                \"last_update\": \"2018-04-03T10:03:17+0000\"\n            },\n            {\n                \"id\": 989,\n                \"name\": \"D2 operatori\",\n                \"order\": 2,\n                \"type\": 1,\n                \"answers\": [\n                    1,\n                    2,\n                    3,\n                    4\n                ],\n                \"created\": \"2018-04-03T10:03:17+0000\",\n                \"last_update\": \"2018-04-03T10:03:17+0000\"\n            },\n            {\n                \"id\": 990,\n                \"name\": \"D3 riutilizzo servizi si o no\",\n                \"order\": 3,\n                \"type\": 2,\n                \"answers\": [\n                    \"si\",\n                    \"no\"\n                ],\n                \"created\": \"2018-04-03T10:03:17+0000\",\n                \"last_update\": \"2018-04-03T10:03:17+0000\"\n            },\n            {\n                \"id\": 991,\n                \"name\": \"D4 Net Promoter Score = (%P - %D)\",\n                \"order\": 4,\n                \"type\": 4,\n                \"answers\": [\n                    0,\n                    1,\n                    2,\n                    3,\n                    4,\n                    5,\n                    6,\n                    7,\n                    8,\n                    9,\n                    10\n                ],\n                \"created\": \"2018-04-03T10:03:17+0000\",\n                \"last_update\": \"2018-04-03T10:03:17+0000\"\n            },\n            {\n                \"id\": 992,\n                \"name\": \"D5 commenti liberi\",\n                \"order\": 5,\n                \"type\": 3,\n                \"answers\": [],\n                \"created\": \"2018-04-03T10:03:17+0000\",\n                \"last_update\": \"2018-04-03T10:03:17+0000\"\n            }\n        ]\n    }\n}"}],"_postman_id":"53d7cac2-933b-4f1e-9fcd-0d5ec91c4bd7"}],"id":"1e2614ce-9cba-416e-8138-0115a12c67b7","event":[{"listen":"prerequest","script":{"id":"f0f5815c-03a2-4e25-8d93-083c3c344af5","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"60f69adf-2c1a-4880-9cb4-f30d693b79a1","type":"text/javascript","exec":[""]}}],"_postman_id":"1e2614ce-9cba-416e-8138-0115a12c67b7","description":"","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"<username>"},{"key":"password","value":"<password>"}]},"isInherited":true,"source":{"_postman_id":"7c9fe0ce-9889-4349-b24d-0f876a89f7f9","id":"7c9fe0ce-9889-4349-b24d-0f876a89f7f9","name":"Metodi","type":"folder"}}},{"name":"/query","item":[{"name":"/count","id":"6582cfb2-1eb4-4ab2-9508-8fe0744ffff1","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"requests\" : [\n\t\t{\n\t\t\t\"survey\" : {{survey_id}} \t\n\t\t}\n\t]\n}"},"url":"https://api.intoway.net/v2/query/count","description":"<p>La query count è la più semplice e veloce.\nPermette di eseguire più count all'interno della stessa chiamata, passando un array o un oggetto <code>requests</code> contenente diversi oggetti ognuno dei quali contiene criteri di count differenti. Ogni oggetto definisce i parametri per il conteggio tramite i seguenti campi:</p>\n<ul>\n<li><strong>survey</strong> <code>int|array</code> (facoltativo) definisce la o le survey su cui eseguire il conteggio. Se il campo non é presente, il sistema conta tutte le sessioni relative al software.</li>\n<li><strong>filters</strong> <code>object</code> (facoltativo)</li>\n</ul>\n<h5 id=\"notare-che-count-é-lunica-query-che-permette-di-agire-su-questionari-multipli\">Notare che count é l'unica query che permette di agire su questionari multipli.</h5>\n","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"<username>"},{"key":"password","value":"<password>"}]},"isInherited":true,"source":{"_postman_id":"7c9fe0ce-9889-4349-b24d-0f876a89f7f9","id":"7c9fe0ce-9889-4349-b24d-0f876a89f7f9","name":"Metodi","type":"folder"}},"urlObject":{"protocol":"https","path":["v2","query","count"],"host":["api","intoway","net"],"query":[],"variable":[]}},"response":[{"id":"685396dc-e360-402a-aa9e-5bae8e134c0c","name":"Example 1","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Basic SzEyMzQ6c2VjcmV0"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"requests\" : [\n\t\t{\n\t\t\t\"survey\" : 1596 \t\n\t\t},\n\t\t{\n\t\t\t\"survey\" : 1770 \t\n\t\t}\n\t]\n}"},"url":"https://api.intoway.net/v2/query/count"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"origin, x-requested-with, content-type","name":"Access-Control-Allow-Headers","description":"Used in response to a preflight request to indicate which HTTP headers can be used when making the actual request."},{"key":"Access-Control-Allow-Headers","value":"X-AUTH-TOKEN, X-INTOWAY-NetSource, X-INTOWAY-ResponseFormat","name":"Access-Control-Allow-Headers","description":"Used in response to a preflight request to indicate which HTTP headers can be used when making the actual request."},{"key":"Access-Control-Allow-Methods","value":"PUT, GET, POST, DELETE, OPTIONS","name":"Access-Control-Allow-Methods","description":"Specifies the method or methods allowed when accessing the resource. This is used in response to a preflight request."},{"key":"Access-Control-Allow-Origin","value":"*","name":"Access-Control-Allow-Origin","description":"Specifies a URI that may access the resource. For requests without credentials, the server may specify '*' as a wildcard, thereby allowing any origin to access the resource."},{"key":"Connection","value":"Keep-Alive","name":"Connection","description":"Options that are desired for the connection"},{"key":"Content-Length","value":"90","name":"Content-Length","description":"The length of the response body in octets (8-bit bytes)"},{"key":"Content-Type","value":"application/json; charset=utf-8","name":"Content-Type","description":"The mime type of this content"},{"key":"Date","value":"Sat, 29 Sep 2018 15:26:39 GMT","name":"Date","description":"The date and time that the message was sent"},{"key":"Keep-Alive","value":"timeout=5, max=100","name":"Keep-Alive","description":"Custom header"},{"key":"Server","value":"Apache/2.4.25 (Debian)","name":"Server","description":"A name for the server"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"ok\",\n    \"results\": [\n        {\n            \"count\": 7839\n        },\n        {\n            \"count\": 3587\n        }\n    ]\n}"},{"id":"df28ecbc-9e39-4eb5-95d1-c60248b6d95c","name":"Example 2","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Basic SzEyMzQ6c2VjcmV0"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"requests\" : {\n\t\t\"survey_accoglienza\" : {\n\t\t\t\"survey\" : 1596,\n\t\t\t\"filters\" : {\n\t\t\t\t\"meta:valid\" : true\n\t\t\t}\n\t\t},\n\t\t\"survey_uffici\" : {\n\t\t\t\"survey\" : 1770,\n\t\t\t\"filters\" : {\n\t\t\t\t\"meta:valid\" : true\n\t\t\t}\n\t\t},\n\t\t\"totali\" : {\n\t\t\t\"survey\" : [1596,1770],\n\t\t\t\"filters\" : {\n\t\t\t\t\"meta:valid\" : true\n\t\t\t}\n\t\t}\n\t}\n}"},"url":"https://api.intoway.net/v2/query/count"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"origin, x-requested-with, content-type","name":"Access-Control-Allow-Headers","description":"Used in response to a preflight request to indicate which HTTP headers can be used when making the actual request."},{"key":"Access-Control-Allow-Headers","value":"X-AUTH-TOKEN, X-INTOWAY-NetSource, X-INTOWAY-ResponseFormat","name":"Access-Control-Allow-Headers","description":"Used in response to a preflight request to indicate which HTTP headers can be used when making the actual request."},{"key":"Access-Control-Allow-Methods","value":"PUT, GET, POST, DELETE, OPTIONS","name":"Access-Control-Allow-Methods","description":"Specifies the method or methods allowed when accessing the resource. This is used in response to a preflight request."},{"key":"Access-Control-Allow-Origin","value":"*","name":"Access-Control-Allow-Origin","description":"Specifies a URI that may access the resource. For requests without credentials, the server may specify '*' as a wildcard, thereby allowing any origin to access the resource."},{"key":"Connection","value":"Keep-Alive","name":"Connection","description":"Options that are desired for the connection"},{"key":"Content-Length","value":"90","name":"Content-Length","description":"The length of the response body in octets (8-bit bytes)"},{"key":"Content-Type","value":"application/json; charset=utf-8","name":"Content-Type","description":"The mime type of this content"},{"key":"Date","value":"Sat, 29 Sep 2018 15:26:39 GMT","name":"Date","description":"The date and time that the message was sent"},{"key":"Keep-Alive","value":"timeout=5, max=100","name":"Keep-Alive","description":"Custom header"},{"key":"Server","value":"Apache/2.4.25 (Debian)","name":"Server","description":"A name for the server"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"ok\",\n    \"results\": {\n        \"survey_accoglienza\": {\n            \"count\": 5112\n        },\n        \"survey_uffici\": {\n            \"count\": 2451\n        },\n        \"totali\": {\n            \"count\": 7563\n        }\n    }\n}"}],"_postman_id":"6582cfb2-1eb4-4ab2-9508-8fe0744ffff1"},{"name":"/fetch","id":"e0a9b3ba-4ced-4678-baa5-9b247bbe2719","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"survey\" : {{survey_id}},\n\t\"page\" : 1,\n\t\"filters\":{},\n\t\"sort\" : {\n\t\t\"server_timestamp\" : \"desc\"\n\t}\n}"},"url":"https://api.intoway.net/v2/query/fetch","description":"<p>Grazie a questa query è possibile estrarre tutte le sessioni raccolte dai propri terminali, siano esse valide oppure no.\nIl limite di documenti inviati nella risposta é di 1000. Per questo tale query restituisce all'interno della richiesta le informazioni di paginazione che permettono di estrarre sequenzialmente tutti i dati.\nI parametri della richiesta sono:</p>\n<ul>\n<li><strong>survey</strong> <code>int</code> (obbligatorio) definisce il survey da cui estrarre i dati</li>\n<li><strong>page</strong> <code>int</code> (facoltativo default 1) definisce la pagina di estrazione, per database con più di 1000 documenti.</li>\n<li><strong>paginator_token</strong> <code>string</code> (facoltativo) per estrarre dati in modalità \"<strong>snapshot</strong>\", vedi la spiegazione di seguito</li>\n<li><strong>filters</strong> <code>object</code> (facoltativo)</li>\n<li><strong>sort</strong> <code>object</code> (facoltativo) definisce il criterio di ordinamento. Di default è <code>\"sort\" : {\"server_timestamp\" : \"desc\"}</code>. I campi ordinabili sono <code>server_timestamp</code> ovvero il timestamp di arrivo della sessione sul server o <code>timestamp</code> il timestamp di registrazione della sessione sul terminale. I criteri di ordinamento sono gli standard <code>asc</code> o <code>desc</code>.</li>\n</ul>\n<h5 id=\"modalità-snapshot\">Modalità snapshot</h5>\n<p>Durante l'estrazione dei dati paginati, (quindi tramite richieste multiple che possono richiedere molto tempo) é facile che possano entrare nuovi dati nel database e sfalsare le richieste successive. Ordinando per <code>\"server_timestamp\" : \"asc\"</code> ciò è meno problematico poichè le eventuali nuove sessioni apparirebbero nell'ultima pagina, oppure verrebbero create nuove pagine.</p>\n<p>Il problema sorgerebbe qualora il criterio utilizzato fosse <code>desc</code>. Infatti, qualora entrasse un nuovo dato tra la lettura della prima pagina e la lettura della seconda, tutti i risultati slitterebbero di una posizione e ritroveremmo una sessione già \"vista\" all'interno della seconda pagina.\nIn tutti i casi, per evitare che lo stato del database \"cambi\" tra una richiesta e l'altra, é possibile utilizzare il <strong>paginator_token</strong>, un campo che viene sempre restituito dal server.\nUtilizzando tale valore come parametro delle chiamate successive, il server non includerà alcuna sessione entrata successivamente alla prima richiesta.\nIl <strong>paginator_token</strong> è eterno. In qualsiasi momento futuro venga utilizzato riprodurrà lo stesso stato del database, a eccezione di eventuali dati rimossi o modificati.</p>\n<h5 id=\"cosigli-per-export-periodici\">Cosigli per export periodici</h5>\n<p>Qualora l'intenzione fosse quella di esportare periodicamente i dati, al fine di creare un \"<strong>mirror</strong>\" su un proprio database, é consigliabile implementare tale processo in modalità incrementale.</p>\n<p>Come prima cosa utilizzare un ordinamento crescente per server_timestamp:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>\"sort\" : {\n    \"server_timestamp\" : \"asc\"  \n}\n</code></pre><p>È preferibile l'utilizzo di <strong>server_timestamp</strong> rispetto a <strong>timestamp</strong>, poichè eventuali vecchie sessioni, rimaste sui display e non inviate, si aggiungerebbero in coda al database invece che nel mezzo.</p>\n<p>Registrare quindi l'ultimo <strong>id</strong> importato nel proprio database, ovvero l'ultima sessione all'interno dell'ultima pagina.</p>\n<p>Ora poichè l'id é un valore ordinato, sarà sufficiente applicare un semplice filtro per ottenere solo i documenti non ancora scaricati:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>\"filters\" : {\n    \"id\" : {\n        \"&gt;\" : \"ilMioUltimoIDRegistrato\"\n    }\n},\n\"sort\" : {\n    \"server_time\" : \"asc\"   \n}\n</code></pre><p>Questa modalità risulterà molto piú efficiente e veloce, e potrà essere utilizzata, piú spesso, anche per creare un mirroring quasi in real time senza incorrere in blocchi per troppe richieste.</p>\n","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"<username>"},{"key":"password","value":"<password>"}]},"isInherited":true,"source":{"_postman_id":"7c9fe0ce-9889-4349-b24d-0f876a89f7f9","id":"7c9fe0ce-9889-4349-b24d-0f876a89f7f9","name":"Metodi","type":"folder"}},"urlObject":{"protocol":"https","path":["v2","query","fetch"],"host":["api","intoway","net"],"query":[],"variable":[]}},"response":[{"id":"e79ca458-9b60-498b-8dbe-0efe822ca1c2","name":"Example 1","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Basic SzEyMzQ6c2VjcmV0"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"survey\" : 1596,\n\t\"page\" : 1,\n\t\"filters\":{\n\t\t\"bucket\" : 101\n\t},\n\t\"sort\" : {\n\t\t\"server_timestamp\" : \"desc\"\n\t}\n}"},"url":"https://api.intoway.net/v2/query/fetch"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"origin, x-requested-with, content-type","name":"Access-Control-Allow-Headers","description":"Used in response to a preflight request to indicate which HTTP headers can be used when making the actual request."},{"key":"Access-Control-Allow-Headers","value":"X-AUTH-TOKEN, X-INTOWAY-NetSource, X-INTOWAY-ResponseFormat","name":"Access-Control-Allow-Headers","description":"Used in response to a preflight request to indicate which HTTP headers can be used when making the actual request."},{"key":"Access-Control-Allow-Methods","value":"PUT, GET, POST, DELETE, OPTIONS","name":"Access-Control-Allow-Methods","description":"Specifies the method or methods allowed when accessing the resource. This is used in response to a preflight request."},{"key":"Access-Control-Allow-Origin","value":"*","name":"Access-Control-Allow-Origin","description":"Specifies a URI that may access the resource. For requests without credentials, the server may specify '*' as a wildcard, thereby allowing any origin to access the resource."},{"key":"Connection","value":"Keep-Alive","name":"Connection","description":"Options that are desired for the connection"},{"key":"Content-Length","value":"2073","name":"Content-Length","description":"The length of the response body in octets (8-bit bytes)"},{"key":"Content-Type","value":"application/json; charset=utf-8","name":"Content-Type","description":"The mime type of this content"},{"key":"Date","value":"Sat, 29 Sep 2018 15:57:55 GMT","name":"Date","description":"The date and time that the message was sent"},{"key":"Keep-Alive","value":"timeout=5, max=100","name":"Keep-Alive","description":"Custom header"},{"key":"Server","value":"Apache/2.4.25 (Debian)","name":"Server","description":"A name for the server"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"ok\",\n    \"result\": {\n        \"page\": 1,\n        \"next_page\": 2,\n        \"previous_page\": null,\n        \"count_pages\": 3,\n        \"count\": 2088,\n        \"count_this\": 1000,\n        \"paginator_token\": \"5b88129b82c5005a882faca2\",\n        \"documents\": [\n            {\n                \"id\": \"5b88129b82c5005a882faca2\",\n                \"timestamp\": \"2018-08-30T09:22:23+0000\",\n                \"timezone\": \"Europe/Brussels\",\n                \"bucket\": 101,\n                \"data\": {\n                    \"988\": 3,\n                    \"989\": 4,\n                    \"990\": \"si\",\n                    \"991\": 9,\n                    \"992\": \"Siete stati molto professionali\"\n                },\n                \"meta\": {\n                    \"valid\": true,\n                    \"abandoned\": null,\n                    \"vss_na\": null,\n                    \"vss_na_for\": null,\n                    \"biometric\": null\n                }\n            },\n            {\n                \"id\": \"5b88129782c5005a67267b22\",\n                \"timestamp\": \"2018-08-30T08:36:58+0000\",\n                \"timezone\": \"Europe/Brussels\",\n                \"bucket\": 101,\n                \"data\": {\n                \t\"988\": 1,\n                    \"989\": 2,\n                    \"990\": \"no\",\n                    \"991\": 3,\n                    \"992\": \"impiegato molto scortese\"\n                },\n                \"meta\": {\n                    \"valid\": true,\n                    \"abandoned\": null,\n                    \"vss_na\": null,\n                    \"vss_na_for\": null,\n                    \"biometric\": null\n                }\n            },\n            {\n                \"id\": \"5b86af4782c50057c82072d2\",\n                \"timestamp\": \"2018-08-29T14:35:48+0000\",\n                \"timezone\": \"Europe/Brussels\",\n                \"bucket\": 101,\n                \"data\": {\n                    \"988\": 3,\n                    \"989\": 4,\n                    \"990\": \"si\"\n                },\n                \"meta\": {\n                    \"valid\": false,\n                    \"abandoned\": 991,\n                    \"vss_na\": null,\n                    \"vss_na_for\": null,\n                    \"biometric\": null\n                }\n            },\n            \"others 997 documents ...\"\n        ]\n    }\n}"}],"_postman_id":"e0a9b3ba-4ced-4678-baa5-9b247bbe2719"},{"name":"/fetch/csv","id":"e1b54671-b994-4162-a8e3-cac9f804f55d","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"survey\" : {{survey_id}},\n\t\"page\" : 1,\n\t\"filters\":{},\n\t\"sort\" : {\n\t\t\"server_timestamp\" : \"desc\"\n\t}\n}"},"url":"https://api.intoway.net/v2/query/fetch/csv","description":"<p>Questa query è concettualmente uguale alla standard con l'unica differenza che l'output è un csv, la cui prima riga indica il nome dei campi, conformi alla nomenclatura standard.</p>\n<p>Poichè il csv non può contenere campi informativi aggiuntivi a quelli della struttura, il paginator token quando presente viene passato tramite l'header di risposta:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>Paginator-Token: string\n</code></pre><p>Per quanto riguarda gli altri campi di paginazione invece non sono disponibili per questa richiesta, seppure la paginazione tramite il campo <code>\"page\" : int</code> funzioni allo stesso modo.\nQuesto perchè la risposta csv è pensata per \"scaricare\" i dati massivamente, più che per consultarli tramite un applicativo interattivo, per cui è sufficiente avanzare di pagina progressivamente finchè il csv di risposta non è vuoto o con meno di 1000 righe utili.\nResta tuttavia funzionale il paginator token per garantire la coerenza dei dati</p>\n","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"<username>"},{"key":"password","value":"<password>"}]},"isInherited":true,"source":{"_postman_id":"7c9fe0ce-9889-4349-b24d-0f876a89f7f9","id":"7c9fe0ce-9889-4349-b24d-0f876a89f7f9","name":"Metodi","type":"folder"}},"urlObject":{"protocol":"https","path":["v2","query","fetch","csv"],"host":["api","intoway","net"],"query":[],"variable":[]}},"response":[{"id":"0e9aabff-1bc4-45de-8356-2bb9918623dc","name":"Example 1","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Basic SzEyMzQ6c2VjcmV0"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"survey\" : {{survey_id}},\n\t\"page\" : 1,\n\t\"filters\":{},\n\t\"sort\" : {\n\t\t\"server_timestamp\" : \"desc\"\n\t}\n}"},"url":"https://api.intoway.net/v2/query/fetch/csv"},"status":"OK","code":200,"_postman_previewlanguage":"plain","header":[{"key":"Access-Control-Allow-Headers","value":"origin, x-requested-with, content-type","name":"Access-Control-Allow-Headers","description":"Used in response to a preflight request to indicate which HTTP headers can be used when making the actual request."},{"key":"Access-Control-Allow-Headers","value":"X-AUTH-TOKEN, X-INTOWAY-NetSource, X-INTOWAY-ResponseFormat","name":"Access-Control-Allow-Headers","description":"Used in response to a preflight request to indicate which HTTP headers can be used when making the actual request."},{"key":"Access-Control-Allow-Methods","value":"PUT, GET, POST, DELETE, OPTIONS","name":"Access-Control-Allow-Methods","description":"Specifies the method or methods allowed when accessing the resource. This is used in response to a preflight request."},{"key":"Access-Control-Allow-Origin","value":"*","name":"Access-Control-Allow-Origin","description":"Specifies a URI that may access the resource. For requests without credentials, the server may specify '*' as a wildcard, thereby allowing any origin to access the resource."},{"key":"Connection","value":"Keep-Alive","name":"Connection","description":"Options that are desired for the connection"},{"key":"Content-Disposition","value":"attachment; filename=\"export.csv\"","name":"Content-Disposition","description":"An opportunity to raise a \"File Download\" dialogue box for a known MIME type"},{"key":"Content-Length","value":"1768","name":"Content-Length","description":"The length of the response body in octets (8-bit bytes)"},{"key":"Content-Type","value":"text/csv;charset=UTF-8","name":"Content-Type","description":"The mime type of this content"},{"key":"Date","value":"Sun, 30 Sep 2018 14:06:00 GMT","name":"Date","description":"The date and time that the message was sent"},{"key":"Keep-Alive","value":"timeout=5, max=100","name":"Keep-Alive","description":"Custom header"},{"key":"Paginator-Token","value":"5b8812bf82c5005aa67680e2","name":"Paginator-Token","description":"Custom header"},{"key":"Server","value":"Apache/2.4.25 (Debian)","name":"Server","description":"A name for the server"}],"cookie":[],"responseTime":null,"body":"id,bucket,timestamp,timezone,data:988,data:989,data:990,data:991,data:992,meta:valid,meta:abandoned,meta:vss_na,meta:vss_na_for,meta:face_id,meta:biometric_age,meta:biometric_gender\n5b88129b82c5005a882faca2,101,2018-08-30T09:22:23+0000,Europe/Brussels,3,4,si,9,Siete stati molto professionali,1,1,,,,,,\n5b8812ba82c5005aa0766cf2,101,2018-08-30T15:42:28+0000,Europe/Brussels,1,2,no,3,1,,,,,,\n5b8812a782c5005a67267b23,101,2018-08-30T10:04:00+0000,Europe/Brussels,3,4,si,,,991,,,,,\n...others 997 documents..."}],"_postman_id":"e1b54671-b994-4162-a8e3-cac9f804f55d"}],"id":"804b4bcb-60f0-492a-94b5-b4b991c72c18","event":[{"listen":"prerequest","script":{"id":"8cac1273-bdb4-43d2-ab28-3a12c924b07d","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"f06abbc9-d989-4f5e-886e-a1525dcf9927","type":"text/javascript","exec":[""]}}],"_postman_id":"804b4bcb-60f0-492a-94b5-b4b991c72c18","description":"","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"<username>"},{"key":"password","value":"<password>"}]},"isInherited":true,"source":{"_postman_id":"7c9fe0ce-9889-4349-b24d-0f876a89f7f9","id":"7c9fe0ce-9889-4349-b24d-0f876a89f7f9","name":"Metodi","type":"folder"}}},{"name":"Problems","item":[],"id":"7d6b4afb-d022-435c-ac80-e54db9f6882f","description":"<p>Per eventuali problemi, o malfunzionamenti, riportare l'errore a: <a href=\"mailto:support@intoway.net\">support@intoway.net</a>. Per favore allegare più informazioni possibile.</p>\n","event":[{"listen":"prerequest","script":{"id":"3ea1b4d8-a82c-4bd7-901c-a43f165fbdc8","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"11a554a2-a272-4f53-b8ad-21dc5960a448","type":"text/javascript","exec":[""]}}],"_postman_id":"7d6b4afb-d022-435c-ac80-e54db9f6882f","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"<username>"},{"key":"password","value":"<password>"}]},"isInherited":true,"source":{"_postman_id":"7c9fe0ce-9889-4349-b24d-0f876a89f7f9","id":"7c9fe0ce-9889-4349-b24d-0f876a89f7f9","name":"Metodi","type":"folder"}}}],"id":"7c9fe0ce-9889-4349-b24d-0f876a89f7f9","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"<username>"},{"key":"password","value":"<password>"}]},"isInherited":false},"event":[{"listen":"prerequest","script":{"id":"0d24545e-6664-47f1-8dcc-f6a51d434044","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"c8aec267-fbec-487f-9621-9cbdacd1bb0b","type":"text/javascript","exec":[""]}}],"_postman_id":"7c9fe0ce-9889-4349-b24d-0f876a89f7f9","description":""}],"event":[{"listen":"prerequest","script":{"id":"2b28362a-8a26-401b-aabc-7407dc3f8ed1","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"321cf69a-2792-46ad-99fd-f06dc6366235","type":"text/javascript","exec":[""]}}]}