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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
rushp
New Member

Running Notebooks via API with a Specified Session ID

I want to run a Fabric notebook via an API endpoint using a high-concurrency session that I have just manually started.

My approach was to include the sessionID in the request payload and send a POST request, but it ends up creating a run using both the concurrent session and a new standard session.

So, where and how should I include the sessionID in the sample request payload that I found in the official documentation?

I tried adding sessionID and sessionId as a key within "conf" dictionary - it does not work.

 

POST https://api.fabric.microsoft.com/v1/workspaces/{{WORKSPACE_ID}}/items/{{ARTIFACT_ID}}/jobs/instances?jobType=RunNotebook

{
    "executionData": {
        "parameters": {
            "parameterName": {
                "value": "new value",
                "type": "string"
            }
        },
        "configuration": {
            "conf": {
                "spark.conf1": "value"
            },
            "environment": {
                "id": "<environment_id>",
                "name": "<environment_name>"
            },
            "defaultLakehouse": {
                "name": "<lakehouse-name>",
                "id": "<lakehouse-id>",
                "workspaceId": "<(optional) workspace-id-that-contains-the-lakehouse>"
            },
            "useStarterPool": false,
            "useWorkspacePool": "<workspace-pool-name>"
        }
    }
}

 IS THIS EVEN POSSIBLE???

 

Has anyone explored a solution other than using notebookutils.notebook.run()?

I tried but couldn’t find any.
Below are the two jobs that were created after manually initiating a High Concurrency session and sending the API request mentioned above — one that uses the High Concurrency session (which is desired), and another that creates a new independent session (which is not desired).run.png

 

 

 

 

1 ACCEPTED SOLUTION
Akash_Varuna
Super User
Super User

Hi @rushp I don’t think it’s currently possible to bind a manually started high-concurrency session directly to a notebook execution via the Fabric API. You might need to explore notebookutils.notebook.run() or raise a support ticket with Microsoft for clarification.

View solution in original post

3 REPLIES 3
rushp
New Member

Thanks for the clarification, @Akash_Varuna .

Yes, for now, I've implemented a workaround using notebookutils.notebook.run(), and it works.

@rushp If the solution works please do give a kudos and accept it as a solution so as it will be easier for others to find
Thanks In Advance 

Akash_Varuna
Super User
Super User

Hi @rushp I don’t think it’s currently possible to bind a manually started high-concurrency session directly to a notebook execution via the Fabric API. You might need to explore notebookutils.notebook.run() or raise a support ticket with Microsoft for clarification.

Helpful resources

Announcements
FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Fabric Update Carousel

Fabric Monthly Update - March 2026

Check out the March 2026 Fabric update to learn about new features.