Comments (2)
Hello! For update/remove/create need to use equal method of Query class.
Plus seems you need update your query, set
is parameter of /ppp secret
endpoint, so in library need to use /ppp/secret/set
and all other parameters need pass via equal method.
Details in this article on 8 page
Small example which can solve your issue:
// Get list of all available profiles with name Block
$query = new Query('/ppp/secret/print');
$query->where('name', 'Block');
$secrets = $client->query($query)->read();
// Parse secrets and set password
foreach ($secrets as $secret) {
// Change password
$query = (new Query('/ppp/secret/set'))
->equal('.id', $secret['.id'])
->equal('password', 'pa$$word');
// Update query ordinary have no return
$client->query($query)->read();
}
Full example here.
from routeros-api-php.
Thank you! It's worked!
from routeros-api-php.
Related Issues (20)
- How to handle response error properly? HOT 1
- Is there any way to get a user total download upload size of data? HOT 1
- Wol HOT 2
- /export does not work ROUTEROS7 HOT 3
- done HOT 1
- Stream timed out error HOT 4
- Why not connecting in live server? HOT 2
- windows Socket timeout reached HOT 4
- Unable to establish socket session, some sort of timeout error. HOT 5
- Random Stream timed out HOT 2
- Insert Query on RouterOS HOT 2
- add the content of the file in a variable HOT 3
- how to increase maximum time execution HOT 1
- remove active hotspot user problem HOT 2
- Export ask password interactively HOT 5
- Inconsistent Responses HOT 3
- How to use regex in where HOT 1
- does not support mikrotik chr v7, but works on local mikrotik v6 and v7 HOT 2
- Not working on shared hosting HOT 1
- Unable to Establish Socket Session on RouterOS 7.15: "No Connection Could Be Made" Error on SSH Connection
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from routeros-api-php.