add collapse for each api and model