Method | URI and Fields |
GET
| /iap/zones |
Retrieves all zones that the current user is permitted to read. This method allows pagination. Query Parameterspg | (Optional) Page number. Skipped if null or negative. | sz | (Optional) Size of a page. Skipped if null or negative. | name | (Optional) Return only zones that have the specified string in their names. | sortBy | (Optional) Sort returned collection by the specified field. | sortOrder | (Optional) Sort order. Can be either ASC (ascending) or DESC (descending). |
Return CodeExamplehttps://localhost/iap/zones Response[ { "id": 490, "name": "Zone", "description": "description", "polygon": { "type": "Polygon", "coordinates": [ [ [-2, -2], [-2, 2], [2, 2], [2, -2], [-2, -2] ] ] }, "floorId": 489, "color": "red" } ] |
|
/iap/zones/{zone} |
Retrieves all zones that the current user is permitted to read. Path ParametersFor a description of the valid path parameters, see Zone Path Parameters at the bottom of this page. Query Parameterspg | (Optional) Page number. Skipped if null or negative. | sz | (Optional) Size of a page. Skipped if null or negative. |
Return CodeExamplehttps://localhost/iap/zones/* https://localhost/iap/zones/*+name=+^fp1 Response[ { "id": 73, "name": "fp1-f1-z1", "polygon": { "type": "Polygon", "coordinates": [ [ [ 271.0, 265.0 ], [ 271.0, 319.0 ], [ 402.0, 319.0 ], [ 402.0, 265.0 ], [ 271.0, 265.0 ] ] ] }, "floorId": 72, "color": "red" } ] |
|
/iap/zones/count |
Retrieves the number of zones. Query ParametersrootsOnly | (Optional) If true then only root zones are counted. Default = false | name | (Optional) Count only zones that have the specified string in their name. |
Return Code |
/iap/zones/{id} |
Retrieves a zone by ID. Path ParameterReturn Codes200 | Success. | 400 | Zone does not exist. |
|
/iap/zones/{id}/children |
Retrieves a collection of child zones for the specified zone. Path Parameterid | (Required) ID of parent zone. |
Query Parametersrecursive | (Optional) If true, allows recursive requests for children. Default = false. | pg | (Optional) Page number. Skipped if null or negative. | sz | (Optional) Size of a page. Skipped if null or negative. |
Return Codes200 | Success. | 400 | Zone does not exist. |
|
/iap/zones/roots |
Retrieves a collection of root zones. Query Parametersfloorid | (Optional) ID of a floor that has zones. | pg | (Optional) Page number. Skipped if null or negative. | sz | (Optional) Size of a page. Skipped if null or negative. |
Return Code |
PUT
| /iap/zones/delete |
Deletes zones by list of IDs. Query Parametercascade | (Required) Flag indicates that all children zones must be removed as well. Default = false |
BodyContains the list of IDs. Body ExampleReturn Codes204 | Success. Zone deleted. | 422 | Zone has assigned child zones. |
|
/iap/zones/{id} |
Updates an existed zone by ID with the specified properties. Path ParameterParametersname | (Required) | description | (Optional) | polygon | (Required) | color | (Optional) |
Example{ "name":"ZoneChild", "description":"description", "polygon":{"type":"Polygon","coordinates":[[[-0.5,-0.5],[-0.5,0.5],[0.5,0.5],[0.5,-0.5],[-0.5,-0.5]]]} , "color":"red" } |
Return Codes200 | Success. Zone created. | 422 | One of the following applies: Zone must have a name. Zone with name already exists. Zone intersects another zone. Zone is included in another zone. Zone is not included in parent.
|
|
POST
| /iap/zones/child |
Creates a child zone with the specified properties. Query Parameterzoneid | (Required) ID of parent zone |
Parametersname | (Required) | description | (Optional) | polygon | (Required) | color | (Optional) |
Example{ "name":"ZoneChild", "description":"description", "polygon":{"type":"Polygon","coordinates":[[[-0.5,-0.5],[-0.5,0.5],[0.5,0.5],[0.5,-0.5],[-0.5,-0.5]]]} , "color":"red" } |
Return Codes200 | Success. Zone created. | 400 | One of the following applies: | 422 | One of the following applies: Zone must have a name. Zone with name already exists. Zone intersects another zone. Zone is included in another zone. Zone is not included in parent.
|
|
/iap/zones/root |
Creates a root zone with the specified properties. Parametersname | (Required) | description | (Optional) | polygon | (Required) | floorId | (Required) | color | (Optional) |
Example{ "name":"Zone", "description":"description", "polygon":{"type":"Polygon","coordinates":[[[-0.5,-0.5],[-0.5,0.5],[0.5,0.5],[0.5,-0.5],[-0.5,-0.5]]]}, "floorId":1, "color":"red" } |
Return Codes200 | Success. Zone created. | 400 | One of the following applies: | 422 | One of the following applies: Zone must have a name. Zone with name already exists. Zone intersects another zone. Zone is included in another zone. Zone is not included in parent.
|
|