WebShieldX

🔌 API Documentation

Complete REST API reference for WebShieldX

Getting Started

The WebShieldX API allows you to programmatically interact with your security plugin, get metrics, and manage settings.

Authentication

All API requests require authentication using your API key. Include your API key in the request header: Authorization: Bearer YOUR_API_KEY

Base URL

https://api.webshieldx.local/v1

Response Format

All responses are in JSON format.

Endpoints

Get Security Status

GET /security/status

Get the current security status of your website. Returns status, threat_level, last_scan, protection_enabled, and firewall_status.

Get Recent Logs

GET /logs/recent?limit=50

Retrieve recent security logs with optional pagination.

Trigger Manual Scan

POST /scan/start

Initiate a manual security scan with various scan types.

Get Scan Results

GET /scan/{scan_id}

Get the results of a completed scan including threats found and duration.

Update Firewall Rule

PUT /firewall/rules/{rule_id}

Update an existing firewall rule with new parameters.

Delete Firewall Rule

DELETE /firewall/rules/{rule_id}

Delete a firewall rule by ID.

Error Handling

The API uses standard HTTP status codes: 200 (Success), 400 (Bad Request), 401 (Unauthorized), 403 (Forbidden), 404 (Not Found), 429 (Rate Limited), 500 (Server Error).

Rate Limiting

API requests are limited to 1000 requests per hour. When you exceed this limit, you will receive a 429 status code.

Support

For API support and questions, please visit our Contact Us page.