Database Management
These endpoints manage the underlying IDIAL database. They are intended for administrative and development use only.
These endpoints perform destructive operations. Use with extreme caution in production environments.
These endpoints are not present in the existing bxc-documentation. They document features introduced after the last bxc-documentation update.
POST /create/dummy-db
Creates a pre-populated test database with sample inventory entries, PKI configurations, and maintenance windows. Useful for development and integration testing.
Authentication: Required (X-API-Key header)
Request
curl -X POST http://localhost:5000/create/dummy-db \
-H "X-API-Key: your-api-key"
Response 200
{"success": true, "execution": "ok", "error": "", "result": null}
Response Fields
| Field | Type | Description |
|---|---|---|
success | boolean | Whether the operation succeeded. |
execution | string | Execution status. |
error | string | Error message if the operation failed. |
result | object | null | Additional result data. |
DELETE /sql/{totp_code}
Deletes the entire IDIAL database. This operation is irreversible. The endpoint is protected by a Time-based One-Time Password (TOTP) derived from the API key to prevent accidental deletion.
Authentication: Required (X-API-Key header)
This endpoint permanently deletes all data in the IDIAL database, including all inventory entries, PKI configurations, maintenance windows, certificates, and user credentials. This action cannot be undone. Ensure a backup exists before calling this endpoint.
TOTP Generation
The {totp_code} path parameter is a 6-digit TOTP code generated from the IDIAL API key as the TOTP secret. Use a standard TOTP library (RFC 6238) with the API key value as the secret.
Request
curl -X DELETE http://localhost:5000/sql/123456 \
-H "X-API-Key: your-api-key"
Path Parameters
| Parameter | Type | Description |
|---|---|---|
totp_code | string | Current 6-digit TOTP code derived from the API key. |
Response 200
{"success": true, "execution": "ok", "error": "", "result": null}
Response 401
Returned when the TOTP code is invalid or expired.
{"error": "Invalid TOTP code"}