createdbyUserInfo && lastUpdatedUserInfo---worth it?

In the events endpoint we have createdByUserInfo and lastUpdatedByUserInfo, and each section in json has uid,firstName,surname,username attached to it. When I was pulling a particularly dataElement heavy program in json form, the original MB size was 72.9MB. When I systematically removed all createdByUserInfo and lastUpdatedByUserInfo, the MB size when down to 22 MB.

Questions are:

  1. Do we use dataElement specific createdByUserInfo and lastUpdatedByUserInfo somewhere in analytics?
  2. Is there a way to pull events in general with dataValues but omitting createdByUserInfo and lastUpdatedByUserInfo?

Hi @Matthew_Boddie

Normally I do like this
api/dataElements?fields=*,!createdBy,!element_which_you_want_omit…
And those reduce immensely json size.

Thanks @Ulanbek while these didn’t work exactly for me for the events endpoint, I eventually found ,dataValues(dataElement,value) as a specific request that let me pull the data without the created/lastUpdated sections. Much better!!!

1 Like