Qlik Community

Qlik Sense Integration, Extensions, & APIs

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

Highlighted
Partner
Partner

QRS API : Allocate license access

Hi,

I would like to allocate analyzer (or profesional) access with the QRS API.

I am trying to do it according to that documentation https://help.qlik.com/en-US/sense-developer/February2019/APIs/repositoryserviceapi/index.html?page=1...

(which unfortunately does not contains an example of the request body to send)

 

I am sending a POST request to https://my-qlik-server:4242/qrs/license/analyzeraccesstype?Xrfkey=xbZdef9hijkPxn4P

Body : 

{
"modifiedByUserName": "INTERNAL\\sa_repository",
"modifiedDate": "2019-05-03T17:23:02.316Z",
"user": {
"userDirectory": "AZ-XXX",
"userId": "2db75108-922f-4736-8461-a7ec7c1edda2"
},
"createdDate": "2019-05-03T17:23:02.315Z"
}

 

But, in return, I get a HTTP 400 (bad request)

Could you please provide the body that must be passed to make it work ?

Is there any logs in QlikSense giving more details about what is bad in the request ?

Thanks,

JF

PS : I have other QRS APIs calls working fine, the problem is specific to that API. Certificate authentication is OK and HTTP headers like Xrfkey  are passed correctly...

 

 

 

Labels (2)
2 Solutions

Accepted Solutions
Employee
Employee

Re: QRS API : Allocate license access

On my end, I am able to do it using this:

  • Endpoint: POST /qrs/license/analyzeraccesstype
  • Body: {"user": {"id": "9309c057-97c3-4f42-8e86-65b170675c32"}}
    • Where the ID refers to the UserID

From your end, you shouldn't need the modifiedByUserName, modifiedDate, or createdDate elements since the entity doesn't exist yet. The QRS will add those as needed.

 

Employee
Employee

Re: QRS API : Allocate license access

I am not seeing an obvious one. What is the actual response? For example on my end "errorText": "Violation of the uniqueness constraint" comes when I try to allocate a user an Analyzer pass when they already have one.

4 Replies
Employee
Employee

Re: QRS API : Allocate license access

On my end, I am able to do it using this:

  • Endpoint: POST /qrs/license/analyzeraccesstype
  • Body: {"user": {"id": "9309c057-97c3-4f42-8e86-65b170675c32"}}
    • Where the ID refers to the UserID

From your end, you shouldn't need the modifiedByUserName, modifiedDate, or createdDate elements since the entity doesn't exist yet. The QRS will add those as needed.

 

Partner
Partner

Re: QRS API : Allocate license access

Hi Levi,

Thanks for your support, unfortunately I still have the same HTTP 400 as a response (I probably already tested that body before)

But it's already a good thing to know that this request is working on your end !

Do you know if there is any log files on Qlik Sense that could help ?

Thanks

Employee
Employee

Re: QRS API : Allocate license access

I am not seeing an obvious one. What is the actual response? For example on my end "errorText": "Violation of the uniqueness constraint" comes when I try to allocate a user an Analyzer pass when they already have one.

Partner
Partner

Re: QRS API : Allocate license access

Thanks, I had not thought to read the body of the message when when the HTTP response code was not normal ...

Now I can better understand !

Have a good day !