归档隧道
post /v1/organizations/tunnels/{tunnel_id}/archive
归档隧道。归档操作不可逆。
隧道上所有未归档的证书将在同一操作中被归档,主机名将被停用且永远不会重新分配,隧道令牌将被失效。对已归档的隧道重试此操作将返回现有记录,不会更改。
路径参数
-
tunnel_id: string隧道的 ID。
请求头参数
-
"anthropic-beta": array of "mcp-tunnels-2026-05-19"所有隧道端点都需要此参数。
"mcp-tunnels-2026-05-19"
返回值
-
id: string隧道的 ID。
-
archived_at: stringRFC 3339 日期时间字符串,表示隧道被归档的时间,如果未归档则为
null。 -
created_at: stringRFC 3339 日期时间字符串,表示隧道的创建时间。
-
display_name: string隧道的可读名称(1–255 个字符),如果未设置则为
null。 -
domain: stringAnthropic 为主机分配的隧道主机名。主机为该值子域名的 MCP 服务器 URL 将通过该隧道路由。全局唯一,即使隧道被归档后也不会被重用。
-
type: "tunnel"对象类型。隧道始终为
tunnel。"tunnel"
-
workspace_id: string该隧道所属工作区的 ID,默认工作区为
null。创建后不可更改。
示例
curl https://api.anthropic.com/v1/organizations/tunnels/$TUNNEL_ID/archive \
-X POST \
-H 'anthropic-version: 2023-06-01' \
-H "Authorization: Bearer $ANTHROPIC_WIF_BEARER_TOKEN"
响应
{
"id": "tnl_01Hx9Kp2RtQvMn3sWbYdLcF8",
"archived_at": "2024-11-01T23:59:27.427722Z",
"created_at": "2024-10-30T23:58:27.427722Z",
"display_name": "Production",
"domain": "a1b2c3d4.tunnel.anthropic.com",
"type": "tunnel",
"workspace_id": "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ"
}