Link file

Links a file for a specified case

Log in to see full request history

Returns: a json object with meta data for the file

:param int case_Id: id of the case that contains the component that you want to link a file to
:param int case_component_id: id of the component you want to link a file to
:param string file_name: name of the file (can be what you want, but the file extension has to be right, for example .stp)
:param string file_url: url to the file you want to link to the component. An example url is: "https://s3.direct.eu-de.cloud-object-storage.appdomain.cloud/stage-helios-case/cases/805/bae3affb-90d3-47c2-ae0d-8cf110176c5b.step"


def link_file(self, case_Id, case_component_Id, file_name, file_url) -> Dict: url = self.fileserver_url + "/cases/" + str(case_Id) + "/components/" + str(case_component_Id) + "/link" payload = json.dumps({"fileName": file_name, "fileUrl": file_url}) response = requests.post(url, data=payload, headers=self.put_header) if(response.ok): print("file successfully linked: \n", response.text, "\n") return response.json() else: logger.error(f"file link failed: {response.content}") raise Exception

Response

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