Skip to content
Start here

Retrieves Security Center Insight Counts by Severity

client.SecurityCenter.Insights.Severity.Get(ctx, params) (*[]InsightSeverityGetResponse, error)
GET/{accounts_or_zones}/{account_or_zone_id}/security-center/insights/severity

Retrieves Security Center insight counts aggregated by severity level (critical, high, medium, low).

Security
API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example:X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
ParametersExpand Collapse
params InsightSeverityGetParams
AccountID param.Field[string]optional

Path param: The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.

ZoneID param.Field[string]optional

Path param: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.

Dismissed param.Field[bool]optional

Query param

IssueClass param.Field[[]string]optional

Query param

IssueClassNeq param.Field[[]string]optional

Query param

IssueType param.Field[[]IssueType]optional

Query param

const IssueTypeComplianceViolation IssueType = "compliance_violation"
const IssueTypeEmailSecurity IssueType = "email_security"
const IssueTypeExposedInfrastructure IssueType = "exposed_infrastructure"
const IssueTypeInsecureConfiguration IssueType = "insecure_configuration"
const IssueTypeWeakAuthentication IssueType = "weak_authentication"
const IssueTypeConfigurationSuggestion IssueType = "configuration_suggestion"
IssueTypeNeq param.Field[[]IssueType]optional

Query param

const IssueTypeComplianceViolation IssueType = "compliance_violation"
const IssueTypeEmailSecurity IssueType = "email_security"
const IssueTypeExposedInfrastructure IssueType = "exposed_infrastructure"
const IssueTypeInsecureConfiguration IssueType = "insecure_configuration"
const IssueTypeWeakAuthentication IssueType = "weak_authentication"
const IssueTypeConfigurationSuggestion IssueType = "configuration_suggestion"
Product param.Field[[]string]optional

Query param

ProductNeq param.Field[[]string]optional

Query param

Severity param.Field[[]SeverityQueryParam]optional

Query param

const SeverityQueryParamLow SeverityQueryParam = "low"
const SeverityQueryParamModerate SeverityQueryParam = "moderate"
const SeverityQueryParamCritical SeverityQueryParam = "critical"
SeverityNeq param.Field[[]SeverityQueryParam]optional

Query param

const SeverityQueryParamLow SeverityQueryParam = "low"
const SeverityQueryParamModerate SeverityQueryParam = "moderate"
const SeverityQueryParamCritical SeverityQueryParam = "critical"
Subject param.Field[[]string]optional

Query param

SubjectNeq param.Field[[]string]optional

Query param

ReturnsExpand Collapse
type InsightSeverityGetResponseEnvelopeResult []InsightSeverityGetResponse
Count int64optional
Value stringoptional

Retrieves Security Center Insight Counts by Severity

package main

import (
  "context"
  "fmt"

  "github.com/cloudflare/cloudflare-go"
  "github.com/cloudflare/cloudflare-go/option"
  "github.com/cloudflare/cloudflare-go/security_center"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  severities, err := client.SecurityCenter.Insights.Severity.Get(context.TODO(), security_center.InsightSeverityGetParams{

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", severities)
}
{
  "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,
      "value": "value"
    }
  ]
}
Returns Examples
{
  "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,
      "value": "value"
    }
  ]
}