You cannot delete the main branch, this is the reference branch and it must stay. If you want to delete the entire service you have to delete the project.
There is no REST API to delete a project, it can only be done as you show in the UI.
If you think this is something that should be added to the product you can file an enhancement here: https://ideas.ibm.com/new-idea
Use the product Automation Decision Service
------------------------------
Alain Robert
------------------------------
Original Message:
Sent: Thu December 22, 2022 01:00 AM
From: Kian Seng Goh
Subject: how to programatically delete a Decision Service
Hello, how do we delete this "Sample" decision service programatically?
is there a API we can call? we tried to use the below API to delete the main branch but we saw this error,
{ "error": "IlrPermissionException", "reason": "Insufficient privileges to perform this action.", "status": "FORBIDDEN", "ref": null, "errorCode": null, "details": [ "Insufficient privileges to perform this action." ]}
------------------------------
Kian Seng Goh
------------------------------