API set .id * not working - how to set all vi API

I am using the php api sending commands.
I am able to set a value using .id = 0 or .id = default and so on.

I want to update all and set for example comments = “test”
I tried
.id=*
.id=‘’
.id=“find”
etc
but it doesn’t work.

anyone knows how to do that

You have to call the “find” command separately to get the (comma separated) list of all IDs. Write that list as the value of .id/numbers.

isn’t there a wildcard symbol or regex that I could use instead?

At this time, no. There’s no such feature in the protocol. Technically, it doesn’t even exist on the command line if you think about it…

set [find] comment="whatever"

is also two commands. It’s just that on terminal, you quickly get the result of one command into another’s value with the command operator (the “[” and “]”), and with the API, you have to explicitly do the inner commands first, get their results and populate the outer commands.

Weird
I am trying to use the getall to get all the ids to use them but it only returns the first item

/interface/getall
Array ( [0] => Array ( [.id] => *3 [name] => ether1 ) )

/radius/getall
Array ( [0] => Array ( [.id] => *3 [service] => hotspot,wireless ) )

using
Mikrotik Version 6.41
and
RouterOS PHP API class v1.6

Still no solution.
Anyone knows why getall only returns the first item?
/interface/ethernet/getall

returns only ether1 in the array instead of all.
that is happening in all getall calls

is there another that will return all findings?

Have you compared your code to the first example of PHP API?

https://github.com/BenMenking/routeros-api/blob/master/examples/example1.php

yes, the problem is that the $this->read() gets only the first item of the array.
I modified the api class to run it until no data is returned and the return an array of these responses.