post https://case.coldstream.diabatix.com/boundaries
Creates a new boundary based on the information provided
Returns: a json object with meta data for the created boundary.
:param string boundary_name:
the name you want the new boundary to have
:param int region_Id:
the id of the region that will be a boundary of
:param int case_Id:
the id of the case that this boundary will be a part of
def create_boundary(self, boundary_name, region_Id, case_Id) -> Dict:
boundary_url = self.caseserver_url + "/boundaries"
payload = json.dumps({"name": boundary_name,"regionId": region_Id, "caseId": case_Id})
response = requests.post(boundary_url, data=payload, headers=self.put_header)
if(response.ok):
print("boundary creation successful: \n", response.text, "\n")
return response.json()
else:
logger.error(f"boundary creation failed: {response.content}")
raise Exception