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

Request

DELETE https://{controlplane_path}/api/1/rest/public/platform_mcp/mcp/pygen
      

Path parameters

Key Description
controlplane_path Required. The SnapLogic control plane host: elastic.snaplogic.com (US) or emea.snaplogic.com (EU).

Request headers

Key Type Description
Authorization String Required. HTTP Basic credentials. Refer to MCP APIs — Authentication for format details.
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.
403 Forbidden The authenticated user doesn't have permission to access the requested organization or resource.
502 Bad Gateway The SnapLogic MCP Server is unreachable.

Examples

DELETE https://elastic.snaplogic.com/api/1/rest/public/platform_mcp/mcp/pygen
Authorization: Basic <base64_credentials>
Mcp-Session-Id: <session_id>