OneLake Shortcuts - Creates Shortcuts In Bulk
Creates bulk shortcuts.
Note
This API is part of a Preview release and is provided for evaluation and development purposes only. It may change based on feedback and is not recommended for production use.
This API supports long running operations (LRO).
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 and Managed identities | Yes |
Interface
POST https://api.fabric.microsoft.com/v1/workspaces/{workspaceId}/items/{itemId}/shortcuts/bulkCreate
POST https://api.fabric.microsoft.com/v1/workspaces/{workspaceId}/items/{itemId}/shortcuts/bulkCreate?shortcutConflictPolicy={shortcutConflictPolicy}
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
item
|
path | True |
string (uuid) |
The ID of the data item. |
workspace
|
path | True |
string (uuid) |
The ID of the workspace. |
shortcut
|
query |
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 |
---|---|---|---|
createShortcutRequests | True |
A list of shortcut creation requests. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Request completed successfully. |
|
202 Accepted |
Request accepted. Shortcut creation is in progress. Headers
|
|
Other Status Codes |
Common error codes:
|
Examples
Create bulk shortcut example
Sample request
POST https://api.fabric.microsoft.com/v1/workspaces/cfafbeb1-8037-4d0c-896e-a46fb27ff222/items/25bac802-080d-4f73-8a42-1b406eb1fceb/shortcuts/bulkCreate
{
"createShortcutRequests": [
{
"path": "Files/blafolder/folder1",
"name": "OneLakeShortcut1",
"target": {
"oneLake": {
"workspaceId": "acafbeb1-8037-4d0c-896e-a46fb27ff256",
"itemId": "56bac802-080d-4f73-8a42-1b406eb1fcac",
"path": "Tables/myTablesFolder/someTableSubFolder",
"connectionId": "4c868756-f7ce-4df1-8198-b1e5225b668f"
}
},
"transform": {
"type": "csvToDelta",
"properties": {
"delimiter": ",",
"skipFilesWithErrors": true,
"useFirstRowAsHeader": true
}
}
},
{
"path": "Files/blafolder/folder2",
"name": "OneLakeShortcut2",
"target": {
"oneLake": {
"workspaceId": "acafbeb1-8037-4d0c-896e-a46fb27ff256",
"itemId": "56bac802-080d-4f73-8a42-1b406eb1fcac",
"path": "Tables/myTablesFolder/someTableSubFolder",
"connectionId": "4c868756-f7ce-4df1-8198-b1e5225b668f"
}
},
"transform": {
"type": "csvToDelta",
"properties": {
"delimiter": ",",
"skipFilesWithErrors": true,
"useFirstRowAsHeader": true
}
}
},
{
"path": "Files/blafolder/folder3",
"name": "OneLakeShortcut3",
"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/operations/c424214a-4417-4ada-a9d8-9c2eae0ed0c3
x-ms-operation-id: c424214a-4417-4ada-a9d8-9c2eae0ed0c3
Retry-After: 1
{
"value": [
{
"request": {
"path": "Files/blafolder/folder1",
"name": "OneLakeShortcut1"
},
"result": {
"path": "Files/blafolder/folder3",
"name": "OneLakeShortcut1",
"target": {
"type": "OneLake",
"oneLake": {
"workspaceId": "acafbeb1-8037-4d0c-896e-a46fb27ff256",
"itemId": "56bac802-080d-4f73-8a42-1b406eb1fcac",
"path": "Tables/myTablesFolder/someTableSubFolder",
"connectionId": "4c868756-f7ce-4df1-8198-b1e5225b668f"
}
},
"transform": {
"type": "csvToDelta",
"properties": {
"delimiter": ",",
"skipFilesWithErrors": true,
"useFirstRowAsHeader": true
}
}
},
"status": "Succeeded"
},
{
"request": {
"path": "Files/blafolder/folder2",
"name": "OneLakeShortcut3"
},
"error": {
"errorCode": "ShorcutsOperationNotAllowed",
"message": "Shortcut operation set to abort and shortcut with same name already exists."
},
"transform": {
"type": "csvToDelta",
"properties": {
"delimiter": ",",
"skipFilesWithErrors": true,
"useFirstRowAsHeader": true
}
},
"status": "Failed"
},
{
"request": {
"path": "Files/blafolder/folder3",
"name": "OneLakeShortcut3"
},
"result": {
"path": "Files/blafolder/folder3",
"name": "OneLakeShortcut3",
"target": {
"type": "OneLake",
"oneLake": {
"workspaceId": "acafbeb1-8037-4d0c-896e-a46fb27ff256",
"itemId": "56bac802-080d-4f73-8a42-1b406eb1fcac",
"path": "Tables/myTablesFolder/someTableSubFolder"
}
}
},
"status": "Succeeded"
}
]
}
Definitions
Name | Description |
---|---|
Adls |
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. |
Azure |
An object containing the properties of the target Azure Blob Storage data source. |
Bulk |
A collection of CreateShortcutResponse that corresponds to the requested shortcut creation requests. |
Bulk |
A list of create shortcut requests. |
Creatable |
An object that contains the target datasource, and must specify exactly one of the supported destinations as described in the table below. |
Create |
An object that contains the original shortcut request, actual shortcut creation metadata, status of shortcut creation and if any associated errors. |
Create |
A shortcut creation request with an object representing a reference to another storage location. |
Csv |
CSV to Delta transform. |
Csv |
Properties for the CSV to Delta transform. |
Dataverse |
An object containing the properties of the target Dataverse data source. |
Error |
The error related resource details object. |
Error |
The error response. |
Error |
The error response details. |
External |
An object containing the properties of the target external data share. |
Google |
An object containing the properties of the target Google Cloud Storage data source. |
One |
An object containing the properties of the target OneLake data source. |
Request |
An object that contains the original shortcut name and path |
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. |
Shortcut |
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. |
Status |
The item job status. Additional statuses 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 (uuid) |
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 (uri) |
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 (uuid) |
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 (uri) |
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. |
AzureBlobStorage
An object containing the properties of the target Azure Blob Storage data source.
Name | Type | Description |
---|---|---|
connectionId |
string (uuid) |
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 Azure Blob Storage data location. Open the cloud connection's settings view and copy the GUID that is the connection ID. |
location |
string (uri) |
Specifies the location of the target Azure Blob Storage container. The URI must be in the format |
subpath |
string |
Specifies the container and subfolder within the Azure Blob Storage account where the target folder is located. Must be of the format [container]/[subfolder]. [Container] is the name of the container that holds the files and folders. [Subfolder] is the name of the subfolder within the container and is optional. For example: /mycontainer/mysubfolder |
BulkCreateShortcutResponse
A collection of CreateShortcutResponse that corresponds to the requested shortcut creation requests.
Name | Type | Description |
---|---|---|
value |
A list of create shortcut response. |
BulkCreateShortcutsRequest
A list of create shortcut requests.
Name | Type | Description |
---|---|---|
createShortcutRequests |
A list of shortcut creation requests. |
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 |
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. |
|
azureBlobStorage |
An object containing the properties of the target Azure Blob Storage data source. |
|
dataverse |
An object containing the properties of the target Dataverse data source. |
|
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. |
CreateShortcutResponse
An object that contains the original shortcut request, actual shortcut creation metadata, status of shortcut creation and if any associated errors.
Name | Type | Description |
---|---|---|
error |
The error details in case the operation is in failed state |
|
request |
An object that contains the original shortcut name and path |
|
result |
An object containing the shortcut properties and created shortcut name. |
|
status |
The status of create shortcut. Additional status may be added over time. |
CreateShortcutWithTransformRequest
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 |
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, Dataverse or Azure Blob storage. |
|
transform | Transform: |
An object that contains the transform name and its corresponding properties to be applied to target data, and must specify exactly one of the supported transformations: CsvToDelta |
CsvToDeltaTransform
CSV to Delta transform.
Name | Type | Description |
---|---|---|
properties |
CSV to Delta transform properties. |
|
type |
string:
csv |
The type of transform. Additional transform types may be added over time. |
CsvToDeltaTransformProperties
Properties for the CSV to Delta transform.
Name | Type | Default value | Description |
---|---|---|---|
delimiter |
string |
, |
Specifies the character used to separate values within a row in the CSV file and it must specify exactly one of the supported values: |
skipFilesWithErrors |
boolean |
True |
Whether to skip files with errors. True - Skip files with errors, False - Do not skip files with errors. Default value is True. |
useFirstRowAsHeader |
boolean |
True |
Whether first row of the CSV file should be used as the header. True - Use first row as header. False - Do not use first row as header. Default value is True. |
Dataverse
An object containing the properties of the target Dataverse data source.
Name | Type | Description |
---|---|---|
connectionId |
string (uuid) |
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) |
URI that indicates the Dataverse target environment's domain name. The URI should be formatted as "https://[orgname].crm[xx].dynamics.com", where |
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 |
List of additional error details. |
|
relatedResource |
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 |
The error related resource details. |
ExternalDataShareTarget
An object containing the properties of the target external data share.
Name | Type | Description |
---|---|---|
connectionId |
string (uuid) |
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 (uuid) |
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 (uri) |
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 |
---|---|---|
connectionId |
string (uuid) |
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. |
itemId |
string (uuid) |
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 (uuid) |
The ID of the target workspace. |
Request
An object that contains the original shortcut name and path
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". |
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 (uuid) |
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 (uri) |
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: |
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 |
An object that contains the target datasource, and must specify exactly one of the supported destinations. |
|
transform | Transform: |
An object that contains the transform name and its corresponding properties to be applied to target data, and must specify exactly one of the supported transformations. |
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.
Value | Description |
---|---|
Abort |
When a shortcut with the same name and path already exists the shortcut creation is cancelled. |
GenerateUniqueName |
When a shortcut with the same name and path already exists, the shortcut is created with a new unique name. |
Status
The item job status. Additional statuses may be added over time.
Value | Description |
---|---|
NotStarted |
Job not started |
InProgress |
Job in progress |
Completed |
Job completed |
Failed |
Job failed |
Cancelled |
Job cancelled |
Deduped |
A job instance of the same job type is already running and this job instance is skipped |
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 |
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. |
|
azureBlobStorage |
An object containing the properties of the target Azure Blob Storage data source. |
|
dataverse |
An object containing the properties of the target Dataverse data source. |
|
externalDataShare |
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. |
|
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.
Value | Description |
---|---|
OneLake |
OneLake |
AmazonS3 |
AmazonS3 |
AdlsGen2 |
AdlsGen2 |
GoogleCloudStorage |
GoogleCloudStorage |
S3Compatible |
S3Compatible |
Dataverse |
Dataverse |
ExternalDataShare |
ExternalDataShare |
AzureBlobStorage |
AzureBlobStorage |