Skip to content

Commit f21e1ba

Browse files
committed
Update Dynamic Sessions docs to latest API versions
1 parent 0735ae4 commit f21e1ba

7 files changed

Lines changed: 31 additions & 31 deletions

articles/container-apps/session-pool.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -273,14 +273,14 @@ The following endpoints are available for managing sessions in a pool:
273273

274274
| Endpoint path | Method | Description |
275275
|----------|--------|-------------|
276-
| `code/execute` | `POST` | Execute code in a session. |
276+
| `executions` | `POST` | Execute code in a session. |
277277
| `files/upload` | `POST` | Upload a file to a session. |
278278
| `files/content/{filename}` | `GET` | Download a file from a session. |
279279
| `files` | `GET` | List the files in a session. |
280280

281-
You build the full URL for each endpoint by concatenating the pool's management API endpoint with the endpoint path. The query string must include an `identifier` parameter containing the session identifier, and an `api-version` parameter with the value `2024-02-02-preview`.
281+
You build the full URL for each endpoint by concatenating the pool's management API endpoint with the endpoint path. The query string must include an `identifier` parameter containing the session identifier, and an `api-version` parameter with the value `2025-10-02-preview`.
282282

283-
For example: `https://<REGION>.dynamicsessions.io/subscriptions/<SUBSCRIPTION_ID>/resourceGroups/<RESOURCE_GROUP>/sessionPools/<SESSION_POOL_NAME>/code/execute?api-version=2024-02-02-preview&identifier=<IDENTIFIER>`
283+
For example: `https://<REGION>.dynamicsessions.io/subscriptions/<SUBSCRIPTION_ID>/resourceGroups/<RESOURCE_GROUP>/sessionPools/<SESSION_POOL_NAME>/executions?api-version=2025-10-02-preview&identifier=<IDENTIFIER>`
284284

285285
To retrieve the session pool's management endpoint, use the `az containerapp sessionpool show` command:
286286

articles/container-apps/sessions-code-interpreter.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ The following example shows how to upload a file to a session.
9595
Before you send the request, replace the placeholders between the `<>` brackets with values that are specific to your request.
9696

9797
```http
98-
POST https://<REGION>.dynamicsessions.io/subscriptions/<SUBSCRIPTION_ID>/resourceGroups/<RESOURCE_GROUP>/sessionPools/<SESSION_POOL_NAME>/files/upload?api-version=2024-02-02-preview&identifier=<SESSION_ID>
98+
POST https://<REGION>.dynamicsessions.io/subscriptions/<SUBSCRIPTION_ID>/resourceGroups/<RESOURCE_GROUP>/sessionPools/<SESSION_POOL_NAME>/files/upload?api-version=2025-10-02-preview&identifier=<SESSION_ID>
9999
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
100100
Authorization: Bearer <TOKEN>
101101
@@ -116,7 +116,7 @@ The following example demonstrates how to format a `GET` request to download a f
116116
Before you send the request, replace the placeholders between the `<>` brackets with values that are specific to your request.
117117

118118
```http
119-
GET https://<REGION>.dynamicsessions.io/subscriptions/<SUBSCRIPTION_ID>/resourceGroups/<RESOURCE_GROUP>/sessionPools/<SESSION_POOL_NAME>/files/content/<FILE_NAME_AND_EXTENSION>?api-version=2024-02-02-preview&identifier=<SESSION_ID>
119+
GET https://<REGION>.dynamicsessions.io/subscriptions/<SUBSCRIPTION_ID>/resourceGroups/<RESOURCE_GROUP>/sessionPools/<SESSION_POOL_NAME>/files/content/<FILE_NAME_AND_EXTENSION>?api-version=2025-10-02-preview&identifier=<SESSION_ID>
120120
Authorization: Bearer <TOKEN>
121121
```
122122

@@ -129,7 +129,7 @@ The following example shows how to list the files in a session's directory.
129129
Before you send the request, replace the placeholders between the `<>` brackets with values that are specific to your request.
130130

131131
```http
132-
GET https://<REGION>.dynamicsessions.io/subscriptions/<SUBSCRIPTION_ID>/resourceGroups/<RESOURCE_GROUP>/sessionPools/<SESSION_POOL_NAME>/files?api-version=2024-02-02-preview&identifier=<SESSION_ID>
132+
GET https://<REGION>.dynamicsessions.io/subscriptions/<SUBSCRIPTION_ID>/resourceGroups/<RESOURCE_GROUP>/sessionPools/<SESSION_POOL_NAME>/files?api-version=2025-10-02-preview&identifier=<SESSION_ID>
133133
Authorization: Bearer <TOKEN>
134134
```
135135

@@ -183,14 +183,14 @@ If you're not using an LLM framework integration, you can interact with the sess
183183

184184
## Run code in a session
185185

186-
To run code in a session, send a `POST` request to the `code/execute` endpoint with the code to run in the request body. Each code execution is limited to a maximum runtime of 220 seconds.
186+
To run code in a session, send a `POST` request to the `executions` endpoint with the code to run in the request body. Each code execution is limited to a maximum runtime of 220 seconds.
187187

188188
The following example prints `Hello, world!` in Python.
189189

190190
Before you send the request, replace the placeholders between the `<>` brackets with the appropriate values for your session pool and session identifier.
191191

192192
```http
193-
POST https://<REGION>.dynamicsessions.io/subscriptions/<SUBSCRIPTION_ID>/resourceGroups/<RESOURCE_GROUP>/sessionPools/<SESSION_POOL_NAME>/code/execute?api-version=2024-02-02-preview&identifier=<SESSION_ID>
193+
POST https://<REGION>.dynamicsessions.io/subscriptions/<SUBSCRIPTION_ID>/resourceGroups/<RESOURCE_GROUP>/sessionPools/<SESSION_POOL_NAME>/executions?api-version=2025-10-02-preview&identifier=<SESSION_ID>
194194
Content-Type: application/json
195195
Authorization: Bearer <TOKEN>
196196
@@ -214,7 +214,7 @@ Uploaded files are stored in the session's file system in the `/mnt/data` direct
214214
Before you send the request, replace the placeholders between the `<>` brackets with values that are specific to your request.
215215

