Download the PHP package sharadkashyap/api-endpoint-diagnostic-tool without Composer
On this page you can find all versions of the php package sharadkashyap/api-endpoint-diagnostic-tool. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sharadkashyap/api-endpoint-diagnostic-tool
More information about sharadkashyap/api-endpoint-diagnostic-tool
Files in sharadkashyap/api-endpoint-diagnostic-tool
Package api-endpoint-diagnostic-tool
Short Description A framework-independent tool for diagnosing API endpoint failures and suggesting actionable checks.
License MIT
Informations about the package api-endpoint-diagnostic-tool
API Endpoint Diagnostic Tool
A framework-independent PHP tool that checks API endpoints, explains likely failure causes, and recommends the next diagnostic action.
Project status: Stable release v1.0.0.
Key Capabilities
- Checks endpoint reachability, HTTP status, response type, and duration
- Supports configurable methods, headers, and request bodies
- Classifies DNS, timeout, SSL/TLS, and refused connections
- Interprets specific HTTP errors and complete status families
- Uses
Allow,Retry-After, andWWW-Authenticateas evidence - Detects malformed JSON, unexpected HTML, and invalid 204 bodies
- Produces human-readable text or structured JSON
- Redacts tokens, API keys, passwords, and URL credentials
- Restricts requests and redirects to HTTP and HTTPS
- Includes PHPUnit, PHPStan level 8, and GitHub Actions quality gates
Requirements
- PHP 8.2 or later
- PHP cURL extension
- Composer 2
Installation
CLI Usage
Human-readable diagnosis:
Structured JSON:
Example output:
Programmatic Usage
Diagnostic Coverage
| Evidence | Suggested investigation |
|---|---|
| DNS failure | Hostname and DNS records |
| Timeout | Availability, latency, and timeout settings |
| SSL/TLS failure | Certificate chain, hostname, and expiry |
| Connection refused | Host, port, firewall, and service state |
| 400 / 422 | Request syntax, schema, and validation |
| 401 / 403 | Authentication, scopes, and permissions |
| 404 / 405 | Route, API version, and HTTP method |
| 415 | Content type and body format |
| 429 | Rate limits and retry interval |
| 5xx | Server, gateway, upstream service, and dependencies |
Security
- Only HTTP and HTTPS URLs are accepted.
- Sensitive values are redacted from reports.
- Redirect depth and request duration are limited.
- Use only endpoints and credentials you are authorized to test.
- The tool diagnoses services; it does not modify or repair them.
Quality
This runs:
- 36 automated tests with 91 assertions
- PHPStan level 8 analysis
- GitHub Actions checks across PHP 8.2–8.5
Architecture
src/Http— request execution and evidence capturesrc/Diagnosis— diagnostic intelligencesrc/Output— structured and secure outputbin/diagnose.php— CLI entry pointtests— unit, security, and integration coverage
Scope
The tool identifies likely causes and recommends checks. It does not bypass authorization, change remote configuration, guarantee a root cause without server-side evidence, or automatically repair endpoints.
License
Released under the MIT License.
Author
Sharad Kashyap — @sharadkashyapdev