This video gives a step-by-step process on Enable/Disable Services/Connectors under Runtime Environment using Rest API.
For further information, refer to the following:
Ref KB article- https://knowledge.informatica.com/s/article/000228481?language=en_US
Ref Documentation- https://docs.informatica.com/cloud-common-services/administrator/current-version/rest-api-reference/platform-rest-api-version-2-resources/runtime-environments/managing-secure-agent-group-selections.html