Skip to main content

Hi everyone,

Trying to collect monitoring data for some services in servers using REST API but the parent property value returns “null”, however when collecting monitoring data for servers the property value is returned

Can anyone help?

Have a blessed day 

Hello,

You get monitoring data for services by calling first the id of their parent host(server) as seen bellow

$response = Http::withHeaders((
'X-AUTH-TOKEN' => "$token"
])->get("$protocol://$server:$port/centreon/api/$apiVersion/monitoring/hosts/$idHost/services"

 


Reply