Skip to content
Start here

Get latest Events

magic_transit.connectors.events.latest.list(strconnector_id, LatestListParams**kwargs) -> LatestListResponse
GET/accounts/{account_id}/magic/connectors/{connector_id}/telemetry/events/latest

Get latest Events

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
Accepted Permissions (at least one required)
Magic WAN WriteMagic WAN Read
ParametersExpand Collapse
account_id: str

Account identifier

maxLength32
connector_id: str
ReturnsExpand Collapse
class LatestListResponse:
count: float
items: List[Item]
e: ItemE
One of the following:
class ItemEInit:
k: Literal["Init"]

Initialized process

class ItemELeave:
k: Literal["Leave"]

Stopped process

class ItemEStartAttestation:
k: Literal["StartAttestation"]

Started attestation

class ItemEFinishAttestationSuccess:
k: Literal["FinishAttestationSuccess"]

Finished attestation

class ItemEFinishAttestationFailure:
k: Literal["FinishAttestationFailure"]

Failed attestation

class ItemEStartRotateCryptKey:
k: Literal["StartRotateCryptKey"]

Started crypt key rotation

class ItemEFinishRotateCryptKeySuccess:
k: Literal["FinishRotateCryptKeySuccess"]

Finished crypt key rotation

class ItemEFinishRotateCryptKeyFailure:
k: Literal["FinishRotateCryptKeyFailure"]

Failed crypt key rotation

class ItemEStartRotatePki:
k: Literal["StartRotatePki"]

Started PKI rotation

class ItemEFinishRotatePkiSuccess:
k: Literal["FinishRotatePkiSuccess"]

Finished PKI rotation

class ItemEFinishRotatePkiFailure:
k: Literal["FinishRotatePkiFailure"]

Failed PKI rotation

class ItemEStartUpgrade:
k: Literal["StartUpgrade"]

Started upgrade

url: str

Location of upgrade bundle

class ItemEFinishUpgradeSuccess:
k: Literal["FinishUpgradeSuccess"]

Finished upgrade

class ItemEFinishUpgradeFailure:
k: Literal["FinishUpgradeFailure"]

Failed upgrade

class ItemEReconcile:
k: Literal["Reconcile"]

Reconciled

class ItemEConfigureCloudflaredTunnel:
k: Literal["ConfigureCloudflaredTunnel"]

Configured Cloudflared tunnel

n: float

Sequence number, used to order events with the same timestamp

t: float

Time the Event was recorded (seconds since the Unix epoch)

v: Optional[str]

Version

Get latest Events

import os
from cloudflare import Cloudflare

client = Cloudflare(
    api_token=os.environ.get("CLOUDFLARE_API_TOKEN"),  # This is the default and can be omitted
)
latests = client.magic_transit.connectors.events.latest.list(
    connector_id="connector_id",
    account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
print(latests.count)
{
  "result": {
    "count": 0,
    "items": [
      {
        "e": {
          "k": "Init"
        },
        "n": 0,
        "t": 0,
        "v": "v"
      }
    ]
  },
  "success": true,
  "errors": [
    {
      "code": 0,
      "message": "message"
    }
  ],
  "messages": [
    {
      "code": 0,
      "message": "message"
    }
  ]
}
Returns Examples
{
  "result": {
    "count": 0,
    "items": [
      {
        "e": {
          "k": "Init"
        },
        "n": 0,
        "t": 0,
        "v": "v"
      }
    ]
  },
  "success": true,
  "errors": [
    {
      "code": 0,
      "message": "message"
    }
  ],
  "messages": [
    {
      "code": 0,
      "message": "message"
    }
  ]
}