Ok I figured it out...

curl -k -s -u  'root:password' \
-H 'Accept: application/json' \
-X DELETE 'https://localhost:5665/v1/objects/hosts' \
-d '{ "filter": "match(\"test-host*\",host.name)"}' \
| python -m json.tool


On Mon, Jun 6, 2016 at 12:44 PM, Zachary McGibbon <
[email protected]> wrote:

> Sorry, sent it too quick..
>
> - Poll data from CMDB
> - Push host data into Icinga2 via API with vars.cmdb_import_time of
> current time
> - Delete old hosts based on vars.device_type and vars.cmdb_import_time
> being older
>
> On Mon, Jun 6, 2016 at 12:42 PM, Zachary McGibbon <
> [email protected]> wrote:
>
>> Is is possible to delete hosts through the API without using the host
>> name?
>>
>> My use case:
>>
>> - Poll data from CMDB
>> - Push data into Icinga2 via API
>>
>>
>
_______________________________________________
icinga-users mailing list
[email protected]
https://lists.icinga.org/mailman/listinfo/icinga-users

Reply via email to