The documentation states that file resources can be retrieved but the /api/dataValues/files endpoint doesn’t return anything. It also states that mirroring the query parameters as they would be for the data value itself. What does this mean exactly–what are the parameters?
- Add a “file” data element to an aggregate data set
- Upload a csv or other via the data entry app
- Query the file resource UID which is stored in the “value” property - DHIS 2 Demo - Sierra Leone
- Request the file via DHIS 2 Demo - Sierra Leone
The data value can now be retrieved as any other but the returned data will be the UID of the file resource. In order to retrieve the actual contents (meaning the file which is stored in the file resource mapped to the data value) a GET request must be made to
/api/dataValues/filesmirroring the query parameters as they would be for the data value itself. The
/api/dataValues/filesendpoint only supports GET requests.