Re-added code to the api that was deleted in a previous commit