Boundary Service
Overview
Boundary service provides APIs to create Boundary entities, define their hierarchies, and establish relationships within those hierarchies. You can search for boundary entities, hierarchy definitions, and boundary relationships. However, you can only update boundary entities and relationships.
Pre-requisites
Prior knowledge of Java/J2EE.
Prior knowledge of Spring Boot.
Prior knowledge of REST APIs and related concepts like path parameters, headers, JSON etc.
Prior knowledge of Git.
Advanced knowledge of operating JSON data would be an added advantage to understanding the service.
Key Functionalities
Create Boundary entity: It introduces functionality to define your boundary entity with all validations and properties supported by GeoJson. Currently, only the geometry type of Polygon and Point is supported by it.
Search Boundary entity: It has APIs to search boundaries based on the tenantid & codes, both being mandatory.
Update Boundary entity: This allows updating the geometry details of a boundary entity.
Create Boundary Hierarchy-definition: It allows defining boundary hierarchy definitions against a particular tenantId and hierarchyType which then can be referenced while creating boundary relationships.
Search Boundary Hierarchy-definition: boundary-service supports searching for hierarchy definitions based on tenantId and HierarchyType where tenantId is mandatory. In case the hierarchyType is not provided, it returns all hierarchy definitions for the given tenantId.
Create Boundary Relationship: It supports defining relationships between existing boundary entities according to the established hierarchy. It requires tenantId, code, hierarchyType, boundaryType, and parent fields. Where tenantId and code uniquely combine to determine a boundary entity, tenantId and hierarchType combine to define the hierarchy used in establishing the relationship between the boundary entity and its parent. It verifies if the parent relationship is already established before creating a new one. It also checks if the specified boundaryType is a direct descendant of the parent boundaryType according to the hierarchy definition.
Search Boundary Relationship: This functionality supports searching the boundary relationships based on the given params -
tenantId
hierarchyType
boundaryType
codes
includeChildren
includeParents
where tenantId and hierarchyType are mandatory and the rest are optional.
Update Boundary Relationship: This allows updating the parent boundary relationship within the same level as per the hierarchy.
API Details
/boundary/_create - Takes
RequestInfo
andBoundary
in the request body. boundary has all attributes which define the boundary./boundary/_search - Takes
RequestInfo
in the request body and search criteria fields (refer to the functionality above for exact fields ) asparams
and return the boundary based on the provided search criteria./boundary/_update - Takes
RequestInfo
andBoundary
in the request body where the boundary has all the info that needs to be updated and returns the updated boundary./boundary-hierarchy-definition/_create - Takes
RequestInfo
and boundary hierarchy definition in the request body whereBoundaryHierarchy
object has all the information for the hierarchy definition being created./boundary-hierarchy-definition/_search - Takes
RequestInfo
andBoundaryTypeHierarchySearchCriteria
in the request body to return boundary hierarchy definition based on the provided search criteria./boundary-relationships/_create - This API takes
RequestInfo
andBoundaryRelationship
in the request body whereBoundaryRelationship
has all the info required to define a relationship between two boundaries./boundary-relationships/_search - This API takes
RequestInfo
in the request body and search criteria fields (refer to functionality for the exact fields) are passed asparams
to return master data based on the provided search criteria and return the response./boundary-relationships/_update - This API takes
RequestInfo
andBoundaryRelationship
in the request body to update the fields given in theBoundaryRelationship
and returns the updated data.
Postman Collection for Boundary Service APIs:
Last updated