Creating host using API - not editable in icingaweb2

Dears,
Hopefully all of you are safe.
I am facing two issues while creating new host in icinga using API.

  1. when I include template “checks_by_agent”, which enables agent based service checks, somehow I need to determine endpoint (probably zone), that is why service objects (via service apply rules) could not be created and host creation fails in total. I skipped that for a while and created host without being “agent services enabled”

  2. probably second one is easy, but I can not understand it, probably logical issue. “host is created in icinga, it is visible it icingaweb2 (via web-UI), but not editable.”. I do understand, that icingaweb2 has its own DB, where objects information is stored and being generated and handled to icinga. Should I import object into icingaweb somehow? or should I create object talking to icingaweb2 (icingacli director host create testhost2)??

BR /A