Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Add typed methods for Load Balancing Analytics Events and Pool Health endpoints

Open
#2,693 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
58/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
python

Research direction

Start with the documented REST endpoints and the client entry points load_balancers.analytics.events.list and load_balancers.pools.health.get, then compare nearby typed SDK resources. Done means both endpoints are available through typed methods and expose the documented event and per-origin health fields instead of requiring with_raw_response.get().

Written by the indexing model from the issue text.

Description

kind: enhancement

Feature Request

The Python SDK is missing typed methods for two Load Balancing endpoints that are documented in the Cloudflare REST API:

1. Load Balancing Analytics Events

REST endpoint: GET /accounts/{account_id}/load_balancing_analytics/events

Returns per-origin health state change events with timestamps, pool health status, failure reasons, and response codes. This is critical for monitoring when individual origins go unhealthy.

Current workaround:

resp = client.with_raw_response.get(
    f"/accounts/{account_id}/load_balancing_analytics/events",
    cast_to=object,
    options={"params": {"per_page": 200, "page": 1, "since": "...", "until": "..."}}
)
data = resp.json()

Desired:

events = client.load_balancers.analytics.events.list(
    account_id=account_id,
    since="2026-03-18T00:00:00Z",
    until="2026-03-18T23:59:59Z",
)
2. Pool Health Details

REST endpoint: GET /accounts/{account_id}/load_balancers/pools/{pool_id}/health

Returns per-PoP, per-origin health status including response codes, RTT, and failure reasons. Useful for diagnosing which specific origins are failing and from which regions.

Current workaround:

resp = client.with_raw_response.get(
    f"/accounts/{account_id}/load_balancers/pools/{pool_id}/health",
    cast_to=object,
)
data = resp.json()

Desired:

health = client.load_balancers.pools.health.get(
    pool_id=pool_id,
    account_id=account_id,
)
Use Case

We built an origin health monitor that detects when individual load balancer origins are unhealthy while the pool remains healthy (silent degradation / lost redundancy). Both endpoints are essential for this use case and are documented in the Cloudflare API docs, but require falling back to raw HTTP via with_raw_response.get().

References
Dominant language
Python
Stars
509
Forks
150
Avg merge
3h 15m
Merged PRs (30d)
1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from cloudflare/cloudflare-python

All issues in cloudflare/cloudflare-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.