Retrieve a specific Audit log
Retrieve Specific Audit Log
The Audit Log Details API allows authenticated clients to retrieve detailed information about a specific audit log entry using its unique identifier.
Endpoint
GET /v2/audits/{id}
Retrieves the details of a specific audit log entry.
Authentication
Requires Bearer Token authentication.
Audit logging must be enabled for the account (contact SQUAKE support for activation).
Path Parameters
id
string (UUID)
β Yes
The unique identifier of the audit log to retrieve.
Response Structure
Successful Response (200 OK)
Returns a JSON object containing audit log details:
Key Attributes
General Information
id
(UUID): Unique identifier for the audit log.calculated_at
(ISO 8601): Timestamp of when the calculation was performed.
Request Details
request
: Contains the parameters used for the calculation (e.g., type, origin, destination, methodology).
Response Details
response
: Stores the carbon emissions results, including:carbon_quantity
: Total emissions calculated.carbon_unit
: The unit of measurement (e.g., kilogram).
Calculation Details
calculation
: Breakdown of calculation parameters:distance
: The original and corrected distances used.emission_factors
: Methodology-specific emission factors.
Methodology Information
methodology
: Metadata about the calculation methodology, including:name
: Methodology used (e.g., ICAO, DEFRA).version
: Version of the methodology applied.source
: URL linking to the official methodology documentation.
Error Handling
200 OK
The request was successful, and audit details were returned.
404 Not Found
The specified audit log ID does not exist.
Example API Request (cURL)
Enabling Audit Logging
Audit logs are available only if this feature is enabled for your account. Contact SQUAKE support to activate audit logging.
For more details, refer to the official SQUAKE API documentation.
Last updated
Was this helpful?