Added component API endpoints with tests.