implement get_segment_endpoint RPC call

Change-Id: I54fba30f2a1bdc467f6146c38174dbf535644f1b