Boundary Service

Boundary-service exposes APIs for creating Boundary entities, defining Boundary hierarchy definitions, defining relationships between Boundary entities with respect to a particular boundary hierarchy definition.

Further searching for boundary entities , hierarchy definitions, boundary relationships is supported.
However updates are allowed only for boundary entities and boundary relationships.

Requirements:

  1. Prior Knowledge of Java/J2EE.

  2. Prior Knowledge of Spring Boot.

  3. Prior Knowledge of REST APIs and related concepts like path parameters, headers, JSON etc.

  4. Prior knowledge of Git.

  5. Advanced knowledge on how to operate JSON data would be an added advantage to understand the service.

Functionalities:

  1. Create Boundary entity : It introduces functionality to define your boundary entity with all validations and properties supported by GeoJson. Currently only geometry type of Polygon and Point is supported by it.

 

  1. Search Boundary entity: It has API’s to search boundary based on the tenantid & codes , both being mandatory.

 

  1. Update Boundary entity: This allows updating the geometry details of a boundary entity

 

  1. 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.

 

  1. Search Boundary Hierarchy-definition: boundary-service support searching for hierarchy definitions based on tenantId and HierarchyType where tenantId is mandantory. If hierarchyType is not provided it returns all hierarchy definition against the given tenantId.

 

  1. Create Boundary Relationship: It supports defining relationship between already defined boundary entities based on already defined hierarchy definition. It requires tenantId , code, hierarchyType, boundaryType, parent fields. Where tenantId and code uniquely combined determines a boundary entity whereas tenantId and hierarchType uniquely combined determines the hierarchy definition to be used while defining the relationship between boundary entity and parent.
    It checks the relationship for parent to be already defined before creating the given relationship.
    Also whether the given boundaryType is the direct descendant of the parent boundaryType as per the boundary hierarchy definition.

 

  1. Search Boundary Relationship: This functionality supports searching the boundary relationships based on the given params

    1. tenantId

    2. hierarchyType

    3. boundaryType

    4. codes

    5. includeChildren

    6. includeParents

where tenantId and hierarchyType are mandatory and rest being optional.

 

  1. Update Boundary Relationship: This supports the functionality to update the boundary relationship parent withing the same level as per the hierarchy definition.

API Details:

  1. /boundary/_create - Takes RequestInfo and Boundary in request body. boundary has all attributes which define the boundary.

 

  1. /boundary/_search - Takes RequestInfo in request body and search criteria fields (refer to the functionality above for exact fields ) as params and return boundary based on the provided search criteria.

 

  1. /boundary/_update - Takes RequestInfo and Boundary in request body where boundary has all the info that needs to be updated and returns the updated boundary .

 

  1. /boundary-hierarchy-definition/_create - Takes RequestInfo and boundary hierarchy definition in request body where BoundaryHierarchy object has all the information for the hierarchy definition being created .

 

  1. /boundary-hierarchy-definition/_search - Takes RequestInfo and BoundaryTypeHierarchySearchCriteria in request body to return boundary hierarchy definition based on the provided search criteria.

 

  1. /boundary-relationships/_create - This API takes RequestInfo and BoundaryRelationship in request body where BoundaryRelationship has all the info required to define a relationship between two boundaries.

 

  1. /boundary-relationships/_search - This API takes RequestInfo in request body and search criteria fields (refer to functionality for the exact fields) are passed as params to return master data based on the provided search criteria and returns the response.

 

  1. /boundary-relationships/_update - This API takes RequestInfo and BoundaryRelationship in request body to update the fields given in the BoundaryRelationship and returns the updated data.

Postman Collection for Boundary service APIs:

https://api.postman.com/collections/20755293-c145daab-6465-49a8-b316-4f56a94f186b?access_key=PMAT-01HYHWJ5DZJ6VV0BX8HP9R1DBA