下載 Plugin 版本封存檔
下載某個版本的 .zip 封存檔,內容與儲存時完全相同。每次從成員個人外掛程式市集下載 Plugin,都會記錄在 Compliance API 活動摘要中。
回應主體即為封存檔(Content-Type: application/zip),以附件形式傳送,其檔名衍生自 Plugin 的名稱;由於該檔名並非唯一,請使用請求路徑中的 ID 為儲存的檔案命名。
**接受的憑證:**具有 read:plugins 或 read:org_audit 範圍的 Admin API 金鑰,或具有 read:compliance_org_data 範圍的 Compliance Access Key。
上述每個讀取範圍(read:plugins、read:org_audit 和 read:compliance_org_data)都可以下載成員個人市集中 Plugin 的檔案,包括 claude.ai 管理設定中未顯示的檔案;而為您上層組織的所有連結組織建立的 read:org_audit 或 read:compliance_org_data 金鑰,可透過傳入 organization_id,在其下任何可存取此 API 的組織中執行此操作。每次此類下載都會在 Compliance API 活動摘要中記錄一個 claude_plugin_archive_accessed 事件,標示金鑰、Plugin、版本及成員。下載組織擁有的 Plugin 則不會被記錄。
每個請求都必須包含 beta 標頭 anthropic-beta: ce-plugins-2026-09-01。缺少此標頭的請求會傳回 404,與端點不存在時完全相同。Plugins API 目前為 beta 版,僅供 Claude Enterprise 組織使用。Claude Platform(Claude Console)組織或已啟用 HIPAA 就緒功能的組織無法使用。
Parameters
Returns
import os
from anthropic import Anthropic
client = Anthropic(
api_key=os.environ.get(
"ANTHROPIC_API_KEY"
), # This is the default and can be omitted
)
response = client.beta.organization.plugins.versions.download(
version="version",
plugin_id="plugin_id",
)
print(response)
content = response.read()
print(content)