Rest API : Deletion of an Element #2215
-
|
Hi, I tried to use the rest api to delete automatically an element in a model by submitting a commit request without payload as indicated in the syson swagger documentation but received a 405 code response with no text content. Could you please provide an example on how to use the rest api to delete an element from a model (exemple a part def from a package)? Here is a python code to reproduce the delete behavior. import requests host = 'my_host_id' commits_url = f"{host}/projects/{project_id}/commits" payload = { response = requests.post(commits_url, json=payload) if response.status_code == 201: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Hello, I've just added a new recipe about that in the official documentation https://doc.mbse-syson.org/syson/main/developer-guide/api/api-cookbook.html#_delete_element_recipe_python_script Hope it will help you! Regards, |
Beta Was this translation helpful? Give feedback.
Hello,
I've just added a new recipe about that in the official documentation https://doc.mbse-syson.org/syson/main/developer-guide/api/api-cookbook.html#_delete_element_recipe_python_script
Hope it will help you!
Regards,