Skip to content
Start here

Notify about an issue

workers.observability.issues.notify(strissue_id, IssueNotifyParams**kwargs) -> IssueNotifyResponse
POST/accounts/{account_id}/workers/observability/issues/{issueId}/notification-runs

Send the issue to one ANS policy, or every matching Real-Time Issue policy when no policy ID is provided.

Security
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
API Token

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

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
User Service Key

Used when interacting with the Origin CA certificates API. View/change your key.

Example:X-Auth-User-Service-Key: v1.0-144c9defac04969c7bfad8ef-631a41d003a32d25fe878081ef365c49503f7fada600da935e2851a1c7326084b85cbf6429c4b859de8475731dc92a9c329631e6d59e6c73da7b198497172b4cefe071d90d0f5d2719
Accepted Permissions (at least one required)
Workers Observability Write
ParametersExpand Collapse
account_id: str
issue_id: str
minLength1
policy_id: Optional[str]
maxLength200
minLength1
ReturnsExpand Collapse
class IssueNotifyResponse: …
run: Run
id: str
created: float
inactivity_seconds: Optional[float]
initiated_by: Literal["automatic", "manual"]
One of the following:
"automatic"
"manual"
issue_count: float
issue_id: str
last_error: Optional[str]
policy_id: str
status: Literal["pending", "succeeded", "failed"]
One of the following:
"pending"
"succeeded"
"failed"
terminal_at: Optional[float]
threshold: Optional[float]
automation_id: Optional[str]
automation_name: Optional[str]
automation_revision: Optional[float]
scope: Optional[Literal["account", "service"]]
One of the following:
"account"
"service"
trigger_type: Optional[Literal["occurrence_threshold", "recurrence_after_inactivity"]]
One of the following:
"occurrence_threshold"
"recurrence_after_inactivity"

Notify about an issue

import os
from cloudflare import Cloudflare

client = Cloudflare(
    api_email=os.environ.get("CLOUDFLARE_EMAIL"),  # This is the default and can be omitted
    api_key=os.environ.get("CLOUDFLARE_API_KEY"),  # This is the default and can be omitted
)
response = client.workers.observability.issues.notify(
    issue_id="x",
    account_id="account_id",
)
print(response.run)
{
  "errors": [
    {
      "message": "message"
    }
  ],
  "messages": [
    {
      "message": "Successful request"
    }
  ],
  "result": {
    "run": {
      "id": "id",
      "created": 0,
      "inactivitySeconds": 0,
      "initiatedBy": "automatic",
      "issueCount": 0,
      "issueId": "issueId",
      "lastError": "lastError",
      "policyId": "policyId",
      "status": "pending",
      "terminalAt": 0,
      "threshold": 0,
      "automationId": "automationId",
      "automationName": "automationName",
      "automationRevision": 0,
      "scope": "account",
      "triggerType": "occurrence_threshold"
    }
  },
  "success": true
}
Returns Examples
{
  "errors": [
    {
      "message": "message"
    }
  ],
  "messages": [
    {
      "message": "Successful request"
    }
  ],
  "result": {
    "run": {
      "id": "id",
      "created": 0,
      "inactivitySeconds": 0,
      "initiatedBy": "automatic",
      "issueCount": 0,
      "issueId": "issueId",
      "lastError": "lastError",
      "policyId": "policyId",
      "status": "pending",
      "terminalAt": 0,
      "threshold": 0,
      "automationId": "automationId",
      "automationName": "automationName",
      "automationRevision": 0,
      "scope": "account",
      "triggerType": "occurrence_threshold"
    }
  },
  "success": true
}