Retrieve a Specific Audit Log

Retrieve Specific Audit Log

The Audit Log Details API lets you fetch full details for a single audit log created by an audited calculation request.

Endpoint

GET /v2/audits/{id}

Retrieve detailed information for a specific audit log.

Authentication

  • Bearer Token required.
  • Audit logging must be enabled for your account.

Path parameters

idstring (UUID)required

Unique identifier of the audit log to retrieve.

See every field of GET /v2/audits/{id} in the API reference

Response

Example

200 OKapplication/json
{
  "id": "0194d6b4-8711-7873-899d-c8133cd742f8",
  "calculated_at": "2025-02-18T16:39:10Z",
  "request": {
    "type": "flight",
    "methodology": "ICAO",
    "origin": "SAF",
    "destination": "ATL"
  },
  "response": {
    "carbon_quantity": 302.75,
    "carbon_unit": "kilogram"
  },
  "calculation": {
    "distance": { "...": "..." },
    "emission_factors": { "...": "..." }
  },
  "methodology": {
    "name": "ICAO",
    "version": "1.0",
    "source": "https://applications.icao.int/icec/Methodology%20ICAO%20Carbon%20Emissions%20Calculator_v13_Final.pdf"
  },
  "audit_for": "d3427e0d-5a3c-40ce-842e-5552e77caa4f"
}

Field reference

FieldDescription
idUUID. Unique audit log ID.
calculated_atISO 8601. When the calculation was performed.
requestExact request item used for the audited calculation (structure varies by activity).
responseCalculation result (e.g., carbon_quantity, carbon_unit).
calculationAdditional details such as distance resolution and emission factors (feature-gated; contact support to enable).
methodologyMethodology name, version, and official source link used for the calculation.
audit_forID of an Auditable entity the audit log is associated with (set via audit_for on the calculation request).

Errors

StatusMeaning
200Success
403Authentication/authorization failed
404Audit log not found

cURL

curl --request GET "https://api.squake.earth/v2/audits/{id}" \
  --header "Authorization: Bearer $ACCESS_TOKEN"

On this page

GET/v2/audits/{id}

Run this request against the sandbox with your test key.

Open in API reference