1.48 Maintenance

To perform maintenance you can interact with the maintenance resource. You should use POST or PUT as method for requests. The following requests are available.

Analytics tables clear will drop all analytics tables:


Expired invitations clear will remove all user account invitations which have expired:


Period pruning will remove periods which are not linked to any data values:


Zero data value removal will delete zero data values linked to data elements where zero data is defined as not significant:


Drop SQL views will drop all SQL views in the database. Note that it will not delete the DHIS2 SQL views.


Create SQL views will recreate all SQL views in the database.


Category option combo update will remove obsolete and generate missing category option combos for all category combinations:


Cache clearing will clear the application Hibernate cache and the analytics partition caches:


Re-generate organisation unit path property (can be useful if you imported org units with SQL):


Data pruning will remove complete data set registrations, data approvals, data value audits and data values, in this case for an organisation unit.


Data pruning for data elements, which will remove data value audits and data values.


Metadata validation will apply all metadata validation rules and return the result of the operation:


Maintenance operations are supported in a batch style with a POST request to the api/maintenance resource where the operations are supplied as query parameters: