I am trying to communicate with a Mikrotik RouterOS to create a new user as follows
$usermanagerQuery = new Query(
"/tool/user-manager/user/add",
[
'=customer=admin',
'=username=sampleuser',
'=password=samplepassword',
'=shared-users=1',
'=caller-id-bind-on-first-use=yes'
]
);
$userCreationResponse = $client->query($usermanagerQuery)->read(false);
Now I got a response of
Array ( [0] => !done [1] => =ret=*A85 )
What next do I need to do with the response above?
Thanks in advance
Nothing more. Your request is accomplished.
As api doc,
!done
is the first word of router reply that last sentence send by client isOK
. If there was any problem the response would be!trap
In the response array, the router is telling you OK ( !done) , and giving you the id of the last data entry
*A85
, if you need to manipulate on current session.