Skip to content

Instantly share code, notes, and snippets.

@7effrey89
Last active March 21, 2025 10:24
Show Gist options
  • Select an option

  • Save 7effrey89/d9429ebaefd80bc22d1f70b6c1c19595 to your computer and use it in GitHub Desktop.

Select an option

Save 7effrey89/d9429ebaefd80bc22d1f70b6c1c19595 to your computer and use it in GitHub Desktop.
Azure DevOps Pipeline to Execute Microsoft Fabric Pipeline using REST API
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