The following API is not fetching the data elements within each sections. In other words I am able to get the name of the program, Name of the program stage and Name of the program stage sections, but the data elements within each section are not displayed.
I believe within programStageSections, the relevant property is dataElements, not programStageDataElements, so you probably want a
if you want data element information by section
/api/programs.json?&fields=id,name,programStages[id,name,programStageSections[id,name,dataElements[id,name]]&paging=false
if you want data element information for the whole program: