Audits API

Audit records describe historical changes to records in Aha! and are created automatically when a record is created, updated, or deleted. Audits are immutable and cannot be modified or deleted.

Audits are stored not only for first-class objects such as Features or Release, but also for secondary objects attached to those records such as custom field values, equation field values, descriptions, and record links.

Audit records are only available for the last 12 calendar months. After that, they must be accessed using the Historical Audits endpoint.

The performance of the Audits API can be improved by judicious use of the created_since and created_before parameters. Since this is high-volume timeseries data, these parameters should be used when attempting to scan through record activity, and the after_id parameter should be used in lieu of pagination.

Retrieve record history

GET /api/v1/audits

Parameters
NameDescription
auditable_id

Numeric ID of the record for which history should be retrieved

auditable_type

String identifier of the type of record for which history should be retrieved

associated_id

Numeric ID of the primary record for which history should be retrieved. This value is required if :associated_type is also provided. Use these parameters to fetch only the history for secondary records, like descriptions and custom field values.

associated_type

String identifier of the type of the primary record for which history should be retrieved

audit_action

Type of action. Options are 'create', 'update', and 'destroy'

created_since

ISO8601 timestamp determining the beginning of the search range for historical changes

created_before

ISO8601 timestamp determining the end of the search window for historical changes

after_id

Numeric identifier which filters result record to only records with ID larger than the parameter. This can be used for cursor-based searches, and is more efficient than pagination for large data sets.

user_id

Numeric user ID, which searches only for audit records where one particular user was the actor

Example request

GET /api/v1/audits?auditable_id=1007868956&auditable_type=Feature

Example CURL command

curl -g "https://company.aha.io/api/v1/audits?auditable_id=1007868956&auditable_type=Feature" -X GET \
	-H "Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab" \
	-H "Content-Type: application/json" \
	-H "Accept: application/json"

Request

authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
contentType: application/json
accept: application/json

Response

Status: 200 OK
contentType: application/json; charset=utf-8

Response body