How to remove certificates of puppetca user hosts

Hello everyone
For one of my automation tasks, I need to delete the certificate of one particular workstation that is being serviced by Foreman.
I want to automate this by using a python script or ansible task.
I could not find how to approach this functionality through the foreman API.

The URL turns out like this:
https://foreman.com/smart_proxies/1#certificates

The link that is displayed when hovering over the “Revoke” button:
https://foreman.com/smart_proxies/1/puppetca/test
When I try to follow this link in the browser, I get error 404 (The page you were looking for doesn’t exist.)
After clicking the “Revoke” button through the interface, a form appears with two buttons - “confirm” and “cancel”. I need to figure out how to “click the confirm button” via the API.

When searching for an api link to this action, I found that the last link registered for the api is: https://foreman.com/api/smart_proxies/1/

How can I still delete workstation certificates via the API and is it possible?

This sounds like a bug. Please file an issue: Foreman