Tracker Web API events dataElementIdScheme

Does the Tracker Web API events endpoint support dataElementIdScheme=name?

curl --location -g --request GET 'https://play.dhis2.org/2.35.12/api/35/events.json?trackedEntityInstance=oi3PMIGYJH8&fields=event,programStage,dataValues[dataElement,value]&dataElementIdScheme=name' \
--header 'Authorization: Basic YWRtaW46ZGlzdHJpY3Q='

Seems to be returning the code instead:

{
    "pager": {
        "page": 1,
        "pageCount": 1,
        "total": 0,
        "pageSize": 50
    },
    "events": [
        {
            "programStage": "ZzYYXq4fJie",
            "event": "hUQEgo9b5dz",
            "dataValues": [
                {
                    "dataElement": "MCH Infant Feeding DE_2006103",
                    "value": "Replacement"
                },
                {
                    "dataElement": "DE_2006104",
                    "value": "1"
                },
                {
                    "dataElement": "DE_2006099",
                    "value": "1214"
                },
                {
                    "dataElement": "DE_2006106",
                    "value": "No"
                },
                {
                    "dataElement": "DE_2006107",
                    "value": "Positive"
                },
                {
                    "dataElement": "DE_2006108",
                    "value": "Blood"
                },
                {
                    "dataElement": "DE_2006101",
                    "value": "Yes"
                },
                {
                    "dataElement": "DE_2006105",
                    "value": "12"
                },
                {
                    "dataElement": "DE_2006100",
                    "value": "TDF/3TC/EFV - 1"
                },
                {
                    "dataElement": "DE_2008126",
                    "value": "High blood pressure."
                },
                {
                    "dataElement": "DE_2006110",
                    "value": "No"
                },
                {
                    "dataElement": "DE_2006109",
                    "value": "Yes"
                }
            ]
        },
        {
            "programStage": "A03MvHHogjR",
            "event": "zfzS9WeO0uM",
            "dataValues": [
                {
                    "dataElement": "MCH Infant Feeding DE_2006103",
                    "value": "Replacement"
                },
                {
                    "dataElement": "DE_2006104",
                    "value": "1"
                },
                {
                    "dataElement": "DE_2006101",
                    "value": "Yes"
                },
                {
                    "dataElement": "DE_2008294",
                    "value": "NVP only"
                },
                {
                    "dataElement": "DE_2006098",
                    "value": "34"
                },
                {
                    "dataElement": "DE_2005736",
                    "value": "1231"
                }
            ]
        }
    ]
}
1 Like

Hi @Yassin & welcome back! :tada:

Thank you for your post! This could be a bug because it’s alternating between CODE and UID but doesn’t show the result with name when it’s selected.

Would you like to create a Jira bug issue in jira.dhis2.org ? Thanks!

Hi @Gassim,

Thanks for the response.

I’ve created the bug issue: [DHIS2-12907] - Jira.

2 Likes

Thank you @Yassin! I added my vote and ‘watching’ the issue, and I added a comment with a link to this topic and CoP to the issue’s labels.