Update ID extraction in REST API