You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently I have some scirpting that uses the API to remove and then re-add my rewrites.
At the current time, I am have to do each Json object per api call, so if I am removing 200 domain/answers it will take 200 api calls and then 200 api calls to add them back. I was hoping to combine into 1 more efficient API call, but I can't figure out how to do it.
Here is an example:
6 api calls to delete 6 objects
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Currently I have some scirpting that uses the API to remove and then re-add my rewrites.
At the current time, I am have to do each Json object per api call, so if I am removing 200 domain/answers it will take 200 api calls and then 200 api calls to add them back. I was hoping to combine into 1 more efficient API call, but I can't figure out how to do it.
Here is an example:
6 api calls to delete 6 objects
curl -s -X 'POST' http:///control/rewrite/delete -H 'accept: /' -H 'Authorization: Basic a2FkYW1pazprYTA1MTg5Mg==' -H 'Content-Type: application/json' -d '{"domain": "ring_alarm","answer": "192.168.20.12"}'
curl -s -X 'POST' http:///control/rewrite/delete -H 'accept: /' -H 'Authorization: Basic a2FkYW1pazprYTA1MTg5Mg==' -H 'Content-Type: application/json' -d '{"domain": "apple_iphone_6_avery","answer": "192.168.30.102"}'
curl -s -X 'POST' http:///control/rewrite/delete -H 'accept: /' -H 'Authorization: Basic a2FkYW1pazprYTA1MTg5Mg==' -H 'Content-Type: application/json' -d '{"domain": "apple_mac_mini","answer": "192.168.30.106"}'
curl -s -X 'POST' http:///control/rewrite/delete -H 'accept: /' -H 'Authorization: Basic a2FkYW1pazprYTA1MTg5Mg==' -H 'Content-Type: application/json' -d '{"domain": "amazon_kindle_reader_avery","answer": "192.168.30.107"}'
curl -s -X 'POST' http:///control/rewrite/delete -H 'accept: /' -H 'Authorization: Basic a2FkYW1pazprYTA1MTg5Mg==' -H 'Content-Type: application/json' -d '{"domain": "aquarium_light_left","answer": "192.168.60.100"}'
curl -s -X 'POST' http:///control/rewrite/delete -H 'accept: /' -H 'Authorization: Basic a2FkYW1pazprYTA1MTg5Mg==' -H 'Content-Type: application/json' -d '{"domain": "aquarium_powerhead_right","answer": "192.168.60.103"}'
is there a way to turn this into 1 call, and if so what is the syntax because I can't figure it out.
t
Beta Was this translation helpful? Give feedback.
All reactions