THE GAME HAS CHANGED

Introducing Infoblox Universal DDI ManagementTM

Watch the launch to discover the new era of management for critical network services. Watch Now

API & Integration, DevOps,NetOps,SecOps

Reply

schedule a task using WAPI like new record: host

[ Edited ]
Authority
Posts: 14
5082     0
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

Re: schedule a task using WAPI like new record: host

Moderator
Moderator
Posts: 315
5083     0

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

Authority
Posts: 14
5083     0

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 ]
New Member
Posts: 6
5083     0

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

Moderator
Moderator
Posts: 315
5083     0

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"
		}
	}
}'
Showing results for 
Search instead for 
Did you mean: 

Recommended for You