Self service API key for linux agents

Hello all!

I am testing a script that registers clients to icinga director but I haven’t yet managed
to implement the self service API key in the POST request. I read this:
https://icinga.com/docs/icinga-director/latest/doc/70-REST-API/#self-service-api

I am POSTing to this url

https://<icingaweb>/icingaweb2/self-service/register-host?name=<FQDN>&key=<Host Template API key>

But I get a 404 Not Found

Should this URL be something else? Probably yes, can anyone give me an example of such URL?

Cheers,
Mike

Ah I found it, the URL should be

https://<icingaweb>/icingaweb2/DIRECTOR/self-service/register-host?name=<FQDN>&key=<Host Template API key>

Since the director part is in every example in the documentation I would say that it should be in this
example too. So something like this:

director-curl POST \
'director/self-service/register-host?name=<FQDN>&key=<Host Template API key>' \
'{"address": "<IP>","display_name": "<dispaly name>"}'

Cheers,
Mike

1 Like