Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The Locator API has three five endpoints. The endpoint for browsing the web API is /api/ and all the api resource are currently available under version 1 i.e /v2/.

URL

1

Locators or OrgUnits near byLocation of OrgUnits nearby

api/v2/locator

Status
colourGreen
titleGET
/
Status
colourYellow
titlePOST

2

Get Providers working in an orgUnit

api/v2/providers

Status
colourGreen
titleGET

3

List of Areas in a country

api/v2/area

Status
colourGreen
titleGET
/
Status
colourYellow
titlePOST

4

List of subAreas in the country and area

api/v2/subArea

Status
colourGreen
titleGET
/
Status
colourYellow
titlePOST

5

Fetch DHIS2 image data from embedding into the applicationstored in Org Unit

api/v2/proxy/images/{resourceId}

Status
colourGreen
titleGET

Pagination

Locator API supports pagination across all the endpoints listed above and is enabled by default.

...

Method

Example

Payload

Status
colourGreen
titleGET

api/v2/locator?paging=true&page=2&pageSize=5

n/a

Status
colourYellow
titlePOST

api/v2/locator

Code Block
languagejson
{
  "paging": "true",
  "page": "5",
  "pageSize": "5"
}

Response:

Code Block
languagejson
{
  "status": 200,
  "pager": {
    "page": 2,
    "pageCount": 120,
    "total": 243,
    "pageSize": 5,
    "nextPage": "{{host}}/api/v2/locator?paging=true&page=3&pageSize=5",
    "prevPage": "{{host}}/api/v2/locator?paging=true&page=1&pageSize=5"
  },
  "organisationUnits": {...}
}