REST POST config: define primary device

I have some server side logic that constructs the Syncthing config and then posts it to the specific device’s API.

What happens occasionally is that that specific device does not know which device in the devices list is it’s

Let’s say we have 2 devices with ids:

  1. 1234 - The device I’m POSTing the config to
  2. 5678

Sometimes device 1234 thinks it’s 5678.

Is there a parameter in that device JSON that can indicate that it is the main device for that Syncthing server?

Kind regards

Syncthing sends its own id in the headers I believe if you need to know that externally yet there is no guarantee that will stay there.

You don’t need to tell syncthing which device it is in the list as itself knows that.

In thoery you should use

1 Like

Brilliant, exactly what I needed!