APIDIAGS - Web API Diagnostics Tool (Linux Edition)
===================================================

Overview
--------
APIDIAGS is a Linux-based command-line tool designed to automate troubleshooting checks for web API endpoints. It is perfect for validating API connectivity, security, and performance.

Key Features
------------
1. DNS resolution check for the API endpoint.
2. Connectivity test using curl to verify API availability.
3. Port availability check on specified TCP ports.
4. SSL/TLS certificate validation with expiration and TLS version.
5. HTTP status code analysis.
6. Retrieval and inspection of HTTP response headers.
7. API latency measurement.
8. Authentication testing (Bearer token, API Key, Basic Auth, or none).
9. CORS header inspection for frontend integration.

Requirements
------------
- Linux system with sudo access.
- Internet connectivity to the API endpoint.

Usage
-----
1. Open a terminal.

2. Navigate to the home directory containing apidiags.exe

3. Run the application: ./apigiags

4. Follow application prompts:
- Enter the full API endpoint URL (e.g., `https://api.example.com`).
- Choose whether to generate an HTML report.
- Select the authentication method (Bearer token, API Key, Basic Auth, or None).
- Provide frontend origin for CORS testing (default) and TCP application port.

5. The script will sequentially perform:
- DNS resolution
- Connectivity check
- Port availability check
- SSL certificate validation
- HTTP status code check
- Header retrieval
- CORS header inspection
- Latency measurement
- Authentication test

Output
------
- Console outputs provide detailed diagnostic information for each check.
- Optionally, an HTML report can be generated with all results, including:
- Timestamp
- DNS resolution
- Connectivity and port checks
- SSL certificate details
- HTTP status codes
- Response headers
- CORS information
- Latency
- Authentication test results

Example HTML Report
-------------------
- Filename: `<hostname>.html` (e.g., `api_example_com.html`)

Author 
----------------
- Developed by CISCONET Training Solutions
- Website: www.cisconetsolutions.com
- Free for learning, automation labs, and personal use.

License
-------

Custom Freeware License and Disclaimer
This software (webdiags.exe) is provided free of charge for personal and non-commercial use only, subject to the following terms:

Permissions
You may redistribute unmodified copies of this software, provided that you retain the copyright notice and this license in all copies. You may use this software on your personal Linux system for non-commercial purposes.

Restrictions
You may not sell, sublicense, or otherwise distribute this software for commercial purposes. You may not modify, reverse-engineer, or decompile this software, unless explicitly permitted by the author. Any redistribution of the software must retain this license, and the software must not be distributed with commercial intent or for profit.

No Warranty
This software is provided "as-is", without any warranty of any kind, either express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, or non-infringement. In no event shall the author be liable for any damages arising from the use or misuse of this software. Use at your own risk. Be sure to review the generated reports carefully, as they may contain sensitive system information.

Version
-------
- Version 1.0 (Linux Edition)

Support
-------
- For tutorials, automation labs, and software: www.cisconetsolutions.com




