Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

travelerssean
New Contributor

QPS API - Session - Get User

Problem: QPS API session REST API GET returns 500.

Example session module root:

http://thehost/qps

1) The following http GET returns expected JSON:

http://thehost/qps/user


Returns:

{"userDirectory": "THE_DOMAIN", "userId": "myUserId", "userName": "Me", "logoutUri": "http://thehost/qps/user"}

2) ..However the following http GET gives me a 500:

500 (No rest method matches the incoming request)

http://thehost/qps/user/THE_DOMAIN/Me


Spec:

https://help.qlik.com/en-US/sense-developer/June2017/Subsystems/ProxyServiceAPI/Content/ProxyService...


Ideas?

Tags (2)
1 Reply
Employee
Employee

Re: QPS API - Session - Get User

You typed this so long ago, but I wanted to offer a trick for doing that, if you still need it:


var app = qlik.currApp();

app.model.enigmaModel.evaluate('OSUser()').then(function(reply){ 

      console.log(reply); //reply will contain a string like UserDirectory=QLIKDOMAIN; UserId=userIvan (in my case)

});


This code will evaluate the OSUser() expression, which is not in the API but is present in the frontend.

Regards

Community Browser