End a PyGen MCP session
DELETE https://{controlplane_path}/api/1/rest/public/platform_mcp/mcp/pygen
Overview
This API terminates an active PyGen toolset MCP session and releases any associated server-side resources.
Call this endpoint when your client has finished using the PyGen toolset. After
the session is terminated, the Mcp-Session-Id is no longer valid
and any open SSE stream for the session is closed.
Prerequisites
- Read access to the requested assets
- An active PyGen toolset MCP session initialized with POST /platform_mcp/mcp/pygen.
Request
DELETE https://{controlplane_path}/api/1/rest/public/platform_mcp/mcp/pygen
Path parameters
| Key | Description |
|---|---|
controlplane_path |
Required. The path to the SnapLogic control plane:
elastic.snaplogic.com
For the UAT or EMEA control plane, substitute the name for elastic. For
example:
|
Request headers
| Key | Type | Description |
|---|---|---|
Authorization |
String | Required. SLToken or HTTP Basic credentials. |
Mcp-Session-Id |
String | Required. The session identifier to terminate. |
Request body
None.
Response
A successful request returns 200 OK with no response body.
HTTP status codes:
| Key | Description |
|---|---|
200 OK |
The session was terminated successfully. |
401 Unauthorized |
The request is missing a valid Authorization
header. |
502 Bad Gateway |
The Platform MCP Server is unreachable. |
Examples
DELETE https://cdn.elastic.snaplogic.com/api/1/rest/public/platform_mcp/mcp/pygen
Authorization: SLToken <your_token>
Mcp-Session-Id: <session_id>