2.7 KiB
2.7 KiB
Pennyzo API Status Checker
This project provides comprehensive tools for checking the status of the Pennyzo General API endpoints. It includes both basic and extended versions of the API status checker, along with supporting tools and documentation.
Project Structure
scripts/
├── api-status-checker.js # Basic API status checker
├── api-status-checker-extended.js # Extended API status checker with additional features
├── run-api-check.ps1 # PowerShell helper script
└── README.md # Documentation for the scripts
reports/
├── example-report.json # Sample report file
├── report-viewer.html # HTML tool for visualizing reports
├── .gitignore # Git configuration for reports
└── README.md # Documentation for the reports directory
Features
-
Basic API Status Checker
- Tests both public and authenticated endpoints
- Colorful console output
- Automatic token management
-
Extended API Status Checker
- All features of the basic checker
- Saves detailed reports to JSON files
- Provides response time measurements
- Support for command line arguments
- Environment variable support for credentials
-
Report Viewer
- HTML-based visualization tool
- Interactive endpoint details
- Summary statistics
- Color-coded status indicators
-
Helper Tools
- PowerShell script for flexible execution
- npm scripts for convenient access
- Example report for reference
Getting Started
Using npm Scripts
# Run basic API check
npm run api:check
# Run extended API check with report generation
npm run api:check:extended
# Run extended API check with verbose output
npm run api:check:verbose
# Run extended API check with real credentials
npm run api:check:real
Using Environment Variables
For secure credential management with real credentials:
$env:PENNYZO_TEST_EMAIL = "your-test-email@example.com"
$env:PENNYZO_TEST_PASSWORD = "your-test-password"
npm run api:check:real
Viewing Reports
After running the extended script, reports are saved to the reports directory. To view a report:
- Open
reports/report-viewer.htmlin a web browser - Click "Choose Report File" to select a JSON report
- Review the report details
Summary of API Endpoints Tested
Public Endpoints
- GET
/system/health - GET
/registration/company/identity-rules
Authentication Flow
- POST
/auth/login
Authenticated Endpoints
- GET
/auth/me - GET
/users/profile - GET
/users/stats - GET
/users/membership-info