Retrieve the list of Audit logs

Retrieve Audit Logs List

The Audit Logs API returns the list of audit logs for the authenticated client. Each entry corresponds to a calculation performed in audit mode.

Endpoint

GET /v2/audits

Retrieve a list of audit logs.

Authentication

  • Bearer Token required.

  • Audit logging must be enabled for your account.

Response

200 OK β€” Example

[
  {
    "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": { "...": "..." },
    "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 (per item)

  • id (UUID) β€” Unique audit log ID.

  • calculated_at (ISO 8601) β€” Timestamp of calculation.

  • request β€” Input parameters used for the audited calculation.

  • response β€” Result values (e.g., carbon_quantity, carbon_unit).

  • calculation β€” Extra details like distance resolution and emission factors (feature-gated).

  • methodology β€” Methodology metadata.

  • audit_for β€” Linked Auditable entity ID if provided during calculation.

Errors

Status
Meaning

200

Success

403

Authentication/authorization failed

cURL

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

Last updated

Was this helpful?