## List abuse reports `client.AbuseReports.List(ctx, params) (*V4PagePagination[AbuseReportListResponse], error)` **get** `/accounts/{account_id}/abuse-reports` List the abuse reports for a given account ### Parameters - `params AbuseReportListParams` - `AccountID param.Field[string]` Path param: Cloudflare Account ID - `CreatedAfter param.Field[string]` Query param: Returns reports created after the specified date - `CreatedBefore param.Field[string]` Query param: Returns reports created before the specified date - `Domain param.Field[string]` Query param: Filter by domain name related to the abuse report - `MitigationStatus param.Field[AbuseReportListParamsMitigationStatus]` Query param: Filter reports that have any mitigations in the given status. - `const AbuseReportListParamsMitigationStatusPending AbuseReportListParamsMitigationStatus = "pending"` - `const AbuseReportListParamsMitigationStatusActive AbuseReportListParamsMitigationStatus = "active"` - `const AbuseReportListParamsMitigationStatusInReview AbuseReportListParamsMitigationStatus = "in_review"` - `const AbuseReportListParamsMitigationStatusCancelled AbuseReportListParamsMitigationStatus = "cancelled"` - `const AbuseReportListParamsMitigationStatusRemoved AbuseReportListParamsMitigationStatus = "removed"` - `Page param.Field[int64]` Query param: Where in pagination to start listing abuse reports - `PerPage param.Field[int64]` Query param: How many abuse reports per page to list - `Sort param.Field[string]` Query param: A property to sort by, followed by the order (id, cdate, domain, type, status) - `Status param.Field[AbuseReportListParamsStatus]` Query param: Filter by the status of the report. - `const AbuseReportListParamsStatusAccepted AbuseReportListParamsStatus = "accepted"` - `const AbuseReportListParamsStatusInReview AbuseReportListParamsStatus = "in_review"` - `Type param.Field[AbuseReportListParamsType]` Query param: Filter by the type of the report. - `const AbuseReportListParamsTypePhish AbuseReportListParamsType = "PHISH"` - `const AbuseReportListParamsTypeGen AbuseReportListParamsType = "GEN"` - `const AbuseReportListParamsTypeThreat AbuseReportListParamsType = "THREAT"` - `const AbuseReportListParamsTypeDmca AbuseReportListParamsType = "DMCA"` - `const AbuseReportListParamsTypeEmer AbuseReportListParamsType = "EMER"` - `const AbuseReportListParamsTypeTm AbuseReportListParamsType = "TM"` - `const AbuseReportListParamsTypeRegWho AbuseReportListParamsType = "REG_WHO"` - `const AbuseReportListParamsTypeNcsei AbuseReportListParamsType = "NCSEI"` - `const AbuseReportListParamsTypeNetwork AbuseReportListParamsType = "NETWORK"` ### Returns - `type AbuseReportListResponse struct{…}` - `Reports []AbuseReportListResponseReport` - `ID string` Public facing ID of abuse report, aka abuse_rand. - `Cdate string` Creation date of report. Time in RFC 3339 format (https://www.rfc-editor.org/rfc/rfc3339.html) - `Domain string` Domain that relates to the report. - `MitigationSummary AbuseReportListResponseReportsMitigationSummary` A summary of the mitigations related to this report. - `AcceptedURLCount int64` How many of the reported URLs were confirmed as abusive. - `ActiveCount int64` How many mitigations are active. - `ExternalHostNotified bool` Whether the report has been forwarded to an external hosting provider. - `InReviewCount int64` How many mitigations are under review. - `PendingCount int64` How many mitigations are pending their effective date. - `Status AbuseReportListResponseReportsStatus` An enum value that represents the status of an abuse record - `const AbuseReportListResponseReportsStatusAccepted AbuseReportListResponseReportsStatus = "accepted"` - `const AbuseReportListResponseReportsStatusInReview AbuseReportListResponseReportsStatus = "in_review"` - `Type AbuseReportListResponseReportsType` The abuse report type - `const AbuseReportListResponseReportsTypePhish AbuseReportListResponseReportsType = "PHISH"` - `const AbuseReportListResponseReportsTypeGen AbuseReportListResponseReportsType = "GEN"` - `const AbuseReportListResponseReportsTypeThreat AbuseReportListResponseReportsType = "THREAT"` - `const AbuseReportListResponseReportsTypeDmca AbuseReportListResponseReportsType = "DMCA"` - `const AbuseReportListResponseReportsTypeEmer AbuseReportListResponseReportsType = "EMER"` - `const AbuseReportListResponseReportsTypeTm AbuseReportListResponseReportsType = "TM"` - `const AbuseReportListResponseReportsTypeRegWho AbuseReportListResponseReportsType = "REG_WHO"` - `const AbuseReportListResponseReportsTypeNcsei AbuseReportListResponseReportsType = "NCSEI"` - `const AbuseReportListResponseReportsTypeNetwork AbuseReportListResponseReportsType = "NETWORK"` - `Justification string` Justification for the report. - `OriginalWork string` Original work / Targeted brand in the alleged abuse. - `Submitter AbuseReportListResponseReportsSubmitter` Information about the submitter of the report. - `Company string` - `Email string` - `Name string` - `Telephone string` - `URLs []string` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/abuse_reports" "github.com/cloudflare/cloudflare-go/option" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) page, err := client.AbuseReports.List(context.TODO(), abuse_reports.AbuseReportListParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", page) } ``` #### Response ```json { "success": true, "errors": [ { "message": "message" } ], "messages": [ { "message": "message" } ], "result": { "reports": [ { "id": "id", "cdate": "2009-11-10T23:00:00Z", "domain": "domain", "mitigation_summary": { "accepted_url_count": 0, "active_count": 0, "external_host_notified": true, "in_review_count": 0, "pending_count": 0 }, "status": "accepted", "type": "PHISH", "justification": "justification", "original_work": "original_work", "submitter": { "company": "company", "email": "email", "name": "name", "telephone": "telephone" }, "urls": [ "string" ] } ] }, "result_info": { "count": 0, "page": 0, "per_page": 0, "total_count": 0, "total_pages": 0 } } ```