Hi! i’ve been doing some testing on the director API by running it in docker containers, the whole icinga suite, and testing multiple endpoints using curl commands. i wanted to add datafields using the director api so i can then add them in templates. i havent found any mention of the endpoint to make datafields or datalists. can anyone shed some light on this?
We use the Basket feature to do this but normally it’s the same URL as doing it manually but using application/json.
i do use application/json but cannot find the right endpoint. i tried director/datafield, director/data/field but every time it gives out no api endpoint
Some actions are also available via cli for example: icingacli director basket restore < icingaweb2-module-director-basket.json -v.
in the icingaweb, i made a snapshot which had a datafield made, when in another session i restored it and deployed there was no datafield from that previous session
If I remember correctly, there are 2 different things you need to add to your basket to restore a datafield.
i added everything and still cant get the datafield. there are no errors anywhere its just not working. do you remember what 2 things?
It depends and could also be three things: Data Fields, Data Field Categories and Data Lists.
Did you get any errors or warnings while building the basked or importing it?
no errors whatsoever, the instance from which i took the snapshots had a service set and after importing that basket into the new instance the service set and templates do show but no datafields. also when like importing a basked or even making one i do see the datalist option where we choose all of them, custom and ignore but no datafield
Did you also import the templates that utilize the datafields?
my bad, i had not assigned the datafield to a template. thank you for your time