Method | Description |
---|---|
POST /api/v1/region | Add or update a region and, optionally, its children. The region is added as a top-level region if a parent region is not specified. |
GET /api/v1/region | Returns a hierarchical list of all regions. |
GET /api/v1/region/nodes | Returns a hierarchical list of all regions but includes additional information such as the number of registered users in each region. |
GET /api/v1/region/{regionName} | Returns the specified region and any child regions. |
DELETE /api/v1/region/{regionName} | Deletes the specified region. This also deletes any child regions and removes any associated managers or sites. |
[ { "name": "East" "description": "Eastern Region", "children": [ {"name": "District3", "description": "Chicago", "children": [ {"name": "Site4"}, {"name": "Site5"} ] } ] } ]
curl -X 'POST' \ 'https://<ZEMS_URL>/api/v1/region' \ -H 'accept: application/json' \ -H 'ApiKey: <ZEMS_API_KEY>' \ -H 'authorization: Bearer <TOKEN>' \ -H 'Content-Type: application/json' \ -d '[ { "name": "East", "description": "Eastern Region", \ "children": [ {"name": "District3", "description": "Chicago", \ "children": [ {"name": "Site4"}, {"name": "Site5"} ] } ] } ]'