PUT call to rest/interface/bonding/<id> crashes switch

Hello,

I’m trying to update a bond via the API, but when I try it crashes the switch and prints up the following message:

1970-08-05 18:38:04 system,error,critical router rebooted because some critical
program crashed

Running a GET call on the same endpoint works fine:

curl --request GET --url 'http://mikrotik.local/rest/interface/bonding/*50' --header 'authorization: Basic <redacted>'
{".id":"*50","arp":"enabled","arp-interval":"100ms","arp-ip-targets":"","arp-timeout":"auto","disabled":"false","down-delay":"0ms","lacp-rate":"30secs","link-monitoring":"mii","mac-address":"D4:01:C3:25:16:8E","mii-interval":"100ms","min-links":"0","mode":"802.3ad","mtu":"1500","name":"peer-lacp","primary":"none","running":"false","slaves":"ether2,ether3","transmit-hash-policy":"layer-2","up-delay":"0ms"}%

But if I try to update that same instance:

curl --request PUT \
>   --url 'http://mikrotik.local/rest/interface/bonding/*50' \
>   --header 'authorization: Basic <redacted>' \
>   --header 'content-type: application/json' \
>   --data '{"name": "test123"}'

It crashes the switch. The same approach works with other endpoints though, for example I can use a PUT call towards an endpoint with the object ID in order to update interface config, etc.

Any insight into why this might be failing?

What happens if you update same property (name) over CLI with set for same interface? Is this property actually possible to update or is just read-only property when interface is added? Did you try update other property over API like link-monitoring like in doc.

Interesting… it does appear to just be the name field. I can toggle “disabled” for example fine. But I can also set name over the CLI as well:

[admin@mikrotik] > /interface/bonding/print
Flags: X - disabled; R - running
 0    name="peer-lacp" mtu=1500 mac-address=D4:01:C3:25:16:8E arp=enabled arp-timeout=auto slaves=ether2,ether3 mode=802.3ad primary=none link-monitoring=mii arp-interval=100ms
      arp-ip-targets="" mii-interval=100ms down-delay=0ms up-delay=0ms lacp-rate=30secs transmit-hash-policy=layer-2 min-links=0
[admin@mikrotik] > /interface/bonding
[admin@mikrotik] /interface/bonding> set name=test123
numbers: 0
[admin@mikrotik] /interface/bonding> print
Flags: X - disabled; R - running
 0    name="test123" mtu=1500 mac-address=D4:01:C3:25:16:8E arp=enabled arp-timeout=auto slaves=ether2,ether3 mode=802.3ad primary=none link-monitoring=mii arp-interval=100ms
      arp-ip-targets="" mii-interval=100ms down-delay=0ms up-delay=0ms lacp-rate=30secs transmit-hash-policy=layer-2 min-links=0
[admin@mikrotik] /interface/bonding>

Best way is then to report bug ticket to MT support service desk (uses different account than forum) if over CLI works but not over API.
Describe issue with example and attach autosupout.rif file if is generated after crash.