Skip to content
Start here

Archives Security Center Insight

client.SecurityCenter.Insights.Dismiss(ctx, issueID, params) (*InsightDismissResponse, error)
PUT/{accounts_or_zones}/{account_or_zone_id}/security-center/insights/{issue_id}/dismiss

Archives a Security Center insight for an account or zone, removing it from the active insights list while preserving historical data.

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
issueID string
params InsightDismissParams
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.

Dismiss param.Field[bool]optional

Body param

ReturnsExpand Collapse
type InsightDismissResponse struct{…}
Errors []InsightDismissResponseError
Code int64
minimum1000
Message string
DocumentationURL stringoptional
Source InsightDismissResponseErrorsSourceoptional
Pointer stringoptional
Messages []InsightDismissResponseMessage
Code int64
minimum1000
Message string
DocumentationURL stringoptional
Source InsightDismissResponseMessagesSourceoptional
Pointer stringoptional
Success InsightDismissResponseSuccess

Whether the API call was successful.

Archives Security Center Insight

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"),
  )
  response, err := client.SecurityCenter.Insights.Dismiss(
    context.TODO(),
    "issue_id",
    security_center.InsightDismissParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response.Errors)
}
{
  "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
}
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
}