Last active
March 21, 2025 10:24
-
-
Save 7effrey89/d9429ebaefd80bc22d1f70b6c1c19595 to your computer and use it in GitHub Desktop.
Azure DevOps Pipeline to Execute Microsoft Fabric Pipeline using REST API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| trigger: | |
| branches: | |
| include: | |
| - main | |
| variables: | |
| pWorkspaceId: '<GUID OF FABRIC WORKSPACE>' #My Fabric Workspace ID | |
| pPipelineId: '<GUID OF FABRIC PIPELINE IN WORKSPACE>' #My Fabric Pipeline ID | |
| stages: | |
| - stage: CallFabricAPI | |
| displayName: 'Call Fabric Pipeline' | |
| jobs: | |
| - job: RestCall | |
| pool: | |
| vmImage: 'ubuntu-latest' | |
| steps: | |
| - task: AzureCLI@2 | |
| displayName: 'Invoke Pipeline via Azure CLI' | |
| inputs: | |
| azureSubscription: 'jlaserviceconnection' #My ADO Managed Identity | |
| scriptType: 'bash' | |
| scriptLocation: 'inlineScript' | |
| inlineScript: | | |
| az rest --method post \ | |
| --resource "https://api.fabric.microsoft.com" \ | |
| --uri "https://api.fabric.microsoft.com/v1/workspaces/$(pWorkspaceId)/items/$(pPipelineId)/jobs/instances?jobType=Pipeline" \ | |
| --headers "Content-Type=application/json" \ | |
| --body '{"executionData":{"parameters":{"p1":{"value":6,"type":"int"},"p2":{"value":7,"type":"int"}}}}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment