To enable the Compliance API, see the setup guide.
Set up the Compliance API列出项目附件
GET/v1/compliance/apps/projects/{project_id}/attachments
列出附加到项目的文件和文档。
列出附加到 project_id 所引用项目的文件和项目文档。这包括附加文件的 ID 以及附加的项目文档。
附加文件的原始二进制内容可使用 GET /v1/compliance/apps/chats/files/{claude_file_id}/content 端点下载。
附加项目文档的文本内容可使用 GET /v1/compliance/apps/projects/documents/{claude_proj_doc_id} 端点获取。
Path parameters
Query parameters
Headers
Returns
列出项目附件
cURL
curl https://api.anthropic.com/v1/compliance/apps/projects/$PROJECT_ID/attachments \
-H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"Response 200
{
"data": [
{
"id": "id",
"created_at": "2019-12-27T18:11:19.117Z",
"filename": "filename",
"md5": "md5",
"mime_type": "mime_type",
"size_bytes": 0,
"type": "project_file"
}
],
"has_more": true,
"next_page": "next_page"
}Returns Examples
Response 200
{
"data": [
{
"id": "id",
"created_at": "2019-12-27T18:11:19.117Z",
"filename": "filename",
"md5": "md5",
"mime_type": "mime_type",
"size_bytes": 0,
"type": "project_file"
}
],
"has_more": true,
"next_page": "next_page"
}