September 5, 20232 yr Can someone please tell me how to use the froxlor-cli for api-calls e.g. to add a customer? I tried the following and several other ways to provide the parameters but it doesn't seem to work. bin/froxlor-cli froxlor:api-call -s froxlor Customers.add '{"email": "mail@example.com", "company": "example-inc", "new_loginname": "example"}' Thanks in advance!
September 5, 20232 yr `-s` = show parameters, that won't run the `Customers.add` API call. The commands call is the following: froxlor:api-call [options] [--] <user> <api-command> [<parameters>] Also: Arguments: user Loginname of the user you want to run the command as api-command The command to execute in the form "Module.function" parameters Paramaters to pass to the command as JSON array The API doc for adding customers can be found here: https://docs.froxlor.org/latest/api-guide/commands/customers.html#customers-add
September 5, 20232 yr Author Thanks for the amazing fast feedback! Of course the '-s' is a mistake but I struggeled with how to provide the parameters in the array. Just for documentation: The following works. Quote froxlor-cli froxlor:api-call froxlor Customers.add '{"email": "info@example.com", "company": "example inc", "new_loginname": "example"}'
September 5, 20232 yr Solution Just now, nebulo said: am struggling with how to provide the parameters in the array. As stated in the --help output of the command: parameters Paramaters to pass to the command as JSON array Dont see where you are doing anything wrong, looks ok to me (and you've stated that the following works...)
Create an account or sign in to comment