So I deleted the directories and tried to execute icinga2 api setup
again and i got an error that some stirng is too long. I found the following two threads for that new information:
When using api setup: critical/SSL: Error with x509 NAME: string too long
Hostname change not recognized
With this and a clean installation of icinga2 after changing the hostname to a shorter one solved my problem.
Thank you for helping me through this
much appreciated