Skip to main content
A baseline is a snapshot of a resource’s configuration at a specific point in time. InfraAudit uses baselines as the reference state for drift detection — any deviation from the baseline is reported as a drift finding. Base path: /api/v1/baselines

POST /baselines — create a baseline

Captures the current configuration of a resource as a new baseline.

Request body

resource_id
integer
required
The ID of the resource to baseline.

Response 201

id
integer
Internal baseline ID.
configuration
object
The full resource configuration snapshot at the time the baseline was captured.
captured_at
string
ISO 8601 timestamp of when the baseline was captured.

GET /baselines — list baselines

Returns all baselines for a resource.

Query parameters

resource_id
integer
required
The resource to list baselines for.

GET /baselines/ — get baseline

Returns the full baseline record including the configuration snapshot.

GET /baselines//compare/ — compare two baselines

Returns a JSON diff between two baselines for the same resource. Useful for understanding how a resource’s configuration has changed over time.

Response


DELETE /baselines/ — delete baseline

Deletes a baseline. Returns 204 No Content.
You cannot delete the only baseline for a resource that has active drift detection enabled. Capture a new baseline first, or disable drift detection for the resource before deleting.