1.34 Auditing

DHIS2 does automatic auditing on all update and deletions of aggregate data values, tracked entity data values, tracked entity attribute values, and data approvals. This section explains how to fetch this data.

1.34.1 Aggregate data value audits

The endpoint for aggregate data value audits is located at /api/audits/dataValue , and the available parameters are displayed in the table below.

Aggregate data value query parameters
Parameter Option Description
ds Data Set One or more data set identifiers to get data elements from.
de Data Element One or more data element identifiers.
pe ISO Period One or more period ISO identifiers.
ou Organisation Unit One or more org unit identifiers.
auditType UPDATE | DELETE Filter by audit type.
skipPaging false | true Turn paging on / off
page 1 (default) If paging is enabled, this parameter decides which page to show

Get all audits for data set with ID “lyLU2wR22tC”:

/api/26/audits/dataValue?ds=lyLU2wR22tC

1.34.2 Tracked entity data value audits

The endpoint for tracked entity data value audits is located at /api/audits/trackedEntityDataValue , and the available parameters are displayed in the table below.

Tracked entity data value query parameters
Parameter Option Description
de Data Element One or more data element identifiers.
ps Program Stage Entity One or more program stage instance identifiers.
auditType UPDATE | DELETE Filter by audit type.
skipPaging false | true Turn paging on / off
page 1 (default) If paging is enabled, this parameter decides which page to show

Get all audits which have data element ID eMyVanycQSC or qrur9Dvnyt5:

/api/26/audits/trackedEntityDataValue?de=eMyVanycQSC&de=qrur9Dvnyt5

1.34.3 Tracked entity attribute value audits

The endpoint for tracked entity attribute value audits is located at /api/audits/trackedEntityAttributeValue , and the available parameters are displayed in the table below.

Tracked entity attribute value query parameters
Parameter Option Description
tea Tracked Entity Attributes One or more tracked entity attribute identifiers.
te Tracked Entity Instances One or more tracked entity instance identifiers.
auditType UPDATE | DELETE Filter by audit type.
skipPaging false | true Turn paging on / off
page 1 (default) If paging is enabled, this parameter decides which page to show

Get all audits which have attribute with ID VqEFza8wbwA:

/api/26/audits/trackedEntityAttributeValue?tea=VqEFza8wbwA

1.34.4 Data approval audits

The endpoint for data approval audits is located at /api/audits/dataApproval, and the available parameters are displayed in the table below.

Data approval query parameters
Parameter Option Description
dal Data Approval Level One or more data approval level identifiers.
wf Workflow One or more data approval workflow identifiers.
ou Organisation Unit One or more organisation unit identifiers.
aoc Attribute Option Combo One or more attribute option combination identifiers.
startDate Start Date Starting Date for approvals in yyyy-mm-dd format.
endDate End Date Ending Date for approvals in yyyy-mm-dd format.
skipPaging false | true Turn paging on / off
page 1 (default)

If paging is enabled, this parameter decides which page to show.

Get all audits for data approval workflow RwNpkAM7Hw7:

/api/27/audits/dataApproval?wf=RwNpkAM7Hw7