OneLake Shortcuts - Create Shortcut

Creates a new shortcut.

Required Delegated Scopes

OneLake.ReadWrite.All

Microsoft Entra supported identities

This API supports the Microsoft identities listed in this section.

Identity Support
User Yes
Service principal Yes
Managed identities Yes

Interface

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

URI Parameters

Name In Required Type Description
itemId
path True

string

uuid

The ID of the data item.

workspaceId
path True

string

uuid

The ID of the workspace.

shortcutConflictPolicy
query

ShortcutConflictPolicy

When provided, it defines the action to take when a shortcut with the same name and path already exists. The default action is 'Abort'. Additional ShortcutConflictPolicy types may be added over time.

Request Body

Name Required Type Description
name True

string

Name of the shortcut.

path True

string

A string representing the full path where the shortcut is created, including either "Files" or "Tables".

target True

CreatableShortcutTarget

An object that contains the target datasource, and it must specify exactly one of the supported destinations: OneLake, Amazon S3, ADLS Gen2, Google Cloud Storage, S3 compatible or Dataverse.

Responses

Name Type Description
201 Created

Shortcut

Successfully created.

Headers

Location: string

Other Status Codes

ErrorResponse

Common error codes:

  • ItemNotFound - Server cannot find the requested item.

  • UnknownError - An error occurred.

Examples

Create shortcut AdlsGen2 target example
Create shortcut AmazonS3 target example
Create shortcut Google Cloud Storage target example
Create shortcut One Lake target example
Create shortcut S3 Compatible target example

Create shortcut AdlsGen2 target example

Sample request

POST https://api.fabric.microsoft.com/v1/workspaces/cfafbeb1-8037-4d0c-896e-a46fb27ff222/items/25bac802-080d-4f73-8a42-1b406eb1fceb/shortcuts

{
  "path": "Files/landingZone",
  "name": "PartnerProducts",
  "target": {
    "adlsGen2": {
      "location": "https://contosoadlsaccount.dfs.core.windows.net",
      "subpath": "/mycontainer/data/ContosoProducts",
      "connectionId": "91324db9-8dc4-4730-a1e5-bafabf1fb91e"
    }
  }
}

Sample response

Location: https://api.fabric.microsoft.com/v1/workspaces/cfafbeb1-8037-4d0c-896e-a46fb27ff222/items/25bac802-080d-4f73-8a42-1b406eb1fceb/shortcuts/Files/landingZone/PartnerProducts
{
  "path": "Files/landingZone",
  "name": "PartnerProducts",
  "target": {
    "type": "AdlsGen2",
    "adlsGen2": {
      "location": "https://contosoadlsaccount.dfs.core.windows.net",
      "subpath": "/mycontainer/data/ContosoProducts",
      "connectionId": "91324db9-8dc4-4730-a1e5-bafabf1fb91e"
    }
  }
}

Create shortcut AmazonS3 target example

Sample request

POST https://api.fabric.microsoft.com/v1/workspaces/cfafbeb1-8037-4d0c-896e-a46fb27ff222/items/25bac802-080d-4f73-8a42-1b406eb1fceb/shortcuts

{
  "path": "Files/landingZone",
  "name": "PartnerEmployees",
  "target": {
    "amazonS3": {
      "location": "https://my-s3-bucket.s3.us-west-2.amazonaws.com",
      "subpath": "/data/ContosoEmployees",
      "connectionId": "cf480513-2c1c-46b2-958a-42556ee584c3"
    }
  }
}

Sample response

Location: https://api.fabric.microsoft.com/v1/workspaces/cfafbeb1-8037-4d0c-896e-a46fb27ff222/items/25bac802-080d-4f73-8a42-1b406eb1fceb/shortcuts/Files/landingZone/PartnerEmployees
{
  "path": "Files/landingZone",
  "name": "PartnerEmployees",
  "target": {
    "type": "AmazonS3",
    "amazonS3": {
      "location": "https://my-s3-bucket.s3.us-west-2.amazonaws.com",
      "subpath": "/data/ContosoEmployees",
      "connectionId": "cf480513-2c1c-46b2-958a-42556ee584c3"
    }
  }
}

Create shortcut Google Cloud Storage target example

Sample request

POST https://api.fabric.microsoft.com/v1/workspaces/cfafbeb1-8037-4d0c-896e-a46fb27ff222/items/25bac802-080d-4f73-8a42-1b406eb1fceb/shortcuts

