...
Table of Contents |
---|
WIP REST API
...
Inside QlikView or Qlik Sense you can use the the Qlik Rest connector to query the WIP data model and make quite all reporting you can imagine
All tasks you can do using the WIP Web Interface you can do it using the API
As such an integration can be quite technical, you can ask us for a professional consulting offer to help you implement your project.
...
Code Block | ||
---|---|---|
| ||
environment=223&:0 grant_type=:password& login_method=:0&password=XXXXX&username=W8-JP-VS15%5Cebidev password:EBIEXPERTS username:VMMANAGER plugin_type:-1 |
Get Login environment id
In Qlik Sense, QlikView, SAP, you will need to login using a certain environment. To find the environment
Id “environment id” open the server and environment then id enviId is in the URL
...
https://wipws:59272/wip/#!/home/serverEdit/<serverId>/qs/enviEdit/<enviId>/enviForm
Get token using Postman
Sample : get authentication token using REST Using Postman
...
Here is an example on how to get a WIP token using Postman, but it would be the same process to implement in your program.
environment: not mandatory for “user portal” and “admin users” but it is for “developer users”. It must contain the environment ID
grant_type: should be “password”
username: WIP username in the form “DOMAIN\USER” (you can also use “VMMANAGER”)
password: WIP Password for “password” authentication, AD for AD Authentication
login_method0method: 0for using password and 1 to use AD (Active Directory) to authenticate
plugin_type: -1 for not defined (VMMANAGER), 0 for QlikView [default for password] 1 for Qlik Sense , 2 for SAP, 3 for NPrinting
The Body in plain text should be URL encoded like this :for example for a QlikView login
Code Block |
---|
environment=223& grant_type=password& login_method=0& password= |
...
******& username=W8-JP-VS15%5Cebidev& plugin_type=0 |
If you don’t need special rights or for read only queries you can login using VMMANAGER password like this
Code Block |
---|
environment=0&
grant_type=password&
login_method=0&
password=EBIEXPERTS&
username=VMMANAGER&
plugin_type=-1 |
If the request succeeded that the response should contain a JSON text like this
Code Block | ||
---|---|---|
| ||
{ "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlIjoiMiIsInVuaXF1ZV9uYW1lIjoiVzgtSlAtVlMxNVxcZWJpZGV2IiwiYWN0b3JJZCI6IjIxNiIsImVudmlyb25tZW50SWQiOiIyMjMiLCJsb2dpbk1ldGhvZCI6IjAiLCJlbnZpcm9ubWVudFJlcG9zVHlwZSI6InFzIiwiZW52aXJvbm1lbnROYW1lIjoiMDAgUVNlbnNlIERFViIsImF2YXRhclVybCI6Imh0dHA6Ly9sb2NhbGhvc3Q6NTkyNzIvZG93bmxvYWQvdXNlckF2YXRhcnMvaW1nX1ZtQWN0b3ItMjE2LnBuZyIsInVzZXJOZXh0UGFnZSI6IjAiLCJpc0xpY2Vuc2VWYWxpZCI6IlRydWUiLCJpc3MiOiJodHRwOi8vbG9jYWxob3N0OjU5MjcyLyIsImF1ZCI6ImFsbCIsImV4cCI6MTUxMTkyMzcwOSwibmJmIjoxNTExODgwNTA5fQ.NM1eKf1EyY_u7-Sw2qs6NwXSTXziFKowtQVXp2DXpPE", "token_type": "bearer", "expires_in": 43199 } |
Get token Using WIP browser
Login WIP using VMMANAGER / EBIEXPERTS (or your password)
...
Code Block |
---|
http:// <WIPSERVER>:59272/wip/#!/home/actors |
Click on GetAllActors should display
...
Copy the Authorization “Bearer XXXX” then you can paste it in Qlik Sense Requests like below will use same context as your WIP Session
Use the token for subsequent requests
...
You need to put the token in the header adding a new “Authorization” key and “bearer <token>” value
Authorization bearer <token>
Postman
...
Type : Bearer Token
Postman
Put the Authorization in the collection Authorization
...
Create a variable to keep the WIP url
...
You are not connected to WIP rest API
...
Get a token from the point Authentication
Add the token
The token should look like:
Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlIjoiMiIsInVuaXF1ZV9uYW1lIjoiRUJJV0lOMjAxNlxcZWJpZGV2IiwiYWN0b3JJZCI6IjE5NyIsImVudmlyb25tZW50SWQiOiIyMDYiLCJsb2dpbk1ldGhvZCI6IjAiLCJlbnZpcm9ubWVudFJlcG9zVHlwZSI6InFzIiwiZW52aXJvbm1lbnROYW1lIjoiMDAgUVNFTlNFLURFViIsImF2YXRhclVybCI6Imh0dHA6Ly81NC4zNi4xNDcuMjIwOjU5MjcyL2Rvd25sb2FkL2RlZmF1bHRBdmF0YXJzL2RlZmF1bHQucG5nIiwidXNlck5leHRQYWdlIjoiMCIsImlzTGljZW5zZVZhbGlkIjoiVHJ1ZSIsImlzcyI6Imh0dHA6Ly81NC4zNi4xNDcuMjIwOjU5MjcyLyIsImF1ZCI6ImFsbCIsImV4cCI6MTUxMjc3MjMxMSwibmJmIjoxNTEyNzI5MTExfQ.EpVOdd2Z63oB1uhdhu33P5h8d_1KT3ZH-MaUdmFi_e8
Create a Header name “Authorization” and paste the token in Value like below. Then test connection
...
Sample POST Query Get Users
...
Open chrome on WIP
Press Ctrl-Shift-I
Using WIP Rest API Swagger Dictionary
WIP Rest API endpoints
You can get a full description of all rest api endpoints using this url
...
For the moment api wthat requires authentication will return an error: "message": "Authorization has been denied for this request."
Useful API Calls
Publish a pending publication (tip)
Code Block |
---|
{{wipsurl}}/api/WipApi/PublishTip?tipId=2463889&reload=true |