Skip to content

Commit b97b119

Browse files
committed
Update dynamic sessions file endpoints
1 parent 7738189 commit b97b119

3 files changed

Lines changed: 39 additions & 14 deletions

File tree

articles/container-apps/session-pool.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,9 +274,10 @@ The following endpoints are available for managing sessions in a pool:
274274
| Endpoint path | Method | Description |
275275
|----------|--------|-------------|
276276
| `executions` | `POST` | Execute code in a session. |
277-
| `files/upload` | `POST` | Upload a file to a session. |
278-
| `files/content/{filename}` | `GET` | Download a file from a session. |
277+
| `files` | `POST` | Upload a file to a session. |
279278
| `files` | `GET` | List the files in a session. |
279+
| `files/{filename}` | `GET` | Get file metadata in a session. |
280+
| `files/{filename}/content` | `GET` | Download a file from a session. |
280281

281282
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`.
282283

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

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ File names and paths must use only the following supported characters:
8686

8787
### Upload a file
8888

89-
To upload a file to a session, send a `POST` request to the `uploadFile` endpoint in a multipart form data request. Include the file data in the request body. The file must include a file name.
89+
To upload a file to a session, send a `POST` request to the `files` endpoint in a multipart form data request. Include the file data in the request body. The file must include a file name.
9090

9191
Uploaded files are stored in the session's file system in the `/mnt/data` directory.
9292

@@ -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=2025-10-02-preview&identifier=<SESSION_ID>
98+
POST https://<REGION>.dynamicsessions.io/subscriptions/<SUBSCRIPTION_ID>/resourceGroups/<RESOURCE_GROUP>/sessionPools/<SESSION_POOL_NAME>/files?api-version=2025-10-02-preview&identifier=<SESSION_ID>
9999
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
100100
Authorization: Bearer <TOKEN>
101101
@@ -109,14 +109,27 @@ Content-Type: application/octet-stream
109109

110110
### Download a file
111111

112-
To download a file from a session's `/mnt/data` directory, send a `GET` request to the `file/content/{filename}` endpoint. The response includes the file data.
112+
To download a file from a session's `/mnt/data` directory, send a `GET` request to the `files/{filename}/content` endpoint. The response includes the file data.
113113

114114
The following example demonstrates how to format a `GET` request to download a file.
115115

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=2025-10-02-preview&identifier=<SESSION_ID>
119+
GET https://<REGION>.dynamicsessions.io/subscriptions/<SUBSCRIPTION_ID>/resourceGroups/<RESOURCE_GROUP>/sessionPools/<SESSION_POOL_NAME>/files/<FILE_NAME_AND_EXTENSION>/content?api-version=2025-10-02-preview&identifier=<SESSION_ID>
120+
Authorization: Bearer <TOKEN>
121+
```
122+
123+
### Get file metadata
124+
125+
To get metadata for a file in a session's `/mnt/data` directory, send a `GET` request to the `files/{filename}` endpoint. The response includes file properties such as size and last modified time.
126+
127+
The following example demonstrates how to format a `GET` request to retrieve file metadata.
128+
129+
Before you send the request, replace the placeholders between the `<>` brackets with values that are specific to your request.
130+
131+
```http
132+
GET https://<REGION>.dynamicsessions.io/subscriptions/<SUBSCRIPTION_ID>/resourceGroups/<RESOURCE_GROUP>/sessionPools/<SESSION_POOL_NAME>/files/<FILE_NAME_AND_EXTENSION>?api-version=2025-10-02-preview&identifier=<SESSION_ID>
120133
Authorization: Bearer <TOKEN>
121134
```
122135

@@ -207,14 +220,14 @@ To reuse a session, specify the same session identifier in subsequent requests.
207220

208221
#### Upload a file to a session
209222

210-
To upload a file to a session, send a `POST` request to the `uploadFile` endpoint in a multipart form data request. Include the file data in the request body. The file must include a file name.
223+
To upload a file to a session, send a `POST` request to the `files` endpoint in a multipart form data request. Include the file data in the request body. The file must include a file name.
211224

212225
Uploaded files are stored in the session's file system in the `/mnt/data` directory.
213226

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

216229
```http
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>
230+
POST https://<REGION>.dynamicsessions.io/subscriptions/<SUBSCRIPTION_ID>/resourceGroups/<RESOURCE_GROUP>/sessionPools/<SESSION_POOL_NAME>/files?api-version=2025-10-02-preview&identifier=<SESSION_ID>
218231
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
219232
Authorization: Bearer <TOKEN>
220233
@@ -231,12 +244,23 @@ Content-Type: application/octet-stream
231244
232245
#### Download a file from a session
233246

234-
To download a file from a session's `/mnt/data` directory, send a `GET` request to the `file/content/{filename}` endpoint. The response includes the file data.
247+
To download a file from a session's `/mnt/data` directory, send a `GET` request to the `files/{filename}/content` endpoint. The response includes the file data.
248+
249+
Before you send the request, replace the placeholders between the `<>` brackets with values that are specific to your request.
250+
251+
```http
252+
GET https://<REGION>.dynamicsessions.io/subscriptions/<SUBSCRIPTION_ID>/resourceGroups/<RESOURCE_GROUP>/sessionPools/<SESSION_POOL_NAME>/files/<FILE_NAME_AND_EXTENSION>/content?api-version=2025-10-02-preview&identifier=<SESSION_ID>
253+
Authorization: Bearer <TOKEN>
254+
```
255+
256+
#### Get file metadata
257+
258+
To get metadata for a file in a session's `/mnt/data` directory, send a `GET` request to the `files/{filename}` endpoint. The response includes file properties such as size and last modified time.
235259

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

238262
```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=2025-10-02-preview&identifier=<SESSION_ID>
263+
GET https://<REGION>.dynamicsessions.io/subscriptions/<SUBSCRIPTION_ID>/resourceGroups/<RESOURCE_GROUP>/sessionPools/<SESSION_POOL_NAME>/files/<FILE_NAME_AND_EXTENSION>?api-version=2025-10-02-preview&identifier=<SESSION_ID>
240264
Authorization: Bearer <TOKEN>
241265
```
242266

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ For the full API specification, see [SessionPools API](/rest/api/resource-manage
102102
If your session pool isn't maintaining the expected number of healthy `readySessionInstances`, consider the following:
103103

104104
1. **Check container logs** - Review session container logs to identify issues with probe endpoints or container startup. See [View logs for custom container session pools](troubleshooting.md#view-logs).
105-
2. **Verify probe configuration** - Ensure probe paths, ports, and thresholds are configured correctly for your application.
106-
3. **Review container health** - Check for issues inside your container that prevent probe endpoints from responding successfully.
105+
1. **Verify probe configuration** - Ensure probe paths, ports, and thresholds are configured correctly for your application.
106+
1. **Review container health** - Check for issues inside your container that prevent probe endpoints from responding successfully.
107107

108108
## Stop a session
109109

@@ -194,8 +194,8 @@ Once diagnostic settings are configured, logs are sent to your Log Analytics wor
194194
#### Query logs in Log Analytics
195195

196196
1. Navigate to your **Log Analytics workspace** in the Azure portal.
197-
2. Select **Logs** under **General**.
198-
3. Use [Kusto Query Language (KQL)](/azure/data-explorer/kusto/query/) to query session logs.
197+
1. Select **Logs** under **General**.
198+
1. Use [Kusto Query Language (KQL)](/azure/data-explorer/kusto/query/) to query session logs.
199199

200200
#### Example queries
201201

0 commit comments

Comments
 (0)