Skip to main content

A CLI tool to monitor REST API endpoints

Project description

Endpoint Monitor

A lightweight open source CLI tool to monitor REST API endpoints, check their availability, measure response times and generate detailed reports.

⚠️ Important: This project is intended for personal use, studies and testing environments. It is not recommended for use in production or corporate environments without prior extensive testing. Do not use this tool with endpoints that handle sensitive data without fully understanding the risks involved. The developer is not responsible for any damage, data loss or unexpected behavior resulting from the use or modification of this software. See the LICENSE for more details.


Features

  • Monitor multiple endpoints from a JSON file
  • Supports GET, POST, PUT, DELETE and other HTTP methods
  • Real-time progress bar in the terminal
  • Formatted table output with status, response time and result
  • Optional JSON report export
  • Clear error messages for timeouts and connection failures

Requirements

  • Python 3.10+

Installation

pip install endpoint-monitor

Usage

Basic — display results in terminal

endpoint-monitor endpoints.json

Save report to JSON file

endpoint-monitor endpoints.json --output report.json
endpoint-monitor endpoints.json -o report.json

Help

endpoint-monitor --help

How to pass your endpoints file

The FILE argument is the path to your JSON file on your system. You do not need to be in the same folder as the file — just pass the correct path.

File in the current folder:

endpoint-monitor endpoints.json

File in another folder (Linux/Mac):

endpoint-monitor ~/Documents/endpoints.json
endpoint-monitor /home/yourname/projects/endpoints.json

File in another folder (Windows):

endpoint-monitor C:\Users\YourName\Documents\endpoints.json

Tip: The easiest way is to navigate to the folder where your file is and run the command from there.

cd C:\Users\YourName\Documents
endpoint-monitor endpoints.json

Endpoint file format

Create a .json file with a list of endpoints. Only url is required — all other fields are optional.

[
  {
    "name": "GitHub API",
    "url": "https://api.github.com",
    "method": "GET",
    "timeout": 5000
  },
  {
    "name": "My API",
    "url": "https://myapi.com/health",
    "method": "GET",
    "timeout": 3000
  }
]
Field Type Required Default Description
url string Endpoint URL
name string Endpoint N Display name
method string GET HTTP method
timeout int 5000 Timeout in milliseconds

Report output example

╭───────────────────┬────────┬────────┬───────────────┬────────────────────╮
│ Endpoint          │ Method │ Status │ Response Time │       Result       │
├───────────────────┼────────┼────────┼───────────────┼────────────────────┤
│ GitHub API        │  GET   │  200   │         482ms │        ✓ OK        │
│ My API            │  GET   │  200   │         310ms │        ✓ OK        │
│ Broken Endpoint   │  GET   │   —    │             — │ ✗ Connection error │
╰───────────────────┴────────┴────────┴───────────────┴────────────────────╯

Total: 3  Success: 2  Failed: 1

Project structure

api_monitor/
├── cli.py        # CLI entry point
├── monitor.py    # Orchestrates the monitoring flow
├── checker.py    # Performs HTTP requests and returns results
├── loader.py     # Reads and validates the JSON file
├── reporter.py   # Generates terminal output and JSON report
└── models.py     # Data models

Running tests

pip install pytest
pytest tests/ -v

Open Source

This project is open source and contributions are welcome. If you find a bug or have a suggestion, feel free to open an issue or submit a pull request.

If you wish to modify or distribute this software, please read the LICENSE carefully. The developer provides no warranties and takes no responsibility for any damages arising from the use or modification of this project.


License

MIT License — see LICENSE for details.


Author

Jean Silvagithub.com/jeanbr2020

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

endpoint_monitor-0.1.0.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

endpoint_monitor-0.1.0-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file endpoint_monitor-0.1.0.tar.gz.

File metadata

  • Download URL: endpoint_monitor-0.1.0.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for endpoint_monitor-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d84a4e75740b489c45c5eb0c0d8c7c9fc871278e5cff570cbc4a580889a86e67
MD5 cc352943ce6af742c17ff5b6ce746e94
BLAKE2b-256 1d07c07a489d87cfab81da10fe1fbc382750317cfccff513962026627c2ac7b3

See more details on using hashes here.

File details

Details for the file endpoint_monitor-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for endpoint_monitor-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e3bb081fada6138b2c550fe4f7ad94c72cb09f5a4d9fff2a3029b5ad906f99fd
MD5 adb53a4c6e694a00e2e5bd073e07a2a0
BLAKE2b-256 ae84d2208871120ebd0c14fc970ed4193fd12aeec6483315194a75040ffa5d1f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page