{
  "path": "Files/landingZone",
  "name": "MyGCSShortcut1",
  "target": {
    "googleCloudStorage": {
      "location": "https://gcs-contosoBucket.storage.googleapis.com",
      "subpath": "/gcsDirectory/data/ContosoProducts",
      "connectionId": "3c976446-0bda-472e-8800-f1d6e4f162dc"
    }
  }
}

Sample response

Location: https://api.fabric.microsoft.com/v1/workspaces/cfafbeb1-8037-4d0c-896e-a46fb27ff222/items/25bac802-080d-4f73-8a42-1b406eb1fceb/shortcuts/Files/landingZone/MyGCSShortcut1
{
  "path": "Files/landingZone",
  "name": "MyGCSShortcut1",
  "target": {
    "type": "GoogleCloudStorage",
    "googleCloudStorage": {
      "location": "https://gcs-contosoBucket.storage.googleapis.com",
      "subpath": "/gcsDirectory/data/ContosoProducts",
      "connectionId": "3c976446-0bda-472e-8800-f1d6e4f162dc"
    }
  }
}

Create shortcut One Lake target example

Sample request

POST https://api.fabric.microsoft.com/v1/workspaces/cfafbeb1-8037-4d0c-896e-a46fb27ff222/items/25bac802-080d-4f73-8a42-1b406eb1fceb/shortcuts

{
  "path": "Files/blafolder/folder3",
  "name": "MyOneLakeShortcut",
  "target": {
    "oneLake": {
      "workspaceId": "acafbeb1-8037-4d0c-896e-a46fb27ff256",
      "itemId": "56bac802-080d-4f73-8a42-1b406eb1fcac",
      "path": "Tables/myTablesFolder/someTableSubFolder"
    }
  }
}

Sample response

Location: https://api.fabric.microsoft.com/v1/workspaces/cfafbeb1-8037-4d0c-896e-a46fb27ff222/items/25bac802-080d-4f73-8a42-1b406eb1fceb/shortcuts/Files/blafolder/folder3/MyOneLakeShortcut
{
  "path": "Files/blafolder/folder3",
  "name": "MyOneLakeShortcut",
  "target": {
    "type": "OneLake",
    "oneLake": {
      "workspaceId": "acafbeb1-8037-4d0c-896e-a46fb27ff256",
      "itemId": "56bac802-080d-4f73-8a42-1b406eb1fcac",
      "path": "Tables/myTablesFolder/someTableSubFolder"
    }
  }
}

Create shortcut S3 Compatible target example

Sample request

POST https://api.fabric.microsoft.com/v1/workspaces/cfafbeb1-8037-4d0c-896e-a46fb27ff222/items/25bac802-080d-4f73-8a42-1b406eb1fceb/shortcuts

{
  "path": "Files/landingZone",
  "name": "MyS3CompatibleShortcut1",
  "target": {
    "s3Compatible": {
      "location": "https://s3endpoint.contoso.com",
      "bucket": "contosoBucket1",
      "subpath": "/s3CompatibleDirectory/data/ContosoProducts",
      "connectionId": "3c976446-0bda-472e-8800-f1d6e4f162dc"
    }
  }
}

Sample response

Location: https://api.fabric.microsoft.com/v1/workspaces/cfafbeb1-8037-4d0c-896e-a46fb27ff222/items/25bac802-080d-4f73-8a42-1b406eb1fceb/shortcuts/Files/landingZone/MyS3CompatibleShortcut1
{
  "path": "Files/landingZone",
  "name": "MyS3CompatibleShortcut1",
  "target": {
    "type": "S3Compatible",
    "s3Compatible": {
      "location": "https://s3endpoint.contoso.com",
      "bucket": "contosoBucket1",
      "subpath": "/s3CompatibleDirectory/data/ContosoProducts",
      "connectionId": "3c976446-0bda-472e-8800-f1d6e4f162dc"
    }
  }
}

Definitions

Name Description
AdlsGen2

An object containing the properties of the target ADLS Gen2 data source.

AmazonS3

An object containing the properties of the target Amazon S3 data source.

CreatableShortcutTarget

An object that contains the target datasource, and must specify exactly one of the supported destinations as described in the table below.

CreateShortcutRequest

A shortcut creation request with an object representing a reference to another storage location.

Dataverse

An object containing the properties of the target Dataverse data source.

ErrorRelatedResource

The error related resource details object.

ErrorResponse

The error response.

ErrorResponseDetails

The error response details.

ExternalDataShareTarget

