Region Sites Endpoint
Region Sites Endpoint

Region Sites Endpoint

Use the Region.Sites endpoint to manage sites.
The Region.Sites endpoint includes the following methods:
Method
Description
POST /api/v1/region/sites/{regionName}
Add one or more sites to a region. If a site previously belonged to a different region, it will be reassigned to this region. Multiple sites must be separated by commas.
GET /api/v1/region/sites/{regionName}
Returns all sites. If a region is specified, returns the sites from that region. This method does not return sites for child regions.
GET /api/v1/region/sites/{regionName}/{siteName}
Returns a single site specified by the region and site name.
DELETE /api/v1/region/sites/{regionName}/{siteName}
Deletes the site specified by the region and site name.

Sites Parameters

Regions that do not contain child regions must have sites. A response from an API call for a site returns the following parameters:
Site Parameters in API Responses
Parameter
Example
Description
"id"
1020
Internal ID of the site.
"customer_id"
1
ZEMS customer ID.
"parent"
393
Parent region ID.
"deleted"
true
This site was deleted from the PTT Pro server and then removed from ZEMS.
"part"
0
Randomly assigned number when a new site is added to the database.
"name"
"R13OP"
Site name.
"description"
"Lincolshire, IL"
Site description.
"created_at"
1637688569
Timestamp when the site was created.
"updated_at"
1637714700
Timestamp when the site was last updated.
Region Sites Example
This example adds two sites to the District3 region.
curl -X 'POST' \ 'https://<ZEMS_URL>/api/v1/region/sites/District3' \ -H 'accept: application/json' \ -H 'ApiKey: <ZEMS_API_KEY>' \ -H 'authorization: Bearer <TOKEN>' \ -H 'Content-Type: application/json' \ -d 'Site1,Site2'