# Mitigations ## List abuse report mitigations `client.abuseReports.mitigations.list(stringreportId, MitigationListParamsparams, RequestOptionsoptions?): V4PagePagination` **get** `/accounts/{account_id}/abuse-reports/{report_id}/mitigations` List mitigations done to remediate the abuse report. ### Parameters - `reportId: string` - `params: MitigationListParams` - `account_id: string` Path param: Cloudflare Account ID - `effective_after?: string` Query param: Returns mitigation that were dispatched after the given date - `effective_before?: string` Query param: Returns mitigations that were dispatched before the given date - `entity_type?: "url_pattern" | "account" | "zone"` Query param: Filter by the type of entity the mitigation impacts. - `"url_pattern"` - `"account"` - `"zone"` - `page?: number` Query param: Where in pagination to start listing abuse reports - `per_page?: number` Query param: How many abuse reports per page to list - `sort?: "type,asc" | "type,desc" | "effective_date,asc" | 5 more` Query param: A property to sort by, followed by the order - `"type,asc"` - `"type,desc"` - `"effective_date,asc"` - `"effective_date,desc"` - `"status,asc"` - `"status,desc"` - `"entity_type,asc"` - `"entity_type,desc"` - `status?: "pending" | "active" | "in_review" | 2 more` Query param: Filter by the status of the mitigation. - `"pending"` - `"active"` - `"in_review"` - `"cancelled"` - `"removed"` - `type?: "legal_block" | "misleading_interstitial" | "phishing_interstitial" | 4 more` Query param: Filter by the type of mitigation. This filter parameter can be specified multiple times to include multiple types of mitigations in the result set, e.g. ?type=rate_limit_cache&type=legal_block. - `"legal_block"` - `"misleading_interstitial"` - `"phishing_interstitial"` - `"network_block"` - `"rate_limit_cache"` - `"account_suspend"` - `"redirect_video_stream"` ### Returns - `MitigationListResponse` - `mitigations: Array` - `id: string` ID of remediation. - `effective_date: string` Date when the mitigation will become active. Time in RFC 3339 format (https://www.rfc-editor.org/rfc/rfc3339.html) - `entity_id: string` - `entity_type: "url_pattern" | "account" | "zone"` - `"url_pattern"` - `"account"` - `"zone"` - `status: "pending" | "active" | "in_review" | 2 more` The status of a mitigation - `"pending"` - `"active"` - `"in_review"` - `"cancelled"` - `"removed"` - `type: "legal_block" | "misleading_interstitial" | "phishing_interstitial" | 4 more` The type of mitigation - `"legal_block"` - `"misleading_interstitial"` - `"phishing_interstitial"` - `"network_block"` - `"rate_limit_cache"` - `"account_suspend"` - `"redirect_video_stream"` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); // Automatically fetches more pages as needed. for await (const mitigationListResponse of client.abuseReports.mitigations.list('report_id', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', })) { console.log(mitigationListResponse.mitigations); } ``` #### Response ```json { "success": true, "errors": [ { "message": "message" } ], "messages": [ { "message": "message" } ], "result": { "mitigations": [ { "id": "id", "effective_date": "2009-11-10T23:00:00Z", "entity_id": "entity_id", "entity_type": "url_pattern", "status": "pending", "type": "legal_block" } ] }, "result_info": { "count": 0, "page": 0, "per_page": 0, "total_count": 0, "total_pages": 0 } } ``` ## Request review on mitigations `client.abuseReports.mitigations.review(stringreportId, MitigationReviewParamsparams, RequestOptionsoptions?): SinglePage` **post** `/accounts/{account_id}/abuse-reports/{report_id}/mitigations/appeal` Request a review for mitigations on an account. ### Parameters - `reportId: string` - `params: MitigationReviewParams` - `account_id: string` Path param: Cloudflare Account ID - `appeals: Array` Body param: List of mitigations to appeal. - `id: string` ID of the mitigation to appeal. - `reason: "removed" | "misclassified"` Reason why the customer is appealing. - `"removed"` - `"misclassified"` ### Returns - `MitigationReviewResponse` - `id: string` ID of remediation. - `effective_date: string` Date when the mitigation will become active. Time in RFC 3339 format (https://www.rfc-editor.org/rfc/rfc3339.html) - `entity_id: string` - `entity_type: "url_pattern" | "account" | "zone"` - `"url_pattern"` - `"account"` - `"zone"` - `status: "pending" | "active" | "in_review" | 2 more` The status of a mitigation - `"pending"` - `"active"` - `"in_review"` - `"cancelled"` - `"removed"` - `type: "legal_block" | "misleading_interstitial" | "phishing_interstitial" | 4 more` The type of mitigation - `"legal_block"` - `"misleading_interstitial"` - `"phishing_interstitial"` - `"network_block"` - `"rate_limit_cache"` - `"account_suspend"` - `"redirect_video_stream"` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); // Automatically fetches more pages as needed. for await (const mitigationReviewResponse of client.abuseReports.mitigations.review('report_id', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', appeals: [{ id: 'id', reason: 'misclassified' }], })) { console.log(mitigationReviewResponse.id); } ``` #### Response ```json { "result_info": { "count": 0, "page": 0, "per_page": 0, "total_count": 0, "total_pages": 0 }, "success": true, "errors": [ { "message": "message" } ], "messages": [ { "message": "message" } ], "result": [ { "id": "id", "effective_date": "2009-11-10T23:00:00Z", "entity_id": "entity_id", "entity_type": "url_pattern", "status": "pending", "type": "legal_block" } ] } ``` ## Domain Types ### Mitigation List Response - `MitigationListResponse` - `mitigations: Array` - `id: string` ID of remediation. - `effective_date: string` Date when the mitigation will become active. Time in RFC 3339 format (https://www.rfc-editor.org/rfc/rfc3339.html) - `entity_id: string` - `entity_type: "url_pattern" | "account" | "zone"` - `"url_pattern"` - `"account"` - `"zone"` - `status: "pending" | "active" | "in_review" | 2 more` The status of a mitigation - `"pending"` - `"active"` - `"in_review"` - `"cancelled"` - `"removed"` - `type: "legal_block" | "misleading_interstitial" | "phishing_interstitial" | 4 more` The type of mitigation - `"legal_block"` - `"misleading_interstitial"` - `"phishing_interstitial"` - `"network_block"` - `"rate_limit_cache"` - `"account_suspend"` - `"redirect_video_stream"` ### Mitigation Review Response - `MitigationReviewResponse` - `id: string` ID of remediation. - `effective_date: string` Date when the mitigation will become active. Time in RFC 3339 format (https://www.rfc-editor.org/rfc/rfc3339.html) - `entity_id: string` - `entity_type: "url_pattern" | "account" | "zone"` - `"url_pattern"` - `"account"` - `"zone"` - `status: "pending" | "active" | "in_review" | 2 more` The status of a mitigation - `"pending"` - `"active"` - `"in_review"` - `"cancelled"` - `"removed"` - `type: "legal_block" | "misleading_interstitial" | "phishing_interstitial" | 4 more` The type of mitigation - `"legal_block"` - `"misleading_interstitial"` - `"phishing_interstitial"` - `"network_block"` - `"rate_limit_cache"` - `"account_suspend"` - `"redirect_video_stream"`