Hi,
I am looking to change the router that is selected for a about 180+ customer PPPOE services.
Ideally this needs to be done in bulk.
I have tried to do it via an Export/Import file as an update but This seems to fail and I was wondering if there is a way to do it in the Web Interface?
If not, could this maybe considered as a new feature?
Hello,
the best way to do this is with Splynx API - Splynx API v2.0 ยท Apiary
Please have a look at a simple PHP script for services update with a new router ID:
<?php
include 'SplynxApi.php'; // API source
$api_url = 'https://mysplynx.com/'; // set your Splynx URL
$api = new SplynxApi($api_url);
$api->setVersion(SplynxApi::API_VERSION_2);
$api->login([
'auth_type' => SplynxApi::AUTH_TYPE_ADMIN,
'login' => 'splynx',
'password' => 'splynx',
]);
//search parameters for services. Get only active services
$data = [
'main_attributes' => [
'status' => 'active'
]
];
$result = $api->api_call_get("admin/customers/customer/0/internet-services".'?'.http_build_query($data));
$internet_services = $api->response;
//print_r($internet_services); //debug output for services
foreach ($internet_services as $services) {
$data_array = array(
'router_id' => 89,
);
//update internet-services for customer
$result = $api->api_call_put("admin/customers/customer/".$service['customer_id'].'/internet-services--'.$service['id'], '', $data_array);
}
}
Alternatively, you can log a support ticket with a mass update request.