Update boundary

Updates an existing boundary with the provided information

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Updates the boundary with the given info, returns a json object of the updated case. The data field is optional, do note that the target boundary will be completely replaced by the information in this call. For example, not filling in a property field in 'data' will delete all the already existing properties on this boundary.

Returns: a json object with the updated boundary

:param int boundary_Id: the id of the boundary that you want to update
:param string boundary_name: the new name you want the boundary to have (can be the same as the old one)
:param string boundary_type: the boundary type you want this boundary to have, 'fixedTemperatureWall' -- 'heatedWall' -- 'externalWall' -- 'insulatedWall' -- 'cyclic'
:param string data: this field is optional, contains all data concerning the boundary, this should be a string object in json format. An example is the following:

json.dumps({
        "boundaryType": "fixedFlowRateInlet",
        "properties": {
            "T": 293,
            "U": 0.2,
            "emissivity": 1,
            "absorptivity": 0.9
        },
        "stl": "https://s3.direct.eu-de.cloud-object-storage.appdomain.cloud/stage-helios-case/cases/805/52ee9602-818c-452b-8f57-ab7e872fd310.stl",
        "step": "https://s3.direct.eu-de.cloud-object-storage.appdomain.cloud/stage-helios-case/cases/805/3c63fa2b-fb25-4d0a-be62-cc72ce1b80f9.step",
        "name": "fixedFlowRateInlet",
        "id": 10173
    })

Python code for the function to update the boundary:

def update_boundary(self, boundary_Id, boundary_name, boundary_type, data="{}") -> Dict:

    boundary_url = self.caseserver_url + "/boundaries/" + str(boundary_Id)

    payload = json.dumps({"name": boundary_name,"boundaryType": boundary_type, "data": data})
    
    response = requests.put(boundary_url, data=payload, headers=self.put_header)

    if(response.ok): 
        print("boundary update successful: \n", response.text, "\n")
        return response.json()
    else: 
        logger.error(f"boundary update failed: {response.content}")
        raise Exception
Path Params
int64
required
Body Params
string
required
length between 1 and 255
string
required
length between 1 and 255
string | null
Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
string
enum
Defaults to application/json

Generated from available request content types

Allowed:
Response

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
text/plain
application/json
text/json