Creating a plugin that uses the REST API