Icinga2 Api performance_data from Service

Hi,

is it possible to get just the value of the performance_data from an service?

With
curl -k -s -u ‘root:icinga’ -H ‘Accept: application/json’
-H ‘X-HTTP-Method-Override: GET’ -X POST
https://localhost:5665/v1/objects/services
-d ‘{ “filter”: “service.state==2 && match(“ping*”,service.name)” }’
i get it working to view all the values from the service.

But i need to get just the value from last_check_result → performance_data as an result. Is this somehow possible?

You can limit the output by providing the attrs parameter (the example with output from Api - Icinga 2).

But you can limit it only to last_check_result and not to one level deeper, so you still need some JSON handling afterwards.