- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
schedule a task using WAPI like new record: host
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2019 02:21 AM - edited 06-11-2019 03:01 AM
curl -k1 -u admin:infoblox -X POST 'https://192.168.1.2/wapi/v2.8/record:host?_schedinfo.scheduled_time=1560175175' -H "Content-Type: application/json" -d '{ "name": "host001.example.org", "comment": "This is a comment for Host 001", "ipv4addrs": [{"configure_for_dhcp": false,"ipv4addr": "10.20.30.209"}], "view": "Internal",
"extattrs":{"2:Geraeteart":{"value":"PC"}} }'
Thanks to Mrichard for the Skript. I have tried executing the code, it was successful. But I would like to ask :
1.Why the approve and reject option are disabled
2.When I go to Administration->workflows-> view ,Why I dont see the edit options and values entered for the EA ?
How we could enable the edit option?
thanks
Solved! Go to Solution.
Re: schedule a task using WAPI like new record: host
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2019 05:47 AM
Approvals and rejections are part of a workflow, not a scheduled task. A scheduled task could be created from a workflow but they are different things.
Re: schedule a task using WAPI like new record: host
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2019 07:05 AM
Thanks for the reply.
Hence the scheduled task are not editable ie. their host names and IP addresses are not changable?
only option would be "execute now"?(I mean we havent configured approval workflow groups as of now)
Re: schedule a task using WAPI like new record: host
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2022 07:55 AM - edited 11-07-2022 09:03 AM
Hello, following the same post, I have a workflow in place which means I need to approve the requests. When I try to create a network for instance I cannot create it because the ticket number is a mandatory field but I cannot find a way to pass this my script:
curl -k1 -u admin:infoblox -X POST 'https://----------/wapi/v2.10/network' -H "Content-Type: application/json" -d \ '{ "network": "172.16.105.0/24", "network_view": "default", "comment": "Honolulu Datacenter", "extattrs": { "EDM": { "value": "1010" }, "TAM": { "value": "2020" } } }'
"code": "Client.Ibap.Data.Conflict",
"text": "Approval is required for this operation. You must enter a comment and/or a ticket number."
Re: schedule a task using WAPI like new record: host
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2022 02:03 PM
The ticket number needs to be placed in the arguments section of the URL.
curl -k1 -u admin:infoblox -X POST 'https://----------/wapi/v2.10/network?_approvalinfo.ticket_number=202211060123' -H "Content-Type: application/json" -d \ '{ "network": "172.16.105.0/24", "network_view": "default", "comment": "Honolulu Datacenter", "extattrs": { "EDM": { "value": "1010" }, "TAM": { "value": "2020" } } }'