Claude Platform Docs

下載外掛程式版本封存檔

$client->beta->organization->plugins->versions->download(string version, string pluginID, ?string organizationID, ?list<AnthropicBeta> betas): download
GET/v1/organizations/plugins/{plugin_id}/versions/{version}/content
Requires anthropic-beta: ce-plugins-2026-09-01. How to send beta headers

下載某個版本的 .zip 封存檔,內容與儲存時完全相同。每次從成員個人外掛程式市集下載外掛程式,都會記錄在 Compliance API 活動摘要中。

回應主體即為封存檔(Content-Type: application/zip),以附件形式傳送,其檔名衍生自外掛程式的名稱;由於該檔名並非唯一,請使用請求路徑中的 ID 為儲存的檔案命名。

接受的憑證:具有 read:plugins 或 read:org_audit 範圍的 Admin API 金鑰,或具有 read:compliance_org_data 範圍的 Compliance Access Key。

上述每個讀取範圍(read:plugins、read:org_audit 和 read:compliance_org_data)都可以下載成員個人市集中外掛程式的檔案,包括 claude.ai 管理設定中未顯示的檔案;而為您上層組織的所有連結組織建立的 read:org_audit 或 read:compliance_org_data 金鑰,可透過傳入 organization_id,在其下任何可存取此 API 的組織中執行此操作。每次此類下載都會在 Compliance API 活動摘要中記錄一個 claude_plugin_archive_accessed 事件,標示金鑰、外掛程式、版本及成員。下載組織擁有的外掛程式則不會被記錄。

每個請求都必須包含 beta 標頭 anthropic-beta: ce-plugins-2026-09-01。缺少此標頭的請求會傳回 404,與端點不存在時完全相同。外掛程式 API 目前為 beta 版,僅供 Claude Enterprise 組織使用。Claude Platform(Claude Console)組織或已啟用 HIPAA 就緒功能的組織無法使用。

Parameters
pluginID: string⁠Path parameter

ID of the Plugin (prefixed plugin_).

version: string⁠Path parameter

ID of the Plugin Version (prefixed pluginver_). latest is not accepted here.

organizationID?: optional string⁠Query parameter

For a read:org_audit or read:compliance_org_data key created for all of a parent organization's linked organizations: a child organization of that parent to read instead of the organization the key was created in, given as the organization's UUID or its org_-prefixed ID. A value that is neither returns a 400; an organization that is not a child of the key's parent, or where the Plugins API is not available, returns a 404. Any other key may pass only its own organization's ID here; another organization returns a 404.

betas?: optional list<AnthropicBeta>⁠Header parameter

This endpoint is in beta: requests must send ce-plugins-2026-09-01 in this header.

Returns
mixed
下載外掛程式版本封存檔
<?php

require_once dirname(__DIR__) . '/vendor/autoload.php';

use Anthropic\Client;
use Anthropic\Beta\AnthropicBeta;

$client = new Client(apiKey: 'my-anthropic-api-key');

$response = $client->beta->organization->plugins->versions->download(
  'version',
  pluginID: 'plugin_id',
  organizationID: 'organization_id',
  betas: [AnthropicBeta::MESSAGE_BATCHES_2024_09_24],
);

var_dump($response);