From c7c592b12d45d04e764bb7bf6c5807a45469a5c7 Mon Sep 17 00:00:00 2001 From: eduard93 Date: Wed, 25 Jan 2017 22:38:38 +0300 Subject: [PATCH] Add Postman collection and environment --- CACHE.postman_environment.json | 40 ++ MDX2JSON.postman_collection.json | 925 +++++++++++++++++++++++++++++++ README.md | 13 +- 3 files changed, 976 insertions(+), 2 deletions(-) create mode 100644 CACHE.postman_environment.json create mode 100644 MDX2JSON.postman_collection.json diff --git a/CACHE.postman_environment.json b/CACHE.postman_environment.json new file mode 100644 index 0000000..74fd191 --- /dev/null +++ b/CACHE.postman_environment.json @@ -0,0 +1,40 @@ +{ + "id": "f50753eb-56ac-9c48-7516-2731bc324c72", + "name": "CACHE@localhost", + "values": [ + { + "key": "host", + "value": "localhost", + "type": "text", + "enabled": true + }, + { + "key": "port", + "value": "57772", + "type": "text", + "enabled": true + }, + { + "key": "ns", + "value": "SAMPLES", + "type": "text", + "enabled": true + }, + { + "key": "user", + "value": "_SYSTEM", + "type": "text", + "enabled": true + }, + { + "key": "pass", + "value": "SYS", + "type": "text", + "enabled": true + } + ], + "timestamp": 1485372526371, + "_postman_variable_scope": "environment", + "_postman_exported_at": "2017-01-25T19:36:53.787Z", + "_postman_exported_using": "Postman/4.9.3" +} \ No newline at end of file diff --git a/MDX2JSON.postman_collection.json b/MDX2JSON.postman_collection.json new file mode 100644 index 0000000..8d34dd8 --- /dev/null +++ b/MDX2JSON.postman_collection.json @@ -0,0 +1,925 @@ +{ + "variables": [], + "info": { + "name": "MDX2JSON", + "_postman_id": "4f4197a2-af94-b40d-5797-352848f70631", + "description": "A collection to query MDX2JSON REST API", + "schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json" + }, + "item": [ + { + "name": "Test", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests[\"response code is 401\"] = responseCode.code === 401;", + "tests[\"response has WWW-Authenticate header\"] = (postman.getResponseHeader('WWW-Authenticate'));", + "", + "var authenticateHeader = postman.getResponseHeader('WWW-Authenticate'),", + " realmStart = authenticateHeader.indexOf('\"',authenticateHeader.indexOf(\"realm\")) + 1 ,", + " realmEnd = authenticateHeader.indexOf('\"',realmStart),", + " realm = authenticateHeader.slice(realmStart,realmEnd),", + " nonceStart = authenticateHeader.indexOf('\"',authenticateHeader.indexOf(\"nonce\")) + 1,", + " nonceEnd = authenticateHeader.indexOf('\"',nonceStart),", + " nonce = authenticateHeader.slice(nonceStart,nonceEnd);", + " ", + "postman.setGlobalVariable('echo_digest_realm', realm);", + "postman.setGlobalVariable('echo_digest_nonce', nonce);" + ] + } + } + ], + "request": { + "auth": { + "type": "basic", + "basic": { + "username": "{{user}}", + "password": "{{pass}}", + "saveHelperData": true, + "showPassword": false + } + }, + "url": "http://{{host}}:{{port}}/MDX2JSON/Test?Namespace={{ns}}", + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "Basic e3t1c2VyfX06e3twYXNzfX0=", + "description": "" + } + ], + "body": {}, + "description": "Test information. Add Debug url param for more information" + }, + "response": [] + }, + { + "name": "Format", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests[\"response code is 401\"] = responseCode.code === 401;", + "tests[\"response has WWW-Authenticate header\"] = (postman.getResponseHeader('WWW-Authenticate'));", + "", + "var authenticateHeader = postman.getResponseHeader('WWW-Authenticate'),", + " realmStart = authenticateHeader.indexOf('\"',authenticateHeader.indexOf(\"realm\")) + 1 ,", + " realmEnd = authenticateHeader.indexOf('\"',realmStart),", + " realm = authenticateHeader.slice(realmStart,realmEnd),", + " nonceStart = authenticateHeader.indexOf('\"',authenticateHeader.indexOf(\"nonce\")) + 1,", + " nonceEnd = authenticateHeader.indexOf('\"',nonceStart),", + " nonce = authenticateHeader.slice(nonceStart,nonceEnd);", + " ", + "postman.setGlobalVariable('echo_digest_realm', realm);", + "postman.setGlobalVariable('echo_digest_nonce', nonce);" + ] + } + } + ], + "request": { + "auth": { + "type": "basic", + "basic": { + "username": "{{user}}", + "password": "{{pass}}", + "saveHelperData": true, + "showPassword": false + } + }, + "url": "http://{{host}}:{{port}}/MDX2JSON/Format?Namespace={{ns}}", + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "Basic e3t1c2VyfX06e3twYXNzfX0=", + "description": "" + } + ], + "body": {}, + "description": "Default formatting values for this system" + }, + "response": [] + }, + { + "name": "Dashboards", + "request": { + "auth": { + "type": "basic", + "basic": { + "username": "{{user}}", + "password": "{{pass}}", + "saveHelperData": true, + "showPassword": false + } + }, + "url": "http://{{host}}:{{port}}/MDX2JSON/Dashboards?Namespace={{ns}}", + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "Basic e3t1c2VyfX06e3twYXNzfX0=", + "description": "" + } + ], + "body": {}, + "description": "Get a list of dashboards" + }, + "response": [] + }, + { + "name": "Dashboard", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests[\"response code is 401\"] = responseCode.code === 401;", + "tests[\"response has WWW-Authenticate header\"] = (postman.getResponseHeader('WWW-Authenticate'));", + "", + "var authenticateHeader = postman.getResponseHeader('WWW-Authenticate'),", + " realmStart = authenticateHeader.indexOf('\"',authenticateHeader.indexOf(\"realm\")) + 1 ,", + " realmEnd = authenticateHeader.indexOf('\"',realmStart),", + " realm = authenticateHeader.slice(realmStart,realmEnd),", + " nonceStart = authenticateHeader.indexOf('\"',authenticateHeader.indexOf(\"nonce\")) + 1,", + " nonceEnd = authenticateHeader.indexOf('\"',nonceStart),", + " nonce = authenticateHeader.slice(nonceStart,nonceEnd);", + " ", + "postman.setGlobalVariable('echo_digest_realm', realm);", + "postman.setGlobalVariable('echo_digest_nonce', nonce);" + ] + } + } + ], + "request": { + "auth": { + "type": "basic", + "basic": { + "username": "{{user}}", + "password": "{{pass}}", + "saveHelperData": true, + "showPassword": false + } + }, + "url": "http://{{host}}:{{port}}/MDX2JSON/Dashboard?Namespace={{ns}}", + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "Authorization", + "value": "Basic e3t1c2VyfX06e3twYXNzfX0=", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"Dashboard\":\"Widget Examples/All Charts.dashboard\"\n}" + }, + "description": "Get information about dashboard. Returns all widgets in a dashboard, with filters as part of dashboard" + }, + "response": [] + }, + { + "name": "Widgets", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests[\"response code is 401\"] = responseCode.code === 401;", + "tests[\"response has WWW-Authenticate header\"] = (postman.getResponseHeader('WWW-Authenticate'));", + "", + "var authenticateHeader = postman.getResponseHeader('WWW-Authenticate'),", + " realmStart = authenticateHeader.indexOf('\"',authenticateHeader.indexOf(\"realm\")) + 1 ,", + " realmEnd = authenticateHeader.indexOf('\"',realmStart),", + " realm = authenticateHeader.slice(realmStart,realmEnd),", + " nonceStart = authenticateHeader.indexOf('\"',authenticateHeader.indexOf(\"nonce\")) + 1,", + " nonceEnd = authenticateHeader.indexOf('\"',nonceStart),", + " nonce = authenticateHeader.slice(nonceStart,nonceEnd);", + " ", + "postman.setGlobalVariable('echo_digest_realm', realm);", + "postman.setGlobalVariable('echo_digest_nonce', nonce);" + ] + } + } + ], + "request": { + "auth": { + "type": "basic", + "basic": { + "username": "{{user}}", + "password": "{{pass}}", + "saveHelperData": true, + "showPassword": false + } + }, + "url": "http://{{host}}:{{port}}/MDX2JSON/Widgets?Namespace={{ns}}", + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "Authorization", + "value": "Basic e3t1c2VyfX06e3twYXNzfX0=", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"Dashboard\":\"Widget Examples/All Charts.dashboard\"\n}" + }, + "description": "Get information about dashboard. Returns all widgets in a dashboard, with filters as part of widgets." + }, + "response": [] + }, + { + "name": "DataSource", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests[\"response code is 401\"] = responseCode.code === 401;", + "tests[\"response has WWW-Authenticate header\"] = (postman.getResponseHeader('WWW-Authenticate'));", + "", + "var authenticateHeader = postman.getResponseHeader('WWW-Authenticate'),", + " realmStart = authenticateHeader.indexOf('\"',authenticateHeader.indexOf(\"realm\")) + 1 ,", + " realmEnd = authenticateHeader.indexOf('\"',realmStart),", + " realm = authenticateHeader.slice(realmStart,realmEnd),", + " nonceStart = authenticateHeader.indexOf('\"',authenticateHeader.indexOf(\"nonce\")) + 1,", + " nonceEnd = authenticateHeader.indexOf('\"',nonceStart),", + " nonce = authenticateHeader.slice(nonceStart,nonceEnd);", + " ", + "postman.setGlobalVariable('echo_digest_realm', realm);", + "postman.setGlobalVariable('echo_digest_nonce', nonce);" + ] + } + } + ], + "request": { + "auth": { + "type": "basic", + "basic": { + "username": "{{user}}", + "password": "{{pass}}", + "saveHelperData": true, + "showPassword": false + } + }, + "url": "http://{{host}}:{{port}}/MDX2JSON/DataSource?Namespace={{ns}}", + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "Authorization", + "value": "Basic e3t1c2VyfX06e3twYXNzfX0=", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"DataSource\":\"Chart Demos/Bar Chart.pivot\"\n}" + }, + "description": "Information about pivot" + }, + "response": [] + }, + { + "name": "MDX", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests[\"response code is 401\"] = responseCode.code === 401;", + "tests[\"response has WWW-Authenticate header\"] = (postman.getResponseHeader('WWW-Authenticate'));", + "", + "var authenticateHeader = postman.getResponseHeader('WWW-Authenticate'),", + " realmStart = authenticateHeader.indexOf('\"',authenticateHeader.indexOf(\"realm\")) + 1 ,", + " realmEnd = authenticateHeader.indexOf('\"',realmStart),", + " realm = authenticateHeader.slice(realmStart,realmEnd),", + " nonceStart = authenticateHeader.indexOf('\"',authenticateHeader.indexOf(\"nonce\")) + 1,", + " nonceEnd = authenticateHeader.indexOf('\"',nonceStart),", + " nonce = authenticateHeader.slice(nonceStart,nonceEnd);", + " ", + "postman.setGlobalVariable('echo_digest_realm', realm);", + "postman.setGlobalVariable('echo_digest_nonce', nonce);" + ] + } + } + ], + "request": { + "auth": { + "type": "basic", + "basic": { + "username": "{{user}}", + "password": "{{pass}}", + "saveHelperData": true, + "showPassword": false + } + }, + "url": "http://{{host}}:{{port}}/MDX2JSON/MDX?Namespace={{ns}}", + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "Authorization", + "value": "Basic e3t1c2VyfX06e3twYXNzfX0=", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"MDX\":\"SELECT FROM [HOLEFOODS]\"\n}" + }, + "description": "Execute MDX query and get results in JSON" + }, + "response": [] + }, + { + "name": "MDXDrillthrough", + "request": { + "auth": { + "type": "basic", + "basic": { + "username": "{{user}}", + "password": "{{pass}}", + "saveHelperData": true, + "showPassword": false + } + }, + "url": "http://{{host}}:{{port}}/MDX2JSON/MDXDrillthrough?Namespace={{ns}}", + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "Authorization", + "value": "Basic e3t1c2VyfX06e3twYXNzfX0=", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"MDX\":\"DRILLTHROUGH SELECT FROM [HOLEFOODS]\"\n}" + }, + "description": "Execute MDX Drillthrough query and get results as JSON" + }, + "response": [] + }, + { + "name": "Filters", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests[\"response code is 401\"] = responseCode.code === 401;", + "tests[\"response has WWW-Authenticate header\"] = (postman.getResponseHeader('WWW-Authenticate'));", + "", + "var authenticateHeader = postman.getResponseHeader('WWW-Authenticate'),", + " realmStart = authenticateHeader.indexOf('\"',authenticateHeader.indexOf(\"realm\")) + 1 ,", + " realmEnd = authenticateHeader.indexOf('\"',realmStart),", + " realm = authenticateHeader.slice(realmStart,realmEnd),", + " nonceStart = authenticateHeader.indexOf('\"',authenticateHeader.indexOf(\"nonce\")) + 1,", + " nonceEnd = authenticateHeader.indexOf('\"',nonceStart),", + " nonce = authenticateHeader.slice(nonceStart,nonceEnd);", + " ", + "postman.setGlobalVariable('echo_digest_realm', realm);", + "postman.setGlobalVariable('echo_digest_nonce', nonce);" + ] + } + } + ], + "request": { + "auth": { + "type": "basic", + "basic": { + "username": "{{user}}", + "password": "{{pass}}", + "saveHelperData": true, + "showPassword": false + } + }, + "url": "http://{{host}}:{{port}}/MDX2JSON/Filters?Namespace={{ns}}", + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "Authorization", + "value": "Basic e3t1c2VyfX06e3twYXNzfX0=", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"DataSource\":\"HOLEFOODS.cube\",\n\t\"Values\": 1,\n\t\"Search\":\"North\"\n}" + }, + "description": "All filters for DeepSee DataSource (cube, pivot, kpi, metric) with values (if Values = 1, set to 0 or omit otherwise). If Search is not empty only filter values, containing search term would be returned." + }, + "response": [] + }, + { + "name": "TermList", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests[\"response code is 401\"] = responseCode.code === 401;", + "tests[\"response has WWW-Authenticate header\"] = (postman.getResponseHeader('WWW-Authenticate'));", + "", + "var authenticateHeader = postman.getResponseHeader('WWW-Authenticate'),", + " realmStart = authenticateHeader.indexOf('\"',authenticateHeader.indexOf(\"realm\")) + 1 ,", + " realmEnd = authenticateHeader.indexOf('\"',realmStart),", + " realm = authenticateHeader.slice(realmStart,realmEnd),", + " nonceStart = authenticateHeader.indexOf('\"',authenticateHeader.indexOf(\"nonce\")) + 1,", + " nonceEnd = authenticateHeader.indexOf('\"',nonceStart),", + " nonce = authenticateHeader.slice(nonceStart,nonceEnd);", + " ", + "postman.setGlobalVariable('echo_digest_realm', realm);", + "postman.setGlobalVariable('echo_digest_nonce', nonce);" + ] + } + } + ], + "request": { + "auth": { + "type": "basic", + "basic": { + "username": "{{user}}", + "password": "{{pass}}", + "saveHelperData": true, + "showPassword": false + } + }, + "url": "http://{{host}}:{{port}}/MDX2JSON/TermList?Namespace={{ns}}", + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "Authorization", + "value": "Basic e3t1c2VyfX06e3twYXNzfX0=", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"TermList\":\"Region Colors\"\n}" + }, + "description": "Termlist key-value array" + }, + "response": [] + }, + { + "name": "Action/:cube/:action", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests[\"response code is 401\"] = responseCode.code === 401;", + "tests[\"response has WWW-Authenticate header\"] = (postman.getResponseHeader('WWW-Authenticate'));", + "", + "var authenticateHeader = postman.getResponseHeader('WWW-Authenticate'),", + " realmStart = authenticateHeader.indexOf('\"',authenticateHeader.indexOf(\"realm\")) + 1 ,", + " realmEnd = authenticateHeader.indexOf('\"',realmStart),", + " realm = authenticateHeader.slice(realmStart,realmEnd),", + " nonceStart = authenticateHeader.indexOf('\"',authenticateHeader.indexOf(\"nonce\")) + 1,", + " nonceEnd = authenticateHeader.indexOf('\"',nonceStart),", + " nonce = authenticateHeader.slice(nonceStart,nonceEnd);", + " ", + "postman.setGlobalVariable('echo_digest_realm', realm);", + "postman.setGlobalVariable('echo_digest_nonce', nonce);" + ] + } + } + ], + "request": { + "auth": { + "type": "basic", + "basic": { + "username": "{{user}}", + "password": "{{pass}}", + "saveHelperData": true, + "showPassword": false + } + }, + "url": "http://{{host}}:{{port}}/MDX2JSON/Action/HOLEFOODS/ActionA?Namespace={{ns}}", + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "Authorization", + "value": "Basic e3t1c2VyfX06e3twYXNzfX0=", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"Propety\":\"Value\"\n}" + }, + "description": "Execute custom cube action. \n\nBody should be a valid JSON. It is converted into dynamic object and passed as a second argument to %OnDashboardAction method of custom actions class for a cube. Action name is passed as a first argument." + }, + "response": [] + }, + { + "name": "PivotVariables/:cube", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests[\"response code is 401\"] = responseCode.code === 401;", + "tests[\"response has WWW-Authenticate header\"] = (postman.getResponseHeader('WWW-Authenticate'));", + "", + "var authenticateHeader = postman.getResponseHeader('WWW-Authenticate'),", + " realmStart = authenticateHeader.indexOf('\"',authenticateHeader.indexOf(\"realm\")) + 1 ,", + " realmEnd = authenticateHeader.indexOf('\"',realmStart),", + " realm = authenticateHeader.slice(realmStart,realmEnd),", + " nonceStart = authenticateHeader.indexOf('\"',authenticateHeader.indexOf(\"nonce\")) + 1,", + " nonceEnd = authenticateHeader.indexOf('\"',nonceStart),", + " nonce = authenticateHeader.slice(nonceStart,nonceEnd);", + " ", + "postman.setGlobalVariable('echo_digest_realm', realm);", + "postman.setGlobalVariable('echo_digest_nonce', nonce);" + ] + } + } + ], + "request": { + "auth": { + "type": "basic", + "basic": { + "username": "{{user}}", + "password": "{{pass}}", + "saveHelperData": true, + "showPassword": false + } + }, + "url": "http://{{host}}:{{port}}/MDX2JSON/PivotVariables/HOLEFOODS?Namespace={{ns}}", + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "Basic e3t1c2VyfX06e3twYXNzfX0=", + "description": "" + } + ], + "body": {}, + "description": "Get all pivot variables for cube. \nDon't forget to provide cube name." + }, + "response": [] + }, + { + "name": "Favorites", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests[\"response code is 401\"] = responseCode.code === 401;", + "tests[\"response has WWW-Authenticate header\"] = (postman.getResponseHeader('WWW-Authenticate'));", + "", + "var authenticateHeader = postman.getResponseHeader('WWW-Authenticate'),", + " realmStart = authenticateHeader.indexOf('\"',authenticateHeader.indexOf(\"realm\")) + 1 ,", + " realmEnd = authenticateHeader.indexOf('\"',realmStart),", + " realm = authenticateHeader.slice(realmStart,realmEnd),", + " nonceStart = authenticateHeader.indexOf('\"',authenticateHeader.indexOf(\"nonce\")) + 1,", + " nonceEnd = authenticateHeader.indexOf('\"',nonceStart),", + " nonce = authenticateHeader.slice(nonceStart,nonceEnd);", + " ", + "postman.setGlobalVariable('echo_digest_realm', realm);", + "postman.setGlobalVariable('echo_digest_nonce', nonce);" + ] + } + } + ], + "request": { + "auth": { + "type": "basic", + "basic": { + "username": "{{user}}", + "password": "{{pass}}", + "saveHelperData": true, + "showPassword": false + } + }, + "url": "http://{{host}}:{{port}}/MDX2JSON/Favorites?Namespace={{ns}}", + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "Basic e3t1c2VyfX06e3twYXNzfX0=", + "description": "" + } + ], + "body": {}, + "description": "Current user favorites" + }, + "response": [] + }, + { + "name": "Favorites/:item", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests[\"response code is 401\"] = responseCode.code === 401;", + "tests[\"response has WWW-Authenticate header\"] = (postman.getResponseHeader('WWW-Authenticate'));", + "", + "var authenticateHeader = postman.getResponseHeader('WWW-Authenticate'),", + " realmStart = authenticateHeader.indexOf('\"',authenticateHeader.indexOf(\"realm\")) + 1 ,", + " realmEnd = authenticateHeader.indexOf('\"',realmStart),", + " realm = authenticateHeader.slice(realmStart,realmEnd),", + " nonceStart = authenticateHeader.indexOf('\"',authenticateHeader.indexOf(\"nonce\")) + 1,", + " nonceEnd = authenticateHeader.indexOf('\"',nonceStart),", + " nonce = authenticateHeader.slice(nonceStart,nonceEnd);", + " ", + "postman.setGlobalVariable('echo_digest_realm', realm);", + "postman.setGlobalVariable('echo_digest_nonce', nonce);" + ] + } + } + ], + "request": { + "auth": { + "type": "basic", + "basic": { + "username": "{{user}}", + "password": "{{pass}}", + "saveHelperData": true, + "showPassword": false + } + }, + "url": "http://{{host}}:{{port}}/MDX2JSON/Favorites/Basic Dashboard Demo.dashboard?Namespace={{ns}}", + "method": "DELETE", + "header": [ + { + "key": "Authorization", + "value": "Basic e3t1c2VyfX06e3twYXNzfX0=", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "Remove item from favorites." + }, + "response": [] + }, + { + "name": "Favorites/:item", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests[\"response code is 401\"] = responseCode.code === 401;", + "tests[\"response has WWW-Authenticate header\"] = (postman.getResponseHeader('WWW-Authenticate'));", + "", + "var authenticateHeader = postman.getResponseHeader('WWW-Authenticate'),", + " realmStart = authenticateHeader.indexOf('\"',authenticateHeader.indexOf(\"realm\")) + 1 ,", + " realmEnd = authenticateHeader.indexOf('\"',realmStart),", + " realm = authenticateHeader.slice(realmStart,realmEnd),", + " nonceStart = authenticateHeader.indexOf('\"',authenticateHeader.indexOf(\"nonce\")) + 1,", + " nonceEnd = authenticateHeader.indexOf('\"',nonceStart),", + " nonce = authenticateHeader.slice(nonceStart,nonceEnd);", + " ", + "postman.setGlobalVariable('echo_digest_realm', realm);", + "postman.setGlobalVariable('echo_digest_nonce', nonce);" + ] + } + } + ], + "request": { + "auth": { + "type": "basic", + "basic": { + "username": "{{user}}", + "password": "{{pass}}", + "saveHelperData": true, + "showPassword": false + } + }, + "url": "http://{{host}}:{{port}}/MDX2JSON/Favorites/Basic Dashboard Demo.dashboard?Namespace={{ns}}", + "method": "POST", + "header": [ + { + "key": "Authorization", + "value": "Basic e3t1c2VyfX06e3twYXNzfX0=", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "Add item to favorites." + }, + "response": [] + }, + { + "name": "Config/:app", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests[\"response code is 401\"] = responseCode.code === 401;", + "tests[\"response has WWW-Authenticate header\"] = (postman.getResponseHeader('WWW-Authenticate'));", + "", + "var authenticateHeader = postman.getResponseHeader('WWW-Authenticate'),", + " realmStart = authenticateHeader.indexOf('\"',authenticateHeader.indexOf(\"realm\")) + 1 ,", + " realmEnd = authenticateHeader.indexOf('\"',realmStart),", + " realm = authenticateHeader.slice(realmStart,realmEnd),", + " nonceStart = authenticateHeader.indexOf('\"',authenticateHeader.indexOf(\"nonce\")) + 1,", + " nonceEnd = authenticateHeader.indexOf('\"',nonceStart),", + " nonce = authenticateHeader.slice(nonceStart,nonceEnd);", + " ", + "postman.setGlobalVariable('echo_digest_realm', realm);", + "postman.setGlobalVariable('echo_digest_nonce', nonce);" + ] + } + } + ], + "request": { + "auth": { + "type": "basic", + "basic": { + "username": "{{user}}", + "password": "{{pass}}", + "saveHelperData": true, + "showPassword": false + } + }, + "url": "http://{{host}}:{{port}}/MDX2JSON/Config/DeepSeeWeb?Namespace={{ns}}", + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "Basic e3t1c2VyfX06e3twYXNzfX0=", + "description": "" + } + ], + "body": {}, + "description": "Infoprmation about current user configuration" + }, + "response": [] + }, + { + "name": "Config", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests[\"response code is 401\"] = responseCode.code === 401;", + "tests[\"response has WWW-Authenticate header\"] = (postman.getResponseHeader('WWW-Authenticate'));", + "", + "var authenticateHeader = postman.getResponseHeader('WWW-Authenticate'),", + " realmStart = authenticateHeader.indexOf('\"',authenticateHeader.indexOf(\"realm\")) + 1 ,", + " realmEnd = authenticateHeader.indexOf('\"',realmStart),", + " realm = authenticateHeader.slice(realmStart,realmEnd),", + " nonceStart = authenticateHeader.indexOf('\"',authenticateHeader.indexOf(\"nonce\")) + 1,", + " nonceEnd = authenticateHeader.indexOf('\"',nonceStart),", + " nonce = authenticateHeader.slice(nonceStart,nonceEnd);", + " ", + "postman.setGlobalVariable('echo_digest_realm', realm);", + "postman.setGlobalVariable('echo_digest_nonce', nonce);" + ] + } + } + ], + "request": { + "auth": { + "type": "basic", + "basic": { + "username": "{{user}}", + "password": "{{pass}}", + "saveHelperData": true, + "showPassword": false + } + }, + "url": "http://{{host}}:{{port}}/MDX2JSON/Config?Namespace={{ns}}", + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "Authorization", + "value": "Basic e3t1c2VyfX06e3twYXNzfX0=", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"Application\":\"DeepSeeWeb\", \n\t\"Config\":\"123\"\n}" + }, + "description": "Modify information about current user configuration.\nModifying DeepSeeWeb config to some random value may break it for user. " + }, + "response": [] + }, + { + "name": "Logout", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests[\"response code is 401\"] = responseCode.code === 401;", + "tests[\"response has WWW-Authenticate header\"] = (postman.getResponseHeader('WWW-Authenticate'));", + "", + "var authenticateHeader = postman.getResponseHeader('WWW-Authenticate'),", + " realmStart = authenticateHeader.indexOf('\"',authenticateHeader.indexOf(\"realm\")) + 1 ,", + " realmEnd = authenticateHeader.indexOf('\"',realmStart),", + " realm = authenticateHeader.slice(realmStart,realmEnd),", + " nonceStart = authenticateHeader.indexOf('\"',authenticateHeader.indexOf(\"nonce\")) + 1,", + " nonceEnd = authenticateHeader.indexOf('\"',nonceStart),", + " nonce = authenticateHeader.slice(nonceStart,nonceEnd);", + " ", + "postman.setGlobalVariable('echo_digest_realm', realm);", + "postman.setGlobalVariable('echo_digest_nonce', nonce);" + ] + } + } + ], + "request": { + "auth": { + "type": "basic", + "basic": { + "username": "{{user}}", + "password": "{{pass}}", + "saveHelperData": true, + "showPassword": false + } + }, + "url": "http://{{host}}:{{port}}/MDX2JSON/Logout", + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "Basic e3t1c2VyfX06e3twYXNzfX0=", + "description": "" + } + ], + "body": {}, + "description": "Logout. Close session." + }, + "response": [] + } + ] +} \ No newline at end of file diff --git a/README.md b/README.md index b5511fd..916ed28 100644 --- a/README.md +++ b/README.md @@ -90,7 +90,7 @@ These are the possible requests to web application (add param ?Namespace={Desire | Filters | POST |{ "DataSource": "DataSourceName.ext", "Values":1, Search:"SearchTerm"}| JSON | All filters for DeepSee DataSource (cube, pivot, kpi, metric) with values (if Values = 1, set to 0 or omit otherwise). If Search is not empty only filter values, containing search term would be returned.| | Format | GET | | JSON | Default formatting | | TermList | POST | {"TermList":"TermListName"} | JSON | Termlist key-value array | -| Config | POST |{"Application":"AppName", "Config","value"}| JSON | Set config for arbitrary application for current user| +| Config | POST |{"Application":"AppName", "Config":"value"}| JSON | Set config for arbitrary application for current user| | Config/:Application | GET | {"Application":"AppName"} | JSON | Get config for Application for current user| | Favorites | GET | | JSON | Array of current user favorites| | Favorites/:Item | POST | | JSON | Add favorite item | @@ -207,4 +207,13 @@ To use KPIs and display row name add this method to KPI class Set pList(pPropNo, "defaultValue") = "" Set pList(pPropNo, "columnNo") = pPropNo Quit $$$OK - } \ No newline at end of file + } + + +Postman +----------- + +You can use [Postman](https://www.getpostman.com/) to query MDX2JSON API. [Collection](MDX2JSON.postman_collection.json). [Environment](CACHE.postman_environment.json). + + + \ No newline at end of file