added a rest api to the gateway for publishing services and applications
fixed a broken test