api/api/organisationUnits/uv3iHrXmeej.json?fields=id,name,parent[id,name,parent[id,name,parent[id,name]]] not working in 2.40.7

Dear team,

the below API not give proper response

api/api/organisationUnits/uv3iHrXmeej.json?fields=id,name,parent[id,name,parent[id,name,parent[id,name]]]
in 2.40.7

output like

“code”: “1380100001”,
“name”: “Barangay 1”,
“created”: “2025-02-27T11:03:59.986”,
“lastUpdated”: “2025-02-27T11:04:00.227”,
“translations”: ,
“externalAccess”: false,
“createdBy”: {
“id”: “M5zQapPyTZI”,
“code”: “admin”,
“name”: “admin admin”,
“displayName”: “admin admin”,
“username”: “admin”
},
“userGroupAccesses”: ,
“userAccesses”: ,
“access”: {
“manage”: true,
“externalize”: true,
“write”: true,
“read”: true,
“update”: true,
“delete”: true
},
“favorites”: ,
“lastUpdatedBy”: {
“id”: “M5zQapPyTZI”,
“code”: “admin”,
“name”: “admin admin”,
“displayName”: “admin admin”,
“username”: “admin”
},
“sharing”: {
“external”: false,
“users”: {},
“userGroups”: {}
},
“shortName”: “Barangay 1”,
“dimensionItemType”: “ORGANISATION_UNIT”,
“legendSets”: ,
“parent”: {
“id”: “VHby1kXldLW”
},
“children”: ,
“path”: “/DcGhhRsspFX/MZG9dvMzzeK/VHby1kXldLW/uv3iHrXmeej”,
“openingDate”: “1970-01-01T00:00:00.000”,
“dataSets”: ,
“programs”: [
{
“id”: “oSNoNtcmLXL”
},
{
“id”: “VVLirjoOGbj”
}
],
“users”: [
{
“id”: “URmmyM4IqrB”
},
{
“id”: “bdhN1K67SIL”
}
],
“leaf”: true,
“dimensionItem”: “uv3iHrXmeej”,
“displayShortName”: “Barangay 1”,
“displayName”: “Barangay 1”,
“favorite”: false,
“user”: {
“id”: “M5zQapPyTZI”,
“code”: “admin”,
“name”: “admin admin”,
“displayName”: “admin admin”,
“username”: “admin”
},
“displayFormName”: “Barangay 1”,
“id”: “uv3iHrXmeej”,
“attributeValues”: ,
“organisationUnitGroups”: ,
“level”: 4,
“ancestors”: [
{
“id”: “DcGhhRsspFX”
},
{
“id”: “MZG9dvMzzeK”
},
{
“id”: “VHby1kXldLW”
}
]
}

now its working thanks

1 Like

Hi @Mithilesh_Kumar_Thak

Thanks for the update. Did you happen to figure out what made it not work and what specifically solved the issue?

It’d be great to detail the solution for other community members. Thanks ahead!