Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am new in Qlik Sense, I need a help from the community.
I have JSON API and I want to get data by using API REST in Qlik, I never use API in Qlik.
Help me out how it is possible to get data, share any video link or a tutorial for help to achieve this.
Under is the JSON API
{
"info": {
"_postman_id": "762a635f-ab3e-4068-a79f-379c68b7fe91",
"name": "ObjectTest",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "SalesEvent1",
"request": {
"auth": {
"type": "basic",
"basic": [
{
"key": "password",
"value": "*****",
"type": "string"
},
{
"key": "username",
"value": "*****",
"type": "string"
}
]
},
"method": "GET",
"header": [],
"url": {
"raw": "http://*****/DashboardAPI/api/data/SalesEvent1",
"protocol": "http",
"host": [
"*****"
],
"port": "*****",
"path": [
"DashboardAPI",
"api",
"data",
"SalesEvent1"
]
}
},
"response": []
},
{
"name": "SalesEvent2",
"request": {
"auth": {
"type": "basic",
"basic": [
{
"key": "password",
"value": "*****",
"type": "string"
},
{
"key": "username",
"value": "*****",
"type": "string"
}
]
},
"method": "GET",
"header": [],
"url": {
"raw": "http://*****/DashboardAPI/api/data/SalesEvent2",
"protocol": "http",
"host": [
"*****"
],
"port": "*****",
"path": [
"DashboardAPI",
"api",
"data",
"SalesEvent2"
]
}
},
"response": []
},
{
"name": "SalesEvent3",
"request": {
"auth": {
"type": "basic",
"basic": [
{
"key": "password",
"value": "*****",
"type": "string"
},
{
"key": "username",
"value": "*****",
"type": "string"
}
]
},
"method": "GET",
"header": [],
"url": {
"raw": "http://*****/DashboardAPI/api/data/SalesEvent3",
"protocol": "http",
"host": [
"*****"
],
"port": "*****",
"path": [
"DashboardAPI",
"api",
"data",
"SalesEvent3"
]
}
},
"response": []
}
]
}
Thanks
It looks that you have tested already the REST API in Postman. For me this is usually the hardest part.
Once you have a functional Postman test, go to Script Editor, create a new connection, select REST API (by the way, it works the same also with SOAP API) then fill in the following wizard form the connection details, similar to Postman.
After successfully testing and choosing a connection name, press SAVE.
A new connection will be defined in the right panel.
Press on select table button next under the connection, a new wizard starts, activate the checkboxes for all the data hierarchy on the left, inspect results on the right, then press insert script.
=> All the loads plus previous connect are already inserted
Reload script and it's done.
Afterwards you can decide if some of the secondary loads can be dropped
Also you can use $(variable) to create more dynamic calls.
Even expand using WITH CONNECTION (very powerful for dynamics calls l!)
It looks that you have tested already the REST API in Postman. For me this is usually the hardest part.
Once you have a functional Postman test, go to Script Editor, create a new connection, select REST API (by the way, it works the same also with SOAP API) then fill in the following wizard form the connection details, similar to Postman.
After successfully testing and choosing a connection name, press SAVE.
A new connection will be defined in the right panel.
Press on select table button next under the connection, a new wizard starts, activate the checkboxes for all the data hierarchy on the left, inspect results on the right, then press insert script.
=> All the loads plus previous connect are already inserted
Reload script and it's done.
Afterwards you can decide if some of the secondary loads can be dropped
Also you can use $(variable) to create more dynamic calls.
Even expand using WITH CONNECTION (very powerful for dynamics calls l!)