Syncthing DeviceID API on CLI

Hi All,

I’m having a strange issue that I’m not finding anything in the documentation or other sources that would help.

The problem that I’m having is that I need to use the API to set up Syncthing. I’m using an Ansible playbook to set it up. However, the problem is not in the playbook since I can reproduce it on the raw command line.

If I take the device ID that is generated on the instance of Syncthing and try to use it in a command line curl command, I get an error that the Device ID is invalid. See below

The odd thing here is that the id appears to be coming in as “null”. However, if I tweak the ID to make it invalid, it registers that ID correctly and then errors out as expected. I attempted to use another ID to point to another machine but received the same result.

Any assistance that can be provided would be welcome.

Michael Lockwood

You’re setting “introducedBy” to the string “null” which is not a valid device ID. Omit it, or possibly set it to a JSON null. This is the validation failure in your first attempt.

When the other, earlier, device ID is made incorrect you get that as the validation failure because it happens earlier.

Thank you for that.

I think that did it. I ran into another issue, but I believe this issue to be resolved.

Thank you for your assistance.

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