The Locator API has the following 3 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 |
|
| |||||||||||||
2 |
|
| ||||||||||||||
3 |
| 3
| ||||||||||||||
4 |
|
Common features
...
| |||||||||||||
5 |
|
|
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. |
example:
GET Request
method: GET
...
Method | Example | Payload | |||||
---|---|---|---|---|---|---|---|
|
|
...
POST Request
method: POST
url: api/v1/locator
payload:
n/a | |||||||||||||
|
|
|
Response:
Code Block | ||
---|---|---|
| ||
{ "status": 200, "pager": { "page": 2, "pageCount": 120, "total": 243, "pageSize": 5, "nextPage": "{{host}}/api/v1v2/locator?paging=true&page=3&pageSize=5", "prevPage": "{{host}}/api/v1v2/locator?paging=true&page=31&pageSize=5" }, "dataorganisationUnits": {...} } |