Überprüfungsfälle auflisten
Listet die Überprüfungsfälle aller Organisationen auf, die der API-Key erreichen kann, standardmäßig die neuesten zuerst. Sowohl offene als auch geschlossene Fälle werden zurückgegeben, sofern status nicht gesetzt ist.
Speichere zum Synchronisieren den größten updated_at-Wert, den du gelesen hast, und sende ihn als Filter „gleich oder später“ für updated_at, sortiert nach updated_at aufsteigend. So findest du neue Fälle, neu geschlossene Fälle und Fälle mit einer neuen Mitteilung. Lies jede Seite, ordne Ergebnisse anhand von id zu und speichere nach der letzten Seite den neuen größten Wert.
Eine Anfrage mit dem Header anthropic-user-profile-id und ohne den Parameter user_profile_id gibt einen 400-Fehler zurück.
Ein Admin-API-Key mit dem Scope read:compliance_review_cases kann diesen Endpunkt aufrufen.
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)
}{
"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
{
"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"
}