Forum Discussion

Yacine911's avatar
Yacine911
Frequent Visitor
1 year ago
Solved

monitoring notebook via API

Hello everyone,

 

I'm running a notebook using the Fabric API, and while the execution works fine, I haven't found a way to monitor its status. Specifically, I can't retrieve the Job Instance ID that would allow me to track the notebook's execution progress

 

POST https://api.fabric.microsoft.com/v1/workspaces/XXXXX-XXXXX-XXXXXX/items/XXXXX-XXXXX-XXXXXX/jobs/instances?jobType=RunNotebook

 

this is what i get 

 

{
"itemId":"xxxxx-xxxxxx-xxxxxx-xxxxxx-xxxxxxx",
"jobType":"RunNotebook",
"invokeType":"Manual",
"status":"NotStarted",
"failureReason":null,
"rootActivityId":"xxxxx-xxxxxx-xxxxxx-xxxxxx-xxxxxxx",
"startTimeUtc":"2025-04-17T12:50:18.000000Z",
"endTimeUtc":null,
"ResponseHeaders":{
"Pragma":"no-cache",
"Transfer-Encoding":"chunked",
"Retry-After":"11",
"Strict-Transport-Security":"max-age=31536000; includeSubDomains",
"X-Frame-Options":"deny",
"X-Content-Type-Options":"nosniff",
"RequestId":"xxxxx-xxxxxx-xxxxxx-xxxxxx-xxxxxxx",
"Access-Control-Expose-Headers":"RequestId,Retry-After",
"Cache-Control":"no-store, must-revalidate, no-cache",
"Date":"Thu, 17 Apr 2025 12:51:13 GMT",
"Content-Type":"application/json; charset=utf-8"
},
"executionDuration":63
}

  • Yacine911's avatar
    Yacine911
    1 year ago

    hi,

    The rootActivityId didn’t work, but funnily enough, the id is back, and it worked using that.

4 Replies

  • v-achippa's avatar
    v-achippa
    Community Support

    Hi Yacine911,

     

    Thank you for reaching out to Microsoft Fabric Community.

     

    The response from the POST request to run a notebook will not include a field like named job Instance Id. But we can use the rootActivityId which we get from the response to monitor the notebook's execution status.

     

    Run this below to get the rootActivityId:

    POST https://api.fabric.microsoft.com/v1/workspaces/{workspaceId}/items/{notebookId}/jobs/instances

     

    Run this below one to get the status:

    GET https://api.fabric.microsoft.com/v1/workspaces/{workspaceId}/items/{notebookId}/jobs/instances/{rootActivityId}

    {workspaceId} – your workspace Id

    {notebookId} – the notebook item Id

    {rootActivityId} – from the POST response

     

    If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it! 

     

    Thanks and regards,

    Anjan Kumar Chippa

    • v-achippa's avatar
      v-achippa
      Community Support

      Hi Yacine911,

       

      As we haven’t heard back from you, we wanted to kindly follow up to check if the solution I have provided for the issue worked? or let us know if you need any further assistance.
      If my response addressed, please mark it as "Accept as solution" and click "Yes" if you found it helpful.

       

      Thanks and regards,

      Anjan Kumar Chippa

    • Yacine911's avatar
      Yacine911
      Frequent Visitor

      hi,

      The rootActivityId didn’t work, but funnily enough, the id is back, and it worked using that.

      • v-achippa's avatar
        v-achippa
        Community Support

        Hi Yacine911,

         

        Thank you for the response, since the issue is resolved, I request you if any of the responses helped, kindly consider marking it as accept as solution or please mark the above post as accept as solution. This helps others in the community find it more easily. 

         

        Thanks and regards,

        Anjan Kumar Chippa