First of all I get information about ports
Code: Select all
Request:
POST /rest/interface/bridge/port/print HTTP/1.1
{".proplist" : [".id","interface","pvid"]}
Response:
[{".id":"*0","interface":"ether2","pvid":"500"},{".id":"*1","interface":"ether3","pvid":"501"},{".id":"*2","interface":"ether4","pvid":"1"},{".id":"*3","interface":"ether1","pvid":"501"}]
And try to change `pvid` on `ether1`
Code: Select all
Request:
PATCH /rest/interface/bridge/port/*3 HTTP/1.1
{"pvid" :"505"}
Response:
{".id":"*3", ..., "interface":"ether1", ... "pvid":"505"}
In Winbox I can exec command without `{id}`, using `find`
Code: Select all
/interface/bridge/port/set [find where interface=ether1] pvid=505
Is there REST request without specifying an ID? For example
Code: Select all
PATCH /rest/interface/bridge/port/?interface=ether1 HTTP/1.1
{"pvid" :"505"}