add API to defined nested routes over http