For the complete documentation index, see llms.txt. This page is also available as Markdown.

Lockdown API

Use these endpoints on the same device API base URL as POST /api/lockdown-mode, for example http://<device-ip>:5000.

These endpoints are implemented in the device API:

Purpose
Method
Endpoint

Read lockdown state

GET

/api/lockdown-mode

Enable or disable lockdown mode

POST

/api/lockdown-mode

Run lockdown system scan

POST

/api/lockdown-diagnostics/audit

Preview log cleanup

POST

/api/lockdown-diagnostics/clear-preview

Clear plaintext logs and reboot

POST

/api/lockdown-diagnostics/clear

Encrypt existing plaintext logs

POST

/api/lockdown-diagnostics/encrypt

Poll diagnostics job status

GET

/api/lockdown-diagnostics/job-status

After enabling lockdown mode, the usual flow is:

  1. Confirm lockdown mode is enabled.

  2. Run the audit scan to see whether plaintext logs or other sensitive artifacts still exist.

  3. If the scan reports artifacts that should be removed, run a clear preview.

  4. Run the actual clear operation.

  5. Poll job status until complete.

  6. Confirm the clear result includes reboot_scheduled: true.

The diagnostics operations are asynchronous. A POST starts a job; GET /api/lockdown-diagnostics/job-status returns progress and final results. Only one diagnostics job can run at a time.

1. Confirm Lockdown Mode

Why: make sure the device is in lockdown mode before scanning or clearing old plaintext artifacts.

Response:

data: true means lockdown mode is enabled.

2. Enable Lockdown Mode

Why: enables encrypted logging behavior and schedules a device reboot when changing from disabled to enabled.

Expected response when the value changes from disabled to enabled:

reboot_scheduled: true means the device API successfully scheduled the edge device reboot.

3. Run The Audit Scan

Why: scan the device after lockdown mode is enabled to check for remaining plaintext logs or other lockdown-related findings.

No body is required.

Response:

Then poll job status.

The audit is finished when data.in_progress is false. A completed audit result can include summary, findings, and a human-readable message.

Example:

4. Preview The Clear Operation

Why: see what the cleanup operation would delete before deleting anything.

No body is required. This is a dry run.

Poll job status until data.in_progress is false.

Example completed preview result:

deleted_count is the number of artifacts that would be removed by the real clear operation.

5. Clear Logs After Lockdown

Why: remove old plaintext log artifacts and purge the journal after lockdown is enabled, then reboot the device so it comes back in a clean lockdown state.

No body is required.

If you want to enforce that the clear matches a recent preview, pass the preview token from clear-preview:

The preview token expires after 5 minutes. If no token is provided, the clear operation still runs.

Starting the clear job returns:

Poll job status until data.in_progress is false.

Example completed clear result:

reboot_scheduled: true means the device API scheduled the reboot after cleanup.

Encrypt Existing Plaintext Logs

Why: preserve existing plaintext logs by encrypting them instead of deleting them.

No body is required.

Poll job status until complete.

Example completed encrypt result:

Use either clear or encrypt depending on whether the goal is to delete old plaintext artifacts or preserve them in encrypted form.