Separate the method get_api and add it to plugin custom methods.