Data Value Sets Fetch API Support for Start and End Date Query Parameters(DHIS2 Language Pack)

Dear OpenFn Users,

I am wondering whether the use of startDate and endDate query parameters are being supported by the fetchData API. I tried the below configuration and I am only getting an empty({}) response:


fetchData(
{
 fields:
  {
   dataSet: 'MVccvKD4o8Q',
   orgUnit: 'Gmn6FKMQQ13',
   startDate: '2017-01-01',
   endDate: '2018-01-01'
  },
  postUrl: "https://www.openfn.org/inbox/id_for_my_inbox"
})

Hey Chaiwa,

I’m away from my computer right now, but in looking at https://github.com/OpenFn/language-dhis2/blob/master/src/Adaptor.js on my phone, I can see that the params you pass are attached as query params for a get request to DHIS2, as per the DHIS2 web API spec here: https://docs.dhis2.org/2.22/en/developer/html/ch01s13.html#d5e1642

According to DHIS2, you should be able to pass startDate and endDate. Is this the only param that doesn’t seem to be working for you?

Taylor