216216
```http
217-
POST https://<REGION>.dynamicsessions.io/subscriptions/<SUBSCRIPTION_ID>/resourceGroups/<RESOURCE_GROUP>/sessionPools/<SESSION_POOL_NAME>/files/upload?api-version=2024-02-02-preview&identifier=<SESSION_ID>
217+
POST https://<REGION>.dynamicsessions.io/subscriptions/<SUBSCRIPTION_ID>/resourceGroups/<RESOURCE_GROUP>/sessionPools/<SESSION_POOL_NAME>/files/upload?api-version=2025-10-02-preview&identifier=<SESSION_ID>
218218
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
219219
Authorization: Bearer <TOKEN>
220220
@@ -236,7 +236,7 @@ To download a file from a session's `/mnt/data` directory, send a `GET` request
236236
Before you send the request, replace the placeholders between the `<>` brackets with values that are specific to your request.
237237

238238
```http
239-
GET https://<REGION>.dynamicsessions.io/subscriptions/<SUBSCRIPTION_ID>/resourceGroups/<RESOURCE_GROUP>/sessionPools/<SESSION_POOL_NAME>/files/content/<FILE_NAME_AND_EXTENSION>?api-version=2024-02-02-preview&identifier=<SESSION_ID>
239+
GET https://<REGION>.dynamicsessions.io/subscriptions/<SUBSCRIPTION_ID>/resourceGroups/<RESOURCE_GROUP>/sessionPools/<SESSION_POOL_NAME>/files/content/<FILE_NAME_AND_EXTENSION>?api-version=2025-10-02-preview&identifier=<SESSION_ID>
240240
Authorization: Bearer <TOKEN>
241241
```
242242

@@ -247,7 +247,7 @@ To list the files in a session's `/mnt/data` directory, send a `GET` request to
247247
Before you send the request, replace the placeholders between the `<>` brackets with values that are specific to your request.
248248

249249
```http
250-
GET https://<REGION>.dynamicsessions.io/subscriptions/<SUBSCRIPTION_ID>/resourceGroups/<RESOURCE_GROUP>/sessionPools/<SESSION_POOL_NAME>/files?api-version=2024-02-02-preview&identifier=<SESSION_ID>
250+
GET https://<REGION>.dynamicsessions.io/subscriptions/<SUBSCRIPTION_ID>/resourceGroups/<RESOURCE_GROUP>/sessionPools/<SESSION_POOL_NAME>/files?api-version=2025-10-02-preview&identifier=<SESSION_ID>
251251
Authorization: Bearer <TOKEN>
252252
```
253253

@@ -285,12 +285,12 @@ Following is an example of the type of response you can expect when you request
285285

286286
Python code interpreter sessions include popular Python packages such as NumPy, pandas, and scikit-learn.
287287

288-
To output the list of preinstalled packages, call the `code/execute` endpoint with the following code.
288+
To output the list of preinstalled packages, call the `executions` endpoint with the following code.
289289

290290
Before you send the request, replace the placeholders between the `<>` brackets with values that are specific to your request.
291291

292292
```http
293-
POST https://<REGION>.dynamicsessions.io/subscriptions/<SUBSCRIPTION_ID>/resourceGroups/<RESOURCE_GROUP>/sessionPools/<SESSION_POOL_NAME>/identifier/<SESSION_ID>/code/execute?api-version=2024-02-02-preview&identifier=<SESSION_ID>
293+
POST https://<REGION>.dynamicsessions.io/subscriptions/<SUBSCRIPTION_ID>/resourceGroups/<RESOURCE_GROUP>/sessionPools/<SESSION_POOL_NAME>/executions?api-version=2025-10-02-preview&identifier=<SESSION_ID>
294294
Content-Type: application/json
295295
Authorization: Bearer <TOKEN>
296296
@@ -314,14 +314,14 @@ If you need request or response tracing, capture it in the application that call
314314
315315
## Metrics
316316

