API interface IDs

In my API in order to use
/interface/wireless/scan
=.id=*4

I tried to find out ids of my interfaces:
[admin@Mikrotik] /interface> :put [find]
*1;*2;*3;*9;*b;*c;*e;*f

1-3 are Ethernet interfaces
b,c is supposed to be wireless
and the rest are bridges.

Shouldn’t be there a list of id from 1 to 8?
Why cant I use:
/interface/wireless/scan
=.id=*b

… I always get this:
!trap=message=no such command prefix
!done

And last question: In RouterOS, what is the difference between ids mentioned above and those which are listed on the left when you do /interface print command? Why can’t I use those in API?

IDs displayed in console when you use print command is order numbers of each item. Those order numbers can be different depending on what you are printing

for example I run print command and get ether3 with order number 0

/interface ethernet print where name="ether3"
Flags: X - disabled, R - running, S - slave
 #    NAME                                  MTU   MAC-ADDRESS       ARP        MASTER-PORT                                SWITCH
 0 R  ether3                                1500

Now I run print to get all items

/interface ethernet print
Flags: X - disabled, R - running, S - slave
 #    NAME                                  MTU   MAC-ADDRESS       ARP        MASTER-PORT                                SWITCH
 0 R  ether1                                1500 
 1    ether2                                1500   
 2 R  ether3                                1500

Notice that now ether3 has different order number so you can’t use it from API in any way.

That is why each item has unique internal ID number which is assigned to each item.