0

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?

2
  • Try this code. $endpoint = services_endpoint_load('my_service'); $endpoint->resources['resource_name']['actions']['action_name']['disabled'] = 0; services_endpoint_save($endpoint);
    – sivani
    Jul 31, 2018 at 4:51
  • the code you have sent is to disable resources not the endpoints.
    – Anamika
    Jul 31, 2018 at 18:36

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.