## Retrieves Security Center Insights `client.securityCenter.insights.list(InsightListParamsparams?, RequestOptionsoptions?): V4PagePagination` **get** `/{accounts_or_zones}/{account_or_zone_id}/security-center/insights` Lists all Security Center insights for the account or zone, showing security findings and recommendations. ### Parameters - `params: InsightListParams` - `account_id?: string` Path param: The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. - `zone_id?: string` Path param: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. - `dismissed?: boolean` Query param - `issue_class?: Array` Query param - `issueClassNeq?: Array` Query param - `issue_type?: Array` Query param - `"compliance_violation"` - `"email_security"` - `"exposed_infrastructure"` - `"insecure_configuration"` - `"weak_authentication"` - `"configuration_suggestion"` - `issueTypeNeq?: Array` Query param - `"compliance_violation"` - `"email_security"` - `"exposed_infrastructure"` - `"insecure_configuration"` - `"weak_authentication"` - `"configuration_suggestion"` - `page?: number` Query param: Specifies the current page within paginated list of results. - `per_page?: number` Query param: Sets the number of results per page of results. - `product?: Array` Query param - `productNeq?: Array` Query param - `severity?: Array` Query param - `"low"` - `"moderate"` - `"critical"` - `severityNeq?: Array` Query param - `"low"` - `"moderate"` - `"critical"` - `subject?: Array` Query param - `subjectNeq?: Array` Query param ### Returns - `InsightListResponse` - `count?: number` Indicates the total number of results. - `issues?: Array` - `id?: string` - `dismissed?: boolean` - `issue_class?: string` - `issue_type?: IssueType` - `"compliance_violation"` - `"email_security"` - `"exposed_infrastructure"` - `"insecure_configuration"` - `"weak_authentication"` - `"configuration_suggestion"` - `payload?: Payload` - `detection_method?: string` Describes the method used to detect insight. - `zone_tag?: string` - `resolve_link?: string` - `resolve_text?: string` - `severity?: "Low" | "Moderate" | "Critical"` - `"Low"` - `"Moderate"` - `"Critical"` - `since?: string` - `subject?: string` - `timestamp?: string` - `page?: number` Specifies the current page within paginated list of results. - `per_page?: number` Sets the number of results per page of results. ### 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 insightListResponse of client.securityCenter.insights.list({ account_id: 'account_id', })) { console.log(insightListResponse.count); } ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "count": 1, "issues": [ { "id": "id", "dismissed": false, "issue_class": "always_use_https_not_enabled", "issue_type": "compliance_violation", "payload": { "detection_method": "We detected security rules referencing multiple IP addresses directly in the rules.", "zone_tag": "zone_tag" }, "resolve_link": "resolve_link", "resolve_text": "resolve_text", "severity": "Low", "since": "2019-12-27T18:11:19.117Z", "subject": "example.com", "timestamp": "2019-12-27T18:11:19.117Z" } ], "page": 1, "per_page": 25 } } ```