Microsoft Fabric Updates Blog

OneLake Shortcuts APIs available in Preview

Microsoft Fabric REST APIs allow users and developers to automate common actions and programmatically interact with Fabric. This allows teams and organizations to develop solutions that can scale and integrate with other parts of their systems.

Before today, OneLake shortcuts could only be created using the Fabric web experience. This meant that our users were limited to interactively creating and managing shortcuts through the web. We’ve heard from Fabric and OneLake users and developers that you need a way to work with shortcuts programmatically.

Today, Microsoft OneLake is introducing new REST APIs that allow programmatic creation and management of shortcuts!

With this initial Preview release of the OneLake shortcuts REST APIs, we’ve introduced three new operations:

  • Creating new shortcuts to OneLake folders and tables or to external storage locations, such as Azure Data Lake Storage (ADLS) Gen2, Amazon S3, or Dataverse.
  • Reading shortcut definition details of existing shortcuts
  • Deleting shortcuts

Soon, we will introduce a few additional operations to this set of APIs, including listing shortcuts and updating existing shortcuts – stay tuned!

Documentation

An introduction to the use of Fabric REST APIs can be found here – this will familiarize you with the prerequisite steps to using these REST APIs.

The reference material for the new OneLake REST API operations can be found here, and a walkthrough with examples can be found here.

Example – Create shortcut to ADLS Gen2 folder

Here’s a brief sample request for creating a shortcut to a folder in Azure Data Lake Storage (ADLS) Gen2. The connection ID can be found in the “Settings” area of your ADLS Gen2 cloud connection.

POST https://api.fabric.microsoft.com/v1/workspaces/{workspaceId}/items/{itemId}/shortcuts

{

   "path": "Files/landingZone", //path to shortcut parent directory

   "name": "Contoso_Products ", //shortcut directory name

   "target": {

      "adlsGen2": {

         "location": "https://contosoadlsaccount.dfs.core.windows.net", //ADLS Gen2 account endpoint

         "subpath": "/mycontainer/data/ProductsLatest", //path to target directory (including container)

         "connectionId": "91324db9-8dc4-4730-a1e5-bafabf1fb91e" //cloud connection ID for the ADLS Gen2 account with the same location

      }

   }

}

Full details of the Create operation can be found here.


We expect these APIs will help you programmatically interact with OneLake and Fabric. As always, we appreciate your feedback and ideas for future improvements. Please submit any feedback or suggestions at Microsoft Fabric Ideas.

Related blog posts

OneLake Shortcuts APIs available in Preview

July 25, 2024 by Salil Kanade

We are excited to announce the support of Fabric Git integration and deployment pipelines for data warehouse in Microsoft Fabric! Warehouse in Microsoft Fabric, built on the evolution of SQL server, already offers local CI/CD experiences today. This blog will focus on how you can take advantage of CI/CD capabilities directly in the web, as … Continue reading “CI/CD with Warehouses in Microsoft Fabric”

July 24, 2024 by Jason Himmelstein

Welcome to the July 2024 update. Here are a few, select highlights of the many we have for Fabric. Creating and managing Git branches & connected workspaces with Git integration just got with the latest enhancements to Fabric Git integration. You now have the capability to perform restore-in-place of a warehouse in Microsoft Fabric through … Continue reading “Microsoft Fabric July 2024 Update”