317-
Code interpreter usage and execution metrics are returned as HTTP response headers for the Execute Code API. These metrics aren't written to Log Analytics.
317+
Code interpreter usage and execution metrics are returned as HTTP response headers for the code execution API. These metrics aren't written to Log Analytics.
318318

319319
### View metrics
320320

321-
1. Call the Execute Code API (`code/execute`).
321+
1. Call the code execution API (`/executions`).
322322
2. Inspect the HTTP response headers for usage and execution metrics.
323323

324-
For details about the Execute Code API and endpoints, see [Run code in a session](#run-code-in-a-session) and [Management API endpoints](#management-api-endpoints).
324+
For details about the code execution API and endpoints, see [Run code in a session](#run-code-in-a-session) and [Management API endpoints](#management-api-endpoints).
325325

326326
## Billing
327327

articles/container-apps/sessions-custom-container.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,22 +124,22 @@ After allocating a session, you can call this API to manually terminate it at an
124124
#### Request
125125

126126
```http
127-
POST {PoolManagementEndpoint}/.management/stopSession?api-version=2025-02-02-preview&identifier={SessionIdentifier}
127+
POST {PoolManagementEndpoint}/.management/stopSession?api-version=2025-10-02-preview&identifier={SessionIdentifier}
128128
```
129129

130130
#### Parameters
131131

132132
| Parameter | Type | Required | Description |
133133
| --- | --- | --- | --- |
134-
| `api-version` | string | Yes | The API version to use (for example, `2025-02-02-preview`). |
134+
| `api-version` | string | Yes | The API version to use (for example, `2025-10-02-preview`). |
135135
| `identifier` | string | Yes | The unique identifier of the session to stop. |
136136

137137
### Examples
138138

139139
#### Request
140140

141141
```http
142-
POST https://{PoolManagementEndpoint}/.management/stopSession?api-version=2025-02-02-preview&identifier=testSessionIdentifier
142+
POST https://{PoolManagementEndpoint}/.management/stopSession?api-version=2025-10-02-preview&identifier=testSessionIdentifier
143143
```
144144

145145
#### Response

articles/container-apps/sessions-tutorial-nodejs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ Now that you have a bearer token to establish the security context, and the sess
163163
Run the following command to run the JavaScript code to log "hello world" in your application.
164164
165165
```bash
166-
curl -v -X 'POST' -H "$AUTH_HEADER" "$SESSION_POOL_MANAGEMENT_ENDPOINT/code/execute?api-version=2024-02-02-preview&identifier=test" -H 'Content-Type: application/json' -d '
166+
curl -v -X 'POST' -H "$AUTH_HEADER" "$SESSION_POOL_MANAGEMENT_ENDPOINT/executions?api-version=2025-10-02-preview&identifier=test" -H 'Content-Type: application/json' -d '
167167
{
168168
"properties": {
169169
"codeInputType": "inline",

articles/container-apps/sessions-tutorial-python-mcp.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,9 @@ Use an ARM template to create a Python session pool with MCP server enabled.
104104
"location": { "type": "String" }
105105
},
106106
"resources": [
107-
{
107+
{
108108
"type": "Microsoft.App/sessionPools",
109-
"apiVersion": "2025-02-02-preview",
109+
"apiVersion": "2025-10-02-preview",
110110
"name": "[parameters('name')]",
111111
"location": "[parameters('location')]",
112112
"properties": {
@@ -147,15 +147,15 @@ Use an ARM template to create a Python session pool with MCP server enabled.
147147
Retrieve the MCP server endpoint from the deployed session pool.
148148

149149
```azurecli
150-
MCP_ENDPOINT=$(az rest --method GET --uri "https://management.azure.com/subscriptions/$SUBSCRIPTION_ID/resourceGroups/$RESOURCE_GROUP/providers/Microsoft.App/sessionPools/$SESSION_POOL_NAME" --uri-parameters api-version=2025-02-02-preview --query "properties.mcpServerSettings.mcpServerEndpoint" -o tsv)
150+
MCP_ENDPOINT=$(az rest --method GET --uri "https://management.azure.com/subscriptions/$SUBSCRIPTION_ID/resourceGroups/$RESOURCE_GROUP/providers/Microsoft.App/sessionPools/$SESSION_POOL_NAME" --uri-parameters api-version=2025-10-02-preview --query "properties.mcpServerSettings.mcpServerEndpoint" -o tsv)
151151
```
152152

153153
## Get MCP server credentials
154154

155155
Request API credentials for the MCP server.
156156

157157
```azurecli
158-
API_KEY=$(az rest --method POST --uri "https://management.azure.com/subscriptions/$SUBSCRIPTION_ID/resourceGroups/$RESOURCE_GROUP/providers/Microsoft.App/sessionPools/$SESSION_POOL_NAME/fetchMCPServerCredentials" --uri-parameters api-version=2025-02-02-preview --query "apiKey" -o tsv)
158+
API_KEY=$(az rest --method POST --uri "https://management.azure.com/subscriptions/$SUBSCRIPTION_ID/resourceGroups/$RESOURCE_GROUP/providers/Microsoft.App/sessionPools/$SESSION_POOL_NAME/fetchMCPServerCredentials" --uri-parameters api-version=2025-10-02-preview --query "apiKey" -o tsv)
159159
```
160160

161161
## Initialize the MCP server

articles/container-apps/sessions-tutorial-shell-mcp.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,9 @@ Use an ARM template to create a shell session pool with MCP server enabled.
104104
"location": { "type": "String" }
105105
},
106106
"resources": [
107-
{
107+
{
108108
"type": "Microsoft.App/sessionPools",
109-
"apiVersion": "2025-02-02-preview",
109+
"apiVersion": "2025-10-02-preview",
110110
"name": "[parameters('name')]",
111111
"location": "[parameters('location')]",
112112
"properties": {
@@ -147,15 +147,15 @@ Use an ARM template to create a shell session pool with MCP server enabled.
147147
Retrieve the MCP server endpoint from the deployed session pool.
148148

149149
```azurecli
150-
MCP_ENDPOINT=$(az rest --method GET --uri "/subscriptions/$SUBSCRIPTION_ID/resourceGroups/$RESOURCE_GROUP/providers/Microsoft.App/sessionPools/$SESSION_POOL_NAME?api-version=2025-02-02-preview" --query "properties.mcpServerSettings.mcpServerEndpoint" -o tsv)
150+
MCP_ENDPOINT=$(az rest --method GET --uri "/subscriptions/$SUBSCRIPTION_ID/resourceGroups/$RESOURCE_GROUP/providers/Microsoft.App/sessionPools/$SESSION_POOL_NAME?api-version=2025-10-02-preview" --query "properties.mcpServerSettings.mcpServerEndpoint" -o tsv)
151151
```
152152

153153
## Get MCP server credentials
154154

155155
Request API credentials for the MCP server.
156156

157157
```azurecli
158-
API_KEY=$(az rest --method POST --uri "/subscriptions/$SUBSCRIPTION_ID/resourceGroups/$RESOURCE_GROUP/providers/Microsoft.App/sessionPools/$SESSION_POOL_NAME/fetchMCPServerCredentials?api-version=2025-02-02-preview" --query "apiKey" -o tsv)
158+
API_KEY=$(az rest --method POST --uri "/subscriptions/$SUBSCRIPTION_ID/resourceGroups/$RESOURCE_GROUP/providers/Microsoft.App/sessionPools/$SESSION_POOL_NAME/fetchMCPServerCredentials?api-version=2025-10-02-preview" --query "apiKey" -o tsv)
159159
```
160160

161161
## Initialize the MCP server

articles/container-apps/sessions-tutorial-shell.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Begin by preparing the Azure CLI with the latest updates and signing in to Azure
7272
RESOURCE_GROUP=<RESOURCE_GROUP_NAME>
7373
SESSION_POOL_NAME=<SESSION_POOL_NAME>
7474
LOCATION=<LOCATION>
75-
API_VERSION="2025-02-02-preview"
75+
API_VERSION="2025-10-02-preview"
7676
```
7777

7878
You use these variables to create the resources in the following steps.
@@ -98,8 +98,8 @@ Create an ARM template file named `deploy.json` to define your shell session poo
9898
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
9999
"contentVersion": "1.0.0.0",
100100
"resources": [
101-
{
102-
"apiVersion": "2025-02-02-preview",
101+
{
102+
"apiVersion": "2025-10-02-preview",
103103
"name": "myshellpool",
104104
"type": "Microsoft.App/sessionpools",
105105
"location": "North Central US",

0 commit comments

Comments
 (0)