Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Reverted from v. 1

...

Table of Contents

...

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
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

...

After we can use these 2 connections for all requests.

...

Authentication

...

Create a POST Rest Connection

...

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

...

//-----------------------------------------------------

...

//

...

Get

...

Actors

...

//-----------------------------------------------------

...

LIB

...

CONNECT

...

TO

...

'WIPApiPost';

...

RestConnectorMasterTable:

...

SQL

...

SELECT

...

"id",

...

"name",

...

"avatarUrl",

...

"perVmQs",

...

"perVmFile",

...

"perVmEnvProps",

...

"perVmTip",

...

"perVmQv",

...

"perWipUp"

...

FROM

...

JSON

...

(wrap

...

off)

...

"data"

...

WITH CONNECTION (

URL "http://localhost:59272/api/Actors/GetAllActors",

...

HTTPHEADER

...

"Authorization"

...

"bearer

...

$(vWIP_token)",

...

HTTPHEADER

...

"Content-Type"

...

"application/json;

...

charset=utf-8",

...

BODY

...

"{active:

...

true,toValidate:

...

false}"

...

);

...

[WIPActors]:

...

LOAD

...

[id]

...

AS

...

[actorId],

...

[name]

...

AS

...

[name],

...

[avatarUrl]

...

AS

...

[avatarUrl],

...

[perVmQs]

...

AS

...

[perVmQs],

...

[perVmFile]

...

AS

...

[perVmFile],

...

[perVmEnvProps]

...

AS

...

[perVmEnvProps],

...

[perVmTip]

...

AS

...

[perVmTip],

...

[perVmQv]

...

AS

...

[perVmQv],

...

[perWipUp]

...

AS

...

[perWipUp]

...

RESIDENT

...

RestConnectorMasterTable;

...

DROP

...

TABLE

...

RestConnectorMasterTable;

Sample GET Query

You can use the Get Query we created before as we will override URL

There are 2 important things in the query:code

  • URL

...

  • "http://localhost:59272/api/businessUnit/GetAllBusinessUnits"

...

  • HTTPHEADER

...

  • "Authorization"

...

  • "bearer

...

  • $(vWIP_token)"

...

...

//-----------------------------------------------------

...

//

...

Get

...

Business

...

Units

...

//-----------------------------------------------------

...

LIB

...

CONNECT

...

TO

...

'WIPApiGet';

...

RestConnectorMasterTable:

...

SQL

...

SELECT

"id",

...

"name"

...

FROM

...

JSON

...

(wrap

...

off)

...

"data"

...

WITH

...

CONNECTION

...

(

URL "http://localhost:59272/api/businessUnit/GetAllBusinessUnits",

...

HTTPHEADER

...

"Authorization"

...

"bearer

...

$(vWIP_token)"

...

);

...

[WIPBusinessUnits]:

...

LOAD

...

[id]

...

AS

...

[businessUnitId],

...

[name]

...

AS

...

[businessUnitName]

...

RESIDENT

...

RestConnectorMasterTable;

...

DROP

...

TABLE

...

RestConnectorMasterTable;

...

How to get WIP Rest API urls (endpoints)

Using the Google Chrome Developer tools

Open chrome on WIP

Press Ctrl-Shift-I

Using WIP Rest API Dictionary

...