Forum Discussion
Automate creating shortcusts
- Anonymous10 months ago
Hi AstridM ,
The 404 Not Found error occurs because your lakehouse is schema-enabled, which is the case for those created automatically by Synapse Link as well.
In schema-enabled lakehouses, tables are not available directly under the /tables endpoint, so the call fails. Instead, you should first use the GET /schemas API to list the available schemas in the lakehouse, and then call GET /schemas/{schemaName}/tables to retrieve the tables within each schema.
Once you have the table names, you can loop through them and create the shortcuts using the OneLake Shortcuts API, setting the path to Tables/<tableName> in your destination lakehouse. This approach works for both system-created and manually created schema-enabled lakehouses.
For details, please refer to the documentation: OneLake Shortcuts - REST API (Core) | Microsoft Learn
Hope this helps. Please feel free to rech out for any further questions.
Thank you .
Hi AstridM ,
Thanks for reaching out to the Microsoft fabric community forum.
Could you please let us know if the issue has been resolved? I wanted to check if you had the opportunity to review the information provided by tayloramy . If you still require support, please let us know, we are happy to assist you.
Thank you