Extract coordinates fro organization units- Solved

Hello, I’m trying to extract coordinates for the organization unit but the API doesn’t return any coordinates, it only returns the following columns; code, name, id.

This is the api I’m using DHIS 2 Demo - Sierra Leone

Kindly assist where necessary. @stratosilva @Edward_Robinson @Gassim

1 Like

Hi @Kenyuri,
Thank you for your post!
actually, please try to use geometry property:


The api request you posted is requesting featureType and coordinates from the /organisationUnits endpoint but if you look at the api/schema, the following properties are the only ones supported:

Organisation Unit

properties
parent
publicAccess
type
path
lastUpdated
children
translations
uid
href
groups
displayDescription
lastUpdatedBy
userGroupAccesses
created
attributeValues
displayFormName
users
phoneNumber
userAccesses
name
dataSets
legendSets
programs
shortName
dimensionItemType
favorites
aggregationType
code
access
displayName
description
contactPerson
displayShortName
externalAccess
periodOffset
formName
openingDate
email
address
memberCount
url
closedDate
geometry
comment
user

Hope that helps! :+1:

I need an API that can return the geometry for the organization units

1 Like

Yes, thanks, please give this one a try /api/organisationUnits.json?fields=id,name,code,geometry&paging=false

Thank you so much, its working.

1 Like

Great, thanks! Please mark as solved :grin::+1: