New Relics REST API is for getting the metrics that have been reported to New Relic.
For creating a plugin you will want to use the plugin API. Further information about using this can be found on the New Relic doc site.
https://docs.newrelic.com/docs/plugin-dev/working-directly-with-the-plugin-api