Hi @mchoeti
it seems like the endpoint highlighted in yellow does exactly that.
The endpoint highlighted in orange can be filtered to a hostname, too.
You can find code examples in the API documentation you can access from within Checkmk
Or am I completely misunderstanding the question?