列出審查案件
GET/v1/compliance/review/cases
列出 API 金鑰可存取之所有組織的審查案件,預設依最新優先排序。除非設定了 status,否則會同時傳回開啟中與已關閉的案件。
若要同步,請儲存您已讀取的最大 updated_at 值,並將其作為 updated_at 的「大於或等於」篩選條件傳送,同時依 updated_at 遞增排序。這樣即可找到新案件、新關閉的案件,以及有新通知的案件。請讀取每一頁,依 id 比對結果,並在讀取最後一頁後儲存新的最大值。
若請求帶有 anthropic-user-profile-id 標頭但未提供 user_profile_id 參數,將傳回 400 錯誤。
具有 read:compliance_review_cases 範圍的 Admin API 金鑰可呼叫此端點。
Parameters
Returns
列出審查案件
package main
import (
"context"
"fmt"
"github.com/anthropics/anthropic-sdk-go/v2"
"github.com/anthropics/anthropic-sdk-go/v2/option"
)
func main() {
client := anthropic.NewClient(
option.WithAPIKey("my-anthropic-api-key"),
)
page, err := client.Beta.Compliance.Review.Cases.List(context.TODO(), anthropic.BetaComplianceReviewCaseListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}Response 200
{
"data": [
{
"id": "id",
"created_at": "2019-12-27T18:11:19.117Z",
"enforcement_action": {
"type": "type"
},
"organization_id": "organization_id",
"policy_categories": [
"cyber"
],
"status": {
"type": "open"
},
"transcripts": [
{
"item_id": "item_id",
"user_profile_id": "user_profile_id"
}
],
"type": "compliance_review_case",
"updated_at": "2019-12-27T18:11:19.117Z",
"workspace_id": "workspace_id"
}
],
"next_page": "next_page"
}Returns Examples
Response 200
{
"data": [
{
"id": "id",
"created_at": "2019-12-27T18:11:19.117Z",
"enforcement_action": {
"type": "type"
},
"organization_id": "organization_id",
"policy_categories": [
"cyber"
],
"status": {
"type": "open"
},
"transcripts": [
{
"item_id": "item_id",
"user_profile_id": "user_profile_id"
}
],
"type": "compliance_review_case",
"updated_at": "2019-12-27T18:11:19.117Z",
"workspace_id": "workspace_id"
}
],
"next_page": "next_page"
}