レビューケースを一覧表示
GET/v1/compliance/review/cases
APIキーがアクセスできるすべての組織のレビューケースを一覧表示します。デフォルトでは新しい順に並びます。status を設定しない限り、オープンとクローズの両方のケースが返されます。
同期するには、読み取った updated_at の最大値を保存し、それを updated_at の以上(at-or-after)フィルターとして送信し、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"
}