Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric certified for FREE! Don't miss your chance! Learn more

Get Notebook Exit Value from Fabric REST API

There is currently no way to get the exit value defined by notebookutils.notebook.exit("Exit Value"from a Notebook via the Job Scheduler api. 

 

Currently, the only way to get something approximating this is to raise a value and have the notebook error like:

raise(Exception("<Exit Value>"))

and then parsing it from the response as:

{

    'id': '<id>',

    'itemId': '<itemId>',

    'jobType': 'RunNotebook',

    'invokeType': 'Manual',

    'status': 'Failed',

    'failureReason': {

         'requestId': '<requestId>',

         'errorCode': 'Exception',

         'message': '{"name":"Exception","value":"<Exit Value>","traceback": "..."',

    },

    'rootActivityId': '3f0a6ff0-3e64-4978-a0c7-fee862e3c5fd',

    'startTimeUtc': '2026-01-08T22:28:52.3082611',

     'endTimeUtc': None

}

 

 

But this is a really stupid way of doing it. 

Status: New