I am trying to access the Admin API but since I don't use credentials for access to the editor I can't seem to send a POST to the /auth/login endpoint. Does anyone know if there is a way to have a sepperate authentication strategy for the editor/ Admin-API?
I want to use the Admin-API to get information about the installed nodes. So an endpoint in Node-RED would also work but for that I don't know how to access the installed nodes.
If you don't use credentials to accessing the editor, do you mean you haven't got adminAuth configured at all? Or are you using an oauth based approach?
If you don't have adminAuth configured, then there is no need to post to /auth/login - you can just use the end points.
But also, where are you trying to do this from? From code running in the editor? Or in a flow in the runtime? Or somewhere else entirely?
If this is in the editor, then you can just use the admin API using $.ajax() as it is preconfigured with any authentication token that's needed.
Currently I am trying run this from the html of a custom node and have the following in the oneditprepare, where the /nodes is supposed to be the method of the Admin API
However this returns a 401/ Unauthorized. Not sure if this is because I'm calling the Admin-API wrong or the adminAuth is keeping me from logging in. Any thoughts?