Leveraging Dataiku Instance from outside the environment.
I've tried using dataiku managed instance from local workstation using dataiku API client v13.1.4 and had trouble accessing projects in the machine.
import dataikuapi
import random
import requests
requests.packages.urllib3.disable_warnings()
client = dataikuapi.DSSClient(DATAIKU_URL, API_KEY)
project_keys = client.list_project_keys()
project = client.get_project(random.choice(project_keys))
print(f"Known notebooks for the \"{project.get_summary().get('name')}\" project")
[jupy.notebook_name for jupy in project.list_jupyter_notebooks()]
Did anyone else face a similar issue?
Thanks,
Thiagu
Operating system used: Windows
Best Answer
-
Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 2,088 Neuron
Well the error is pretty clear. You are not using the correct API key. Create a new one and use the secret part, not the API key id. Note that you are using a personal API key so this will restrict what you can see unless you have admin rights. Some API calls can only be used by admins although client.list_project_keys() will work fine for users (it will just show the projects keys your user ID has access to).
Answers
-
Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 2,088 Neuron
"had trouble accessing projects in the machine" ⇒ Errors? Screen shots? What exactly is your problem?
-
Hey @Turribeach added screenshots to give more context.
The key that we used for testing was the one we had requested from the Dataiku User Profile.
-
That explains it! Thanks for the clarification @Turribeach !