An object containing the properties of the target external data share.

GoogleCloudStorage

An object containing the properties of the target Google Cloud Storage data source.

OneLake

An object containing the properties of the target OneLake data source.

S3Compatible

An object containing the properties of the target S3 compatible data source.

Shortcut

An object representing a reference that points to other storage locations which can be internal or external to OneLake. Shortcut is defined by name, path where the shortcut is created and target specifying the target storage location.

ShortcutConflictPolicy

When provided, it defines the action to take when a shortcut with the same name and path already exists. The default action is 'Abort'. Additional ShortcutConflictPolicy types may be added over time.

Target

An object that contains the target datasource, and must specify exactly one of the supported destinations as described in the table below.

Type

The type object contains properties like target shortcut account type. Additional types may be added over time.

AdlsGen2

An object containing the properties of the target ADLS Gen2 data source.

Name Type Description
connectionId

string

A string representing the connection that is bound with the shortcut. The connectionId is a unique identifier used to establish a connection between the shortcut and the target datasource. To find this connection ID, first create a cloud connection to be used by the shortcut when connecting to the ADLS data location. Open the cloud connection's Settings view and copy the connection ID; this is a GUID.

location

string

Specifies the location of the target ADLS container. The URI must be in the format https://[account-name].dfs.core.windows.net where [account-name] is the name of the target ADLS account.

subpath

string

Specifies the container and subfolder within the ADLS account where the target folder is located. Must be of the format [container]/[subfolder] where [container] is the name of the container that holds the files and folders; [subfolder] is the name of the subfolder within the container (optional). For example: /mycontainer/mysubfolder

AmazonS3

An object containing the properties of the target Amazon S3 data source.

Name Type Description
connectionId

string

A string representing the connection that is bound with the shortcut. The connectionId is a unique identifier used to establish a connection between the shortcut and the target datasource. To find this connection ID, first create a cloud connection to be used by the shortcut when connecting to the Amazon S3 data location. Open the cloud connection's Settings view and copy the connection ID; this is a GUID.

location

string

HTTP URL that points to the target bucket in S3. The URL should be in the format https://[bucket-name].s3.[region-code].amazonaws.com, where "bucket-name" is the name of the S3 bucket you want to point to, and "region-code" is the code for the region where the bucket is located. For example: https://my-s3-bucket.s3.us-west-2.amazonaws.com

subpath

string

Specifies a target folder or subfolder within the S3 bucket.

CreatableShortcutTarget

An object that contains the target datasource, and must specify exactly one of the supported destinations as described in the table below.

Name Type Description
adlsGen2

AdlsGen2

An object containing the properties of the target ADLS Gen2 data source.

amazonS3

AmazonS3

An object containing the properties of the target Amazon S3 data source.

dataverse

Dataverse

An object containing the properties of the target Dataverse data source.

googleCloudStorage

GoogleCloudStorage

An object containing the properties of the target Google Cloud Storage data source.

oneLake

OneLake

An object containing the properties of the target OneLake data source.

s3Compatible

S3Compatible

An object containing the properties of the target S3 compatible data source.

CreateShortcutRequest

A shortcut creation request with an object representing a reference to another storage location.

Name Type Description
name

string

Name of the shortcut.

path

string

A string representing the full path where the shortcut is created, including either "Files" or "Tables".

target

CreatableShortcutTarget

An object that contains the target datasource, and it must specify exactly one of the supported destinations: OneLake, Amazon S3, ADLS Gen2, Google Cloud Storage, S3 compatible or Dataverse.

Dataverse

An object containing the properties of the target Dataverse data source.

Name Type Description
connectionId

string

A string representing the connection that is bound with the shortcut. The connectionId is a unique identifier used to establish a connection between the shortcut and the target datasource. To find this connection ID, first create a cloud connection to be used by the shortcut when connecting to the Dataverse data location. Open the cloud connection's Settings view and copy the connection ID; this is a GUID.

deltaLakeFolder

string

Specifies the DeltaLake folder path where the target data is stored.

environmentDomain

string

URI that indicates the Dataverse target environment's domain name. The URI should be formatted as "https://[orgname].crm[xx].dynamics.com", where [orgname] represents the name of your Dataverse organization.

tableName

string

Specifies the name of the target table in Dataverse

ErrorRelatedResource

The error related resource details object.

Name Type Description
resourceId

string

The resource ID that's involved in the error.

resourceType

string

The type of the resource that's involved in the error.

ErrorResponse

