# Create an admin configuration API HTTPS endpoint

**URL:** <https://discourse.nodered.org/t/create-an-admin-configuration-api-https-endpoint/4423>\
**Category:** General\
**Created:** [30 October 2018 15:47 UTC](https://discourse.nodered.org/t/create-an-admin-configuration-api-https-endpoint/4423 "2018-10-30T15:47:44Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [16 November 2018 14:38 UTC](https://discourse.nodered.org/t/create-an-admin-configuration-api-https-endpoint/4423/8 "2018-11-16T14:38:43Z")

</div>

Hi @stamer

I've edited your posts to format the code properly as described in this post: [How to share code or flow json](https://discourse.nodered.org/t/how-to-share-code-or-flow-json/506)

The code inside the `RED.httpAdmin.post` handler is not tied to any node instance. `node` doesn't exist inside the function. You need to identify the node you want to handle the request for as part of the request itself. You can see how the Inject node does it here: [https://github.com/node-red/node-red/blob/master/nodes/core/core/20-inject.js#L113-L114](https://github.com/node-red/node-red/blob/master/nodes/core/core/20-inject.js#L113-L114)

It defines the admin end point like this:

```auto
RED.httpAdmin.post("/inject/:id", ...

```

The `:id` part of the url is a parameter that will contain the id of the node. The function can then go lookup that node:

```auto
var node = RED.nodes.getNode(req.params.id);

```

However, that is a reference to the current _deployed_ node in the runtime. If the user has just dragged on their node to the workspace and edited it to provide a user/password, then none of that information will exist in the runtime yet. In that scenario, you'd need to provide the user/password (and any other node configuration information) in the request itself.

---

_[View the full topic](https://discourse.nodered.org/t/create-an-admin-configuration-api-https-endpoint/4423)._
