Implement the expand-id API.

Done.