Automate your deployment pipeline with Fabric APIs
The Microsoft Fabric deployment pipelines tool enables teams to build an efficient and reusable release process for their Fabric content.
Important
This feature is in preview.
Use the deployment pipelines Fabric REST APIs to integrate Fabric into your organization's automation process. Here are a few examples of what can be done by using the APIs:
Integrate Fabric into familiar DevOps tools such as Azure DevOps or GitHub Actions.
Schedule pipeline deployments to happen automatically at a specific time.
Deploy multiple pipelines at the same time.
Cascade depending on pipeline deployments. If you have content connected across pipelines, you can make sure some pipelines are deployed before others.
Prerequisites
To work with deployment pipeline APIs, you need the following prerequisites:
- The same prerequisites you need to use deployment pipelines.
- A Microsoft Entra token for Fabric service. Use that token in the authorization header of the API call. For information about how to get a token, see Fabric API quickstart.
You can use the REST APIs without PowerShell, but the scripts in this article use PowerShell. To run the scripts, you need to install the following programs:
Deployment pipelines API functions
The deployment pipelines Fabric REST APIs allow you to perform the following functions:
Get Deployment Pipeline: Returns information about the specified deployment pipeline.
List Deployment Pipelines: Returns a list of deployment pipelines that the user has access to.
List Deployment Pipeline Stages: Returns the stages of the specified deployment, including its ID, display name, description, and whether the stage is public or not.
List Deployment Pipeline Stage Items: Returns the supported items from the workspace assigned to the specified stage of the specified deployment pipeline.
Deploy Stage Content: Deploys items from the specified stage of the specified deployment pipeline.
Use this API to deploy all items or to select specific items to deploy. If no specific items are selected, all items are deployed.
To find the relevant stage ID to deploy, use the List Deployment Pipeline Stages API.
This API is integrated with the Long Running Operations APIs to monitor the deployment status.
- Get the operation state to see if the operation is complete with the Get Long Running - Get Operation state API.
- For 24 hours after the deployment is completed, the extended deployment information is available in theGet Operation Result API.
You can also use other Fabric REST API calls, to complete related operations.
PowerShell examples
You can use the following PowerShell scripts to understand how to perform several automation processes. To view or copy the text in a PowerShell sample, use the links in this section.
-
Provide the following information:
- Pipeline name
- Source stage name
- Target stage name
- Deployment notes (optional)
-
Provide the following information:
- Pipeline name
- Source stage name
- Target stage name
- Items to deploy (items display name and item type)
- Deployment notes (optional)
Considerations and limitations
When using the deployment pipelines APIs, consider the following limitations:
All limitations that apply for deployment pipeline, apply when using the APIs. For more information, see Deployment pipelines best practices.
Dataflows are currently not supported. Customers using dataflows can use the Power BI APIs.
Service principals are only supported for Power BI items.
Not all deployment options available in the Power BI APIs are available in Fabric. The following APIs aren't available in Fabric's Deploy stage content API:
- allowPurgeData
- allowTakeOver
- allowSkipTilesWithMissingPrerequisites
If you need one of these APIs, use the Power BI API to deploy. However, these APIs only work for Power BI items.