[api] add by_id filter fun