DSS URL
![Marlan](https://us.v-cdn.net/6038231/uploads/lithium_attachments/n5296i8F6B67FE68128A4A.jpg)
Hello all,
Anyone know if the DSS URL is available without admin credentials (from a notebook or recipe)?
Per this post by @NN
and responded to by @Andrey
, one can get the URL as follows:
client.get_general_settings().get_raw().get('studioExternalUrl')
However, this requires a client with admin credentials.
But what I'm trying to do is avoid hard coding the URL in a dataikuapi.DSSClient() call with an API Key that has admin credentials. The problem is of course that I won't have a client that has admin credentials until after the call and I need the URL for that call.
Note we are using a reverse proxy.
Thanks for any suggestions.
Marlan
Best Answer
-
Alexandru Dataiker, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 1,211 Dataiker
Hi,
Since studioExternalUrl is set in the Admin settings this requires admin credentials.
However, if an admin can set the global variable one time on your DSS instance you can then retrieve with a non-admin user :
Hope that helps!
Answers
-
Marlan Neuron 2020, Neuron, Registered, Dataiku Frontrunner Awards 2021 Finalist, Neuron 2021, Neuron 2022, Dataiku Frontrunner Awards 2021 Participant, Neuron 2023 Posts: 318 Neuron
Hi @AlexT
,I had thought of that approach later as well. It's a pretty good solution - easy enough to set up and easy to use via the call to get variables. Maybe not as ideal as having it available built in to non-admin clients but nonetheless it'll work just fine.
It will accomplish the goal of not having the URL hard coded in a bunch of places in the code.
Not sure why the external URL call requires admin credentials though. The URL is right up there in browser for everyone to see.
Thanks!
Marlan