api for plugins