Is it possible to get a user by its Discourse ID from the Discourse API?

If you are using SSO, there is the /users/by-external/{$user_id}.json route.