โ01-19-2024 04:58 PM
I am trying to export a notebook or directory using /api/2.0/workspace/export.
When I run /api/2.0/workspace/list with a particular url and path, I get the results that I expect, a list of objects (notebooks and folders) at that location.
But when I run /api/2.0/workspace/export with the same url and path, I get an error 404: resource does not exist.
Why would this be?
requests.request(
method = 'GET',
url = 'https://{host}/api/2.0/workspace/list',
params = {'path' : '/Users/{user}/{folder}/'},
headers = {'Authorization' : f'Bearer {host_token}'}
)
requests.request(
method = 'GET',
url = 'https://{host}/api/2.0/workspace/export/',
params = {'path' : '/Users/{user}/{folder}/', 'format' : 'AUTO', 'direct_download' : True},
headers = {'Authorization' : f'Bearer {host_token}'}
)
โ01-21-2024 10:19 PM
Hi @hbs59 , Could you please try changing the export URL from :
https://{host}/api/2.0/workspace/export/
To :
https://{host}/api/2.0/workspace/export
Removing Extra '/' from the end.
โ01-19-2024 07:48 PM
Hi, Could you please remove the parameters , (format and direct_download) and confirm?
โ01-19-2024 07:56 PM
Sure, I ran the following:
requests.request(
method = 'GET',
url = 'https://{host}/api/2.0/workspace/export/',
params = {'path' : '/Users/{user}/{folder}/'},
headers = {'Authorization' : f'Bearer {host_token}'}
)
As far as I can tell, the error is the same:
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 404 Bad Target: GET /2.0/workspace/export/</title>
</head>
<body><h2>HTTP ERROR 404 Bad Target: GET /2.0/workspace/export/</h2>
<table>
<tr><th>URI:</th><td>/api/2.0/workspace/export/</td></tr>
<tr><th>STATUS:</th><td>404</td></tr>
<tr><th>MESSAGE:</th><td>Bad Target: GET /2.0/workspace/export/</td></tr>
<tr><th>SERVLET:</th><td>com.databricks.webapp.WebappDispatcherServletWithProxy-45f675a4</td></tr>
</table>
โ01-19-2024 08:31 PM
Hi, Could you please raise a support ticket with us to investigate this further? We want to run this and check in your workspace.
โ01-21-2024 09:31 PM
Hi, thank you for following up. I just opened a ticket for this.
โ01-21-2024 10:19 PM
Hi @hbs59 , Could you please try changing the export URL from :
https://{host}/api/2.0/workspace/export/
To :
https://{host}/api/2.0/workspace/export
Removing Extra '/' from the end.
Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections.
Click here to register and join today!
Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.