André P. Posted September 2, 2015 Report Posted September 2, 2015 Hi, I wonder if that is possible... I need to get a list of the "solusvm_main_ip_address" + a customers id (#1500 etc.) if the service is active. Any idea how to do this? :-/ The API construct is not a problem, I just have no idea how to query it. Thanks! Quote
activa Posted September 2, 2015 Report Posted September 2, 2015 this should be done via the solus_vm class, but i tink the solus_vm hasn't any function that can retieve this . you can create your own plugin to achieve this . Quote
Tyson Posted September 2, 2015 Report Posted September 2, 2015 Via the API you would have to fetch the client and then fetch his services, and manually sort out whether they have an active SolusVM service and what the main IP may be. If you simply need a list to reference, a CSV report may be useful. Create a custom report under [billing] -> [Reports] with a query for what you want to fetch, e.g. SELECT REPLACE(`clients`.`id_format`, '{num}', `clients`.`id_value`) AS `id_code`, `service_fields`.`value` AS `main_ip` FROM `clients` INNER JOIN `services` ON `services`.`client_id` = `clients`.`id` INNER JOIN `service_fields` ON `service_fields`.`service_id` = `services`.`id` WHERE `services`.`status` = 'active' AND `service_fields`.`key` = 'solusvm_main_ip_address' GROUP BY `services`.`id`, `clients`.`id` ORDER BY `id_code` ASC; André P., Blesta Addons, Michael and 1 other 4 Quote
André P. Posted September 2, 2015 Author Report Posted September 2, 2015 Wow, thanks! That's even better. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.