Complete REST API reference for WebShieldX
The WebShieldX API allows you to programmatically interact with your security plugin, get metrics, and manage settings.
All API requests require authentication using your API key. Include your API key in the request header: Authorization: Bearer YOUR_API_KEY
https://api.webshieldx.local/v1
All responses are in JSON format.
GET /security/status
Get the current security status of your website. Returns status, threat_level, last_scan, protection_enabled, and firewall_status.
GET /logs/recent?limit=50
Retrieve recent security logs with optional pagination.
POST /scan/start
Initiate a manual security scan with various scan types.
GET /scan/{scan_id}
Get the results of a completed scan including threats found and duration.
PUT /firewall/rules/{rule_id}
Update an existing firewall rule with new parameters.
DELETE /firewall/rules/{rule_id}
Delete a firewall rule by ID.
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).
API requests are limited to 1000 requests per hour. When you exceed this limit, you will receive a 429 status code.
For API support and questions, please visit our Contact Us page.