rebuild api