Method | URI and Fields |
GET | /iap/gz |
Returns all geozones that the current user has permission to read. Query Parameterspg - page number. Skipped if null or negative sz - size of a page. Skipped if null or negative name - filter geozones by the specified substring in their names scId – filters geozones by segment controller’s id scName – fileters geozones by segment controller’s name sortBy - sorting returned collection by the specified field sortOrder - sorting order. Can be either ASC or DEC
Success ResponseCollection of geozones. Examplehttps://localhost/iap/gz Response[ { "id": 88, "name": "World", "description": "", "polygon": { "type": "Polygon", "coordinates": [ [ [ -180, -90 ], [ -180, 90 ], [ 180, 90 ], [ 180, -90 ], [ -180, -90 ] ] ] }, "customerId": 81 } ] |
|
/iap/gz/{id}/children |
Returns collection of child geozones for the specified geozone. ParameterQuery Parameterspg – page number. Skipped if null or negative sz – size of a page. Skipped if null or negative recursive – returns recursively children for every child geozone if set to true, by default false
Success ResponseCollection of geozones. Examplehttps://localhost/iap/gz/88/children Response[ { "id": 1385, "name": "Test Child Geozone", "description": "Test Child Geozone", "polygon": { "type": "Polygon", "coordinates": [ [ [ -113.038330078125, 37.87485339352928 ], [ -113.038330078125, 41.49212083968776 ], [ -104.820556640625, 41.49212083968776 ], [ -104.820556640625, 37.87485339352928 ], [ -113.038330078125, 37.87485339352928 ] ] ] }, "customerId": 81 } ] |
|
/iap/gz/roots |
Returns all root geozones that the current user is permitted to read. The root geozone is a geozone that does not have a parent geozone. Query ParametersSuccess ResponseCollection of geozones. Examplehttps://localhost/iap/gz/roots Response[ { "id": 88, "name": "World", "description": "", "polygon": { "type": "Polygon", "coordinates": [ [ [ -180, -90 ], [ -180, 90 ], [ 180, 90 ], [ 180, -90 ], [ -180, -90 ] ] ] }, "customerId": 81 } ] |
|
/iap/gz/{id} |
Returns the geozone with the specified ID. Returns nothing if the current user doesn’t have permission to read this geozone. ParameterSuccess ResponseGeozone with the specified ID. Examplehttps://localhost/iap/gz/88 Response{ "id": 88, "name": "World", "description": "", "polygon": { "type": "Polygon", "coordinates": [ [ [ -180, -90 ], [ -180, 90 ], [ 180, 90 ], [ 180, -90 ], [ -180, -90 ] ] ] }, "customerId": 81 } |
|
/iap/gz/count |
Returns count of the geozones that current user is permitted to read. If the rootsOnly parameter is set to true, then only root geozones will be taken into account. Query ParametersrootsOnly - if true, only root geozones will be counted. name - count geozones only with the specified substring in their names. scId - count geozones segment controller with the specififed ID. scName - count geozones segment controller with the specififed name.
Success ResponseNumber of geozones. Examplehttps://localhost/iap/gz/count?rootsOnly=true Response{ "value": 1 } |
|
PUT | /iap/gz |
Updates an existing geozone with the specified properties. Query ParameterSuccess ResponseSuccessfully updated geozone. Examplehttps://localhost/iap/gz Request Payload{ "id":88, "name":"World", "description":"UPDATED", "polygon":{ "type":"Polygon", "coordinates":[ [ [-180,-90], [-180,90], [180,90], [180,-90], [-180,-90] ] ] }, "customerId":81 } Response{ "id": 88, "name": "World", "description": "UPDATED", "polygon": { "type": "Polygon", "coordinates": [ [ [ -180, -90 ], [ -180, 90 ], [ 180, 90 ], [ 180, -90 ], [ -180, -90 ] ] ] }, "customerId": 81 } |
|
POST | /iap/gz/root |
Creates a root geozone with the specified properties Query ParameterSuccess ResponseReturns the successfully created geozone. Examplehttps://localhost/iap/gz/root Request Payload{ "polygon":{ "type":"Polygon", "coordinates":[ [ [-113.038330078125,37.87485339352928], [-113.038330078125,41.49212083968776], [-104.820556640625,41.49212083968776], [-104.820556640625,37.87485339352928], [-113.038330078125,37.87485339352928] ] ] }, "name":"Root Child Geozone", "description":"Root Child Geozone", "customerId":81 } Response{ "id": 1389, "name": "Root Child Geozone", "description": "Root Child Geozone", "polygon": { "type": "Polygon", "coordinates": [ [ [ -113.038330078125, 37.87485339352928 ], [ -113.038330078125, 41.49212083968776 ], [ -104.820556640625, 41.49212083968776 ], [ -104.820556640625, 37.87485339352928 ], [ -113.038330078125, 37.87485339352928 ] ] ] }, "customerId": 81 } |
|
/iap/gz/child |
Creates a child geozone for the specified geozone. Throws a validation exception if the geozone cannot be created. The user must have WRITE permission for the specified geozone. Query ParametersSuccess ResponseSuccessfully created child geozone. Examplehttps://localhost/iap/gz/child?geozoneId=88 Request Payload{ "polygon":{ "type":"Polygon", "coordinates":[ [ [-113.038330078125,37.87485339352928], [-113.038330078125,41.49212083968776], [-104.820556640625,41.49212083968776], [-104.820556640625,37.87485339352928], [-113.038330078125,37.87485339352928] ] ] }, "name":"Test Child Geozone", "description":"Test Child Geozone" } Response{ "id": 1388, "name": "Test Child Geozone", "description": "Test Child Geozone", "polygon": { "type": "Polygon", "coordinates": [ [ [ -113.038330078125, 37.87485339352928 ], [ -113.038330078125, 41.49212083968776 ], [ -104.820556640625, 41.49212083968776 ], [ -104.820556640625, 37.87485339352928 ], [ -113.038330078125, 37.87485339352928 ] ] ] }, "customerId": 81, "parentId": 88 } |
|
DELETE | /iap/gz/{id} |
Removes the specified geozone from the CMS. The user must have WRITE permission on this geozone to perform this operation. If cascade is set to true then all child geozones will be removed as well. ParameterQuery ParameterSuccess Responseempty Examplehttps://localhost/iap/gz/1388 Responseempty |
|