trackedEntityInstances endpoint GET request

Hello, I’m building a custom app for my organization to help interact with some DHIS2 data.

I would like help in identifying how to slim down the .json response fields when putting in a GET request to only those which I need. I actually only need specific attributes to the TEI so what do I need in include to only have that which I’d like?

(This is dummy data, not sensitive info) This is the response I get when making a call with this …


I’m only interested in the attributes, and not all attributes, 3 out of the 5. What do I need to add to my api call?

Also, making the same request with the new tracker endpoint, and using attribute parameter in the call to specify the attributes, returns more or less the same response with the fields I’m looking to get rid of in the response.


What am I not getting right?

1 Like

Hi @lillian1n2,

Good luck with your custom application! Please try the fields parameter. For example,[displayName,value]

Field parameter will allow you to select the attributes that you want to appear in the response, read more here:

If you want a good review, in this video @austin explains queries and how to use the filter and fields. Web App Development Workshop - Day 2 - Queries and mutations - YouTube

If you haven’t you might be interested in checking out the latest 2022 DHIS2 Web App Development Academy playlist:

1 Like

Hi @lillian1n2,

Sorry my previous post didn’t touch the point exactly. The request and your use of the attribute parameter is correct but since it’s not returning the expected result it might be a bug, so would you like to create a jira bug issue (in



Thank you for the response. I will endeavor to raise the issue.

Also thank you for pointing me to the webinars on app development and I had actually had a look at those resources when preparing to undertake the project. They helped with my understanding of how to work with the API.

Though the resources that were more specific to the work I’m trying to do with the app is this:

Because it’s giving me ideas of how to have my code interact with the data retrieved via API.

1 Like