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"
}