Please use the below API to delete the service from Ambari-2.2.1.0. Below example shows how to delete KNOX service, similarly you can modify its values to reflect your need.
curl -u admin:admin -H "X-Requested-By: ambari" -X DELETE http://<AMBARi_SERVER_HOST>:8080/api/v1/clusters/<$CLUSTER_NAME>/services/KNOX
To add the service you can refer to this documentation.