[webui][api] Refactor attributes