Added functionality to handle discovery services.
Endpoint definition