API access to homeassistant server config

Hi all, new to NR. Great product!

I am trying to do the following: programmatically (re)connect a NR installation to its HA (after a backup). I need an automatic installation of HA Core + NR. I know I can do it from UI, but I want to do it programmatically if possible. I want to pretty much 'unclick' the "I use the HA add-on" and set a base URL and token.

What I tried:

curl -H "Accept: application/json" http://myhost.local:1880/nodes | jq .
    "id": "f9263a0dce1fe118",
    "type": "tab",
    "label": "XYZ",
    "disabled": false,
    "info": "",
    "env": []
    "id": "86b445a.684a7b8",
    "type": "server",
    "name": "Home Assistant",
    "version": 2,
    "addon": true,
    "rejectUnauthorizedCerts": true,
    "ha_boolean": "y|yes|true|on|home|open",
    "connectionDelay": true,
    "cacheJson": true,
    "heartbeat": false,
    "heartbeatInterval": 30

I can retrieve the first flow, but not not the HA one:

curl -H "Accept: application/json" http://myhost.local:1880/flow/f9263a0dce1fe118

works, but:

curl -H "Accept: application/json" "http://myhost.local:1880/flow/86b445a.684a7b8"

NR audit logs:

16 Jan 01:15:50 - [audit] {"event":"flow.get","id":"86b445a.684a7b8","error":"not_found","level":98,"path":"/flow/86b445a.684a7b8","ip":"","timestamp":1642295750479}
16 Jan 01:15:50 - [audit] {"event":"api.error","error":"not_found","message":"Error","level":98,"path":"/flow/86b445a.684a7b8","ip":"","timestamp":1642295750483}

Any idea what is the problem/how can I achieve my goal?

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.