I am trying to programmatically disable a service endpoint, but I am not able to achieve it using the following code.
$endpoint = services_endpoint_load('my_service');
$endpoint->disabled = TRUE;
services_endpoint_save($endpoint);
Is there any other way to disable the service endpoint? Is it possible to delete it?