# Mitigations ## List abuse report mitigations `abuse_reports.mitigations.list(strreport_id, MitigationListParams**kwargs) -> SyncV4PagePagination[Optional[MitigationListResponse]]` **get** `/accounts/{account_id}/abuse-reports/{report_id}/mitigations` List mitigations done to remediate the abuse report. ### Parameters - `account_id: str` - `report_id: str` - `effective_after: Optional[str]` Returns mitigation that were dispatched after the given date - `effective_before: Optional[str]` Returns mitigations that were dispatched before the given date - `entity_type: Optional[Literal["url_pattern", "account", "zone"]]` Filter by the type of entity the mitigation impacts. - `"url_pattern"` - `"account"` - `"zone"` - `page: Optional[int]` Where in pagination to start listing abuse reports - `per_page: Optional[int]` How many abuse reports per page to list - `sort: Optional[Literal["type,asc", "type,desc", "effective_date,asc", 5 more]]` 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: Optional[Literal["pending", "active", "in_review", 2 more]]` Filter by the status of the mitigation. - `"pending"` - `"active"` - `"in_review"` - `"cancelled"` - `"removed"` - `type: Optional[Literal["account_suspend", "copyright_interstitial", "geo_block", 17 more]]` 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. - `"account_suspend"` - `"copyright_interstitial"` - `"geo_block"` - `"legal_block"` - `"malware_interstitial"` - `"misleading_interstitial"` - `"network_block"` - `"phishing_interstitial"` - `"playfairite_enforce"` - `"r2_takedown_account"` - `"r2_takedown_bucket"` - `"r2_takedown_object"` - `"rate_limit_cache"` - `"redirect_video_stream"` - `"zone_fint"` - `"registrar_freeze"` - `"registrar_parking"` - `"stream_block_account"` - `"user_suspend"` - `"workers_takedown_by_zone_id"` ### Returns - `class MitigationListResponse: …` - `mitigations: List[Mitigation]` - `id: str` ID of remediation. - `effective_date: str` Date when the mitigation will become active. Time in RFC 3339 format (https://www.rfc-editor.org/rfc/rfc3339.html) - `entity_id: str` - `entity_type: Literal["url_pattern", "account", "zone"]` The type of entity targeted by a mitigation. - `"url_pattern"` - `"account"` - `"zone"` - `status: Literal["pending", "active", "in_review", 2 more]` The status of a mitigation - `"pending"` - `"active"` - `"in_review"` - `"cancelled"` - `"removed"` - `type: Literal["account_suspend", "copyright_interstitial", "geo_block", 17 more]` The type of mitigation applied to a reported entity. - `"account_suspend"` - `"copyright_interstitial"` - `"geo_block"` - `"legal_block"` - `"malware_interstitial"` - `"misleading_interstitial"` - `"network_block"` - `"phishing_interstitial"` - `"playfairite_enforce"` - `"r2_takedown_account"` - `"r2_takedown_bucket"` - `"r2_takedown_object"` - `"rate_limit_cache"` - `"redirect_video_stream"` - `"zone_fint"` - `"registrar_freeze"` - `"registrar_parking"` - `"stream_block_account"` - `"user_suspend"` - `"workers_takedown_by_zone_id"` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) page = client.abuse_reports.mitigations.list( report_id="report_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) page = page.result.items[0] print(page.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": "account_suspend" } ] }, "result_info": { "count": 0, "page": 0, "per_page": 0, "total_count": 0, "total_pages": 0 } } ``` ## Request review on mitigations `abuse_reports.mitigations.review(strreport_id, MitigationReviewParams**kwargs) -> SyncSinglePage[MitigationReviewResponse]` **post** `/accounts/{account_id}/abuse-reports/{report_id}/mitigations/appeal` Request a review for mitigations on an account. ### Parameters - `account_id: str` - `report_id: str` - `appeals: Optional[Iterable[Appeal]]` List of mitigations to appeal. - `id: str` ID of the mitigation to appeal. - `reason: Literal["removed", "misclassified"]` Reason why the customer is appealing. - `"removed"` - `"misclassified"` - `data: Optional[Data]` Counter-notice details supporting an appeal. - `city: str` - `country: str` - `email: str` - `full_name: str` - `jurisdiction_consent: bool` - `perjury_attestation: bool` - `phone_number: str` - `signature: str` - `state: str` - `street_address: str` - `urls: Sequence[str]` - `zip_code: str` - `company: Optional[str]` - `counter_notice_response: Optional[str]` - `type: Optional[Literal["counter_notice", "content_removed"]]` The type of appeal being submitted. - `"counter_notice"` - `"content_removed"` ### Returns - `class MitigationReviewResponse: …` - `id: str` ID of remediation. - `effective_date: str` Date when the mitigation will become active. Time in RFC 3339 format (https://www.rfc-editor.org/rfc/rfc3339.html) - `entity_id: str` - `entity_type: Literal["url_pattern", "account", "zone"]` The type of entity targeted by a mitigation. - `"url_pattern"` - `"account"` - `"zone"` - `status: Literal["pending", "active", "in_review", 2 more]` The status of a mitigation - `"pending"` - `"active"` - `"in_review"` - `"cancelled"` - `"removed"` - `type: Literal["account_suspend", "copyright_interstitial", "geo_block", 17 more]` The type of mitigation applied to a reported entity. - `"account_suspend"` - `"copyright_interstitial"` - `"geo_block"` - `"legal_block"` - `"malware_interstitial"` - `"misleading_interstitial"` - `"network_block"` - `"phishing_interstitial"` - `"playfairite_enforce"` - `"r2_takedown_account"` - `"r2_takedown_bucket"` - `"r2_takedown_object"` - `"rate_limit_cache"` - `"redirect_video_stream"` - `"zone_fint"` - `"registrar_freeze"` - `"registrar_parking"` - `"stream_block_account"` - `"user_suspend"` - `"workers_takedown_by_zone_id"` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) page = client.abuse_reports.mitigations.review( report_id="report_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) page = page.result[0] print(page.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": "account_suspend" } ] } ``` ## Domain Types ### Mitigation List Response - `class MitigationListResponse: …` - `mitigations: List[Mitigation]` - `id: str` ID of remediation. - `effective_date: str` Date when the mitigation will become active. Time in RFC 3339 format (https://www.rfc-editor.org/rfc/rfc3339.html) - `entity_id: str` - `entity_type: Literal["url_pattern", "account", "zone"]` The type of entity targeted by a mitigation. - `"url_pattern"` - `"account"` - `"zone"` - `status: Literal["pending", "active", "in_review", 2 more]` The status of a mitigation - `"pending"` - `"active"` - `"in_review"` - `"cancelled"` - `"removed"` - `type: Literal["account_suspend", "copyright_interstitial", "geo_block", 17 more]` The type of mitigation applied to a reported entity. - `"account_suspend"` - `"copyright_interstitial"` - `"geo_block"` - `"legal_block"` - `"malware_interstitial"` - `"misleading_interstitial"` - `"network_block"` - `"phishing_interstitial"` - `"playfairite_enforce"` - `"r2_takedown_account"` - `"r2_takedown_bucket"` - `"r2_takedown_object"` - `"rate_limit_cache"` - `"redirect_video_stream"` - `"zone_fint"` - `"registrar_freeze"` - `"registrar_parking"` - `"stream_block_account"` - `"user_suspend"` - `"workers_takedown_by_zone_id"` ### Mitigation Review Response - `class MitigationReviewResponse: …` - `id: str` ID of remediation. - `effective_date: str` Date when the mitigation will become active. Time in RFC 3339 format (https://www.rfc-editor.org/rfc/rfc3339.html) - `entity_id: str` - `entity_type: Literal["url_pattern", "account", "zone"]` The type of entity targeted by a mitigation. - `"url_pattern"` - `"account"` - `"zone"` - `status: Literal["pending", "active", "in_review", 2 more]` The status of a mitigation - `"pending"` - `"active"` - `"in_review"` - `"cancelled"` - `"removed"` - `type: Literal["account_suspend", "copyright_interstitial", "geo_block", 17 more]` The type of mitigation applied to a reported entity. - `"account_suspend"` - `"copyright_interstitial"` - `"geo_block"` - `"legal_block"` - `"malware_interstitial"` - `"misleading_interstitial"` - `"network_block"` - `"phishing_interstitial"` - `"playfairite_enforce"` - `"r2_takedown_account"` - `"r2_takedown_bucket"` - `"r2_takedown_object"` - `"rate_limit_cache"` - `"redirect_video_stream"` - `"zone_fint"` - `"registrar_freeze"` - `"registrar_parking"` - `"stream_block_account"` - `"user_suspend"` - `"workers_takedown_by_zone_id"`