added search resource endpoint and tests