1.37 Viewing analytical resource representations

DHIS2 has several resources for data analysis. These resources include charts , maps , reportTables , reports and documents . By visiting these resources you will retrieve information about the resource. For instance, by navigating to api/charts/R0DVGvXDUNP the response will contain the name, last date of modication and so on for the chart. To retrieve the analytical representation, for instance a PNG representation of the chart, you can append /data to all these resources. For instance, by visiting api/charts/R0DVGvXDUNP/data the system will return a PNG image of the chart.

Analytical resources
Resource Description Data URL Resource representations
charts Charts api/charts/<identifier>/data png
eventCharts Event charts api/eventCharts/<identifier>/data png
maps Maps api/maps/<identifier>/data png
reportTables Pivot tables api/reportTables/<identifier>/data json | jsonp | html | xml | pdf | xls | csv
reports Standard reports api/reports/<identifier>/data pdf | xls | html
documents Resources api/documents/<identifier>/data <follows document>

The data content of the analytical representations can be modified by providing a date query parameter. This requires that the analytical resource is set up for relative periods for the period dimension.

Data query parameters
Query parameter Value Description
date Date in yyyy-MM-dd format Basis for relative periods in report (requires relative periods)
Query parameters for png / image types (charts, maps)
Query parameter Description
width Width of image in pixels
height Height of image in pixels

Some examples of valid URLs for retrieving various analytical representations are listed below.