Thang Le
12/17/2025, 9:32 PMMarvin
12/17/2025, 9:32 PMMarvin
12/17/2025, 9:35 PM/api by default (configurable via PREFECT_SERVER_API_BASE_PATH).
- Health endpoints /api/health and /api/ready are open even if basic auth is enabled on Server.
- Cloud calls require an API key; if openapi.json returns 401, include Authorization: Bearer <PREFECT_API_KEY>.
Quick ways to dump every route path from the spec:
- With curl/jq (Server):
curl -s <http://localhost:4200/api/openapi.json> | jq -r '.paths | keys[]' | sort
- With curl/jq (Cloud):
curl -s <https://app.prefect.cloud/api/openapi.json> | jq -r '.paths | keys[]' | sort
- With Python (works for both; add auth if needed):
import json, requests
url = "<http://localhost:4200/api/openapi.json>" # or <https://app.prefect.cloud/api/openapi.json>
headers = {} # For Cloud: {"Authorization": f"Bearer {PREFECT_API_KEY}"}
resp = requests.get(url, headers=headers)
resp.raise_for_status()
paths = sorted(resp.json().get("paths", {}).keys())
print("\n".join(paths))
print(f"\nTotal routes: {len(paths)}")
If you want, I can paste the full list of routes here for the latest Prefect 3.x release—just confirm:
- Are you using self-hosted Server or Cloud?
- If Server, what URL/port and are you using basic auth?
- Do you want just the path list (e.g., /api/flow_runs/filter) or also the HTTP methods and schemas?
Helpful references:
- Cloud interactive docs: Prefect Cloud API docs
- REST API reference: Prefect REST API reference