Get number of active services via API

Hello!
Im creating some scripts via api to know in a glance the TOTAL number of active services/customers, etc. Is there any end-point wich returns this or something similar?

I only found in the API documentation “list internet service by parameters” Splynx API v2.0 · Apiary
I was wondering if there is any other way to achieve this.

Hello,

You can only get all active services and then count of elements in the array:

$data = [
‘main_attributes’ => [
‘status’ => ‘active’
]];

$api->api_call_get('‘admin/customers/customer/0/internet-services?’.http_build_query($data));
$internet_services = $api->response;

now you can apply something like this PHP: count - Manual to $internet_services array.

Thanks! I suposed this was the correct way, We have implemented this way.

1 Like