Forum Discussion

AyusmanBasu0604's avatar
10 months ago
Solved

re-trigger Fabric pipeline job using REST API

Hi Team,

based on the documentation provided here: https://learn.microsoft.com/en-us/fabric/data-factory/pipeline-rest-api-capabilities#run-on-demand-pipeline-job 

We can run an on-demand job with Pipeline name, ID details but how about if we want to re-run the same Pipeline Job?
Can we use Job/Instance ID anywhere? We have Instance ID in case we want to fetch a job status.

But any API to re-run a specific job? or,
1. Could we somehow add jobInstanceId to the URL or in the body of the following URL? POST https://api.fabric.microsoft.com/v1/workspaces/{workspaceId}/items/{itemId}/jobs/instances?jobType=Pipeline 

2. Is there a way to pass pipeline parameter details in the following payload for the same API url mentioned above?
{
"executionData": {
"pipelineName": "pipeline",
"OwnerUserPrincipalName": "<[email protected]>",
"OwnerUserObjectId": "<Your ObjectId>"
}
}

3 Replies

  • Hi AyusmanBasu0604

     

    I'm not aware of a way to re-run a specific instance of a job.

    I think you would need to start a new job instance using the same payload. See this helpful post about the API: 
    Fabric REST API — Data pipelines. This post outlines the various Fabric… | by Aitor Murguzur | Medium.

     

     

    You can also use the newer Scheduler API to start a new on demand job instance: 

    Job Scheduler - Run On Demand Item Job - REST API (Core) | Microsoft Learn

    With this you can include execution data: 

    POST https://api.fabric.microsoft.com/v1/workspaces/4b218778-e7a5-4d73-8187-f10824047715/items/431e8d7b-4a95-4c02-8ccd-6faef5ba1bd7/jobs/instances?jobType=DefaultJob
    
    {
      "executionData": {
        "tableName": "Table1",
        "optimizeSettings": {
          "vOrder": true
        }
      }
    }

     

    If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution.

  • v-prasare's avatar
    v-prasare
    Icon for Community Support rankCommunity Support

    Hi AyusmanBasu0604,

    We would like to confirm if our community members answer resolves your query or if you need further help. If you still have any questions or need more support, please feel free to let us know. We are happy to help you.


    tayloramy ,Thanks for your prompt response

     

     

     

    Thank you for your patience and look forward to hearing from you.
    Best Regards,
    Prashanth Are
    MS Fabric community support

  • v-prasare's avatar
    v-prasare
    Icon for Community Support rankCommunity Support

    Hi AyusmanBasu0604 

    We would like to confirm if our community members answer resolves your query or if you need further help. If you still have any questions or need more support, please feel free to let us know. We are happy to help you.

     

     

     

    Thank you for your patience and look forward to hearing from you.
    Best Regards,
    Prashanth Are
    MS Fabric community support