Javascript snipplet to fetch data from cmk api

Hi Community,

i am at the absolut beginning with javascript. Is there anybody in this forum, who use javascript to fetch data from cmk api and would like to share a simple snipplet how to do this?

Cheers
Dennis