https://github.com/DavidJKTofan/cloudflare-radar-api
Cloudflare Workers which uses the Cloudflare API to fetch data from multiple Cloudflare RADAR endpoints and returns the results as JSON.
https://github.com/DavidJKTofan/cloudflare-radar-api
cloudflare-api cloudflare-radar cloudflare-workers
Last synced: 10 months ago
JSON representation
Cloudflare Workers which uses the Cloudflare API to fetch data from multiple Cloudflare RADAR endpoints and returns the results as JSON.
- Host: GitHub
- URL: https://github.com/DavidJKTofan/cloudflare-radar-api
- Owner: DavidJKTofan
- License: mit
- Created: 2023-05-30T07:43:16.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-09-03T20:59:00.000Z (over 2 years ago)
- Last Synced: 2025-03-23T05:09:58.706Z (11 months ago)
- Topics: cloudflare-api, cloudflare-radar, cloudflare-workers
- Language: JavaScript
- Homepage:
- Size: 32.2 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Cloudflare Workers for Cloudflare RADAR API
Cloudflare Workers which uses the Cloudflare API to fetch data from multiple Cloudflare RADAR endpoints and returns the results as JSON.
Alternative GeoJSON Output: https://github.com/DavidJKTofan/cloudflare-radar-api-geojson
### Get Started
- Replace the `YOUR_ACCOUNT_ID` with your Cloudflare Account ID in the `wrangler.toml` file.
- Replace `'YOUR_API_TOKEN'` with your actual Cloudflare API token in the `worker.js` file.
- Replace `'YOUR_AUTH_EMAIL'` with your Cloudflare account email in the `worker.js` file.
### Endpoints
This project fetches data from the following [Cloudflare API endpoints](https://developers.cloudflare.com/api/):
- `attacks/layer7/summary`: Provides a summary of Layer 7 attacks.
- `attacks/layer7/top/locations/origin`: Lists the top locations of Layer 7 attacks by origin.
- `http/summary/bot_class`: Provides a summary of HTTP requests by bot class.
- `http/summary/device_type`: Provides a summary of HTTP requests by device type.
- `http/summary/http_version`: Provides a summary of HTTP requests by HTTP version.
Each endpoint is fetched individually, and the responses are combined and returned as a JSON object.
## Contributing
Contributions are welcome! If you find any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request.