add API endpoints for analyze