Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Version History

« Previous Version 10 Next »

The Locator API has 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

Location of OrgUnits near by

api/v2/locator

GET / POST

2

Get Providers working in an orgUnit

api/v2/providers

GET

3

List of Areas in a country

api/v2/area

GET / POST

4

List of subAreas in the country and area

api/v2/subArea

GET / POST

5

Fetch DHIS2 image stored in Org Unit

api/v2/proxy/images/{resourceId}

GET

Pagination

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

Parameter

Option Values

Default Option

Description

paging

true | false

true

Indicates weather to return lists of elements in pages

page

number

1

Defines which page number to return

pageSize

number

10

Defines the number of elements to return for each page.

Method

Example

Payload

GET

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

n/a

POST

api/v2/locator

{
  "paging": "true",
  "page": "5",
  "pageSize": "5"
}

Response:

{
  "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": {...}
}
  • No labels