Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Has anyone managed to use the QRS REST API to delete a user? Or GET one, for that matter? I've managed to look up a specific user by userDirectory and userId via a filter parameter, but DELETE /qrs/user/{id}, where {id} is the UUID in the id property of the returned user object, returns 405, and GET /qrs/user/{id} returns 404. According to the API reference, those methods should be possible and I am using the right id, aren't I?
https://help.qlik.com/en-US/sense-developer/June2019/APIs/repositoryserviceapi/index.html?page=219
(I'm exploring managing the user directories without setting up User Directory Connectors.)
Sorry, I realised that I had dropped "/qrs" from the path in the DELETE while figuring out what headers are needed and what the id is. I had included it earlier. I got it to work now.
The 405 is very odd to the DELETE command. But it's also odd that you get a 404 for the GET command.
Expected:
If you can't do a GET then a DELETE will obviously fail. How are you getting the user's ID?
GET to /qrs/user?filter=...&Xrfkey=...
I get [{"id":"ae862dd0-da37-4e36-92bb-819843d01bc1","userId":"1","userDirectory":"MAHO-DEV","name":"Test Person","privileges":null}] back, and I assume that ae862dd0-da37-4e36-92bb-819843d01bc1 is the id to append to the path to DELETE that user. If the above GET works, I shouldn't have to add any additional X-Qlik headers for DELETE to work, should I? I'm not trying to delete an internal user or a user from the local Windows domain or anything either. I tried deleting the UDC but that didn't help.
> I get [{"id":"ae862dd0-da37-4e36-92bb-819843d01bc1","userId":"1","userDirectory":"MAHO-DEV","name":"Test Person","privileges":null}] back, and I assume that ae862dd0-da37-4e36-92bb-819843d01bc1 is the id to append to the path to DELETE that user.
Correct. That's the ID for the user.
> If the above GET works, I shouldn't have to add any additional X-Qlik headers for DELETE to work, should I?
Nope. Standard headers
Sorry, I realised that I had dropped "/qrs" from the path in the DELETE while figuring out what headers are needed and what the id is. I had included it earlier. I got it to work now.