Got api working with route of connection code