The error response.

Name Type Description
errorCode

string

A specific identifier that provides information about an error condition, allowing for standardized communication between our service and its users.

message

string

A human readable representation of the error.

moreDetails

ErrorResponseDetails[]

List of additional error details.

relatedResource

ErrorRelatedResource

The error related resource details.

requestId

string

ID of the request associated with the error.

ErrorResponseDetails

The error response details.

Name Type Description
errorCode

string

A specific identifier that provides information about an error condition, allowing for standardized communication between our service and its users.

message

string

A human readable representation of the error.

relatedResource

ErrorRelatedResource

The error related resource details.

ExternalDataShareTarget

An object containing the properties of the target external data share.

Name Type Description
connectionId

string

A string representing the connection that is bound with the shortcut. The connectionId is a unique identifier used to establish a connection between the shortcut and the target datasource.

GoogleCloudStorage

An object containing the properties of the target Google Cloud Storage data source.

Name Type Description
connectionId

string

A string representing the connection that is bound with the shortcut. The connectionId is a unique identifier used to establish a connection between the shortcut and the target datasource.

location

string

HTTP URL that points to the target bucket in GCS. The URL should be in the format https://[bucket-name].storage.googleapis.com, where [bucket-name] is the name of the bucket you want to point to. For example: https://my-gcs-bucket.storage.googleapis.com

subpath

string

Specifies a target folder or subfolder within the GCS bucket. For example: /folder

OneLake

An object containing the properties of the target OneLake data source.

Name Type Description
itemId

string

The ID of the target in OneLake. The target can be an item of Lakehouse, KQLDatabase, or Warehouse.

path

string

A string representing the full path to the target folder within the Item. This path should be relative to the root of the OneLake directory structure. For example: "Tables/myTablesFolder/someTableSubFolder".

workspaceId

string

The ID of the target workspace.

S3Compatible

An object containing the properties of the target S3 compatible data source.

Name Type Description
bucket

string

Specifies the target bucket within the S3 compatible location.

connectionId

string

A string representing the connection that is bound with the shortcut. The connectionId is a unique identifier used to establish a connection between the shortcut and the target datasource.

location

string

HTTP URL of the S3 compatible endpoint. This endpoint must be able to receive ListBuckets S3 API calls. The URL must be in the non-bucket specific format; no bucket should be specified here. For example: https://s3endpoint.contoso.com

subpath

string

Specifies a target folder or subfolder within the S3 compatible bucket. For example: /folder

Shortcut

An object representing a reference that points to other storage locations which can be internal or external to OneLake. Shortcut is defined by name, path where the shortcut is created and target specifying the target storage location.

Name Type Description
name

string

Name of the shortcut.

path

string

A string representing the full path where the shortcut is created, including either "Files" or "Tables".

target

Target

An object that contains the target datasource, and must specify exactly one of the supported destinations.

ShortcutConflictPolicy

When provided, it defines the action to take when a shortcut with the same name and path already exists. The default action is 'Abort'. Additional ShortcutConflictPolicy types may be added over time.

Name Type Description
Abort

string

When a shortcut with the same name and path already exists the shortcut creation will be cancelled.

GenerateUniqueName

string

When a shortcut with the same name and path already exists the shortcut creation will continue with a new unique shortcut name.

Target

An object that contains the target datasource, and must specify exactly one of the supported destinations as described in the table below.

Name Type Description
adlsGen2

AdlsGen2

An object containing the properties of the target ADLS Gen2 data source.

amazonS3

AmazonS3

An object containing the properties of the target Amazon S3 data source.

dataverse

Dataverse

An object containing the properties of the target Dataverse data source.

externalDataShare

ExternalDataShareTarget

An object containing the properties of the target external data share.

googleCloudStorage

GoogleCloudStorage

An object containing the properties of the target Google Cloud Storage data source.

oneLake

OneLake

An object containing the properties of the target OneLake data source.

s3Compatible

S3Compatible

An object containing the properties of the target S3 compatible data source.

type

Type

The type object contains properties like target shortcut account type. Additional types may be added over time.

Type

The type object contains properties like target shortcut account type. Additional types may be added over time.

Name Type Description
AdlsGen2

string

AdlsGen2

AmazonS3

string

AmazonS3

Dataverse

string

Dataverse

ExternalDataShare

string

ExternalDataShare

GoogleCloudStorage

string

GoogleCloudStorage

OneLake

string

OneLake

S3Compatible

string

S3Compatible