Click the three dots to change the icon and the name. I’ve chosen a relevant name and a different color/icon.
Click the Add action button and search for Text.
Place your API key in the text field all by itself (make sure there’s no extra spaces or no letters mistakenly capitalized).
Click the Plus again and search for “Get contents” to find the Get Contents of URL action. Select this.
Type the following URL into your Network action: http://pihole.local/admin/api.php?disable&auth=
where pihole.local
is your local PiHole. The =
should then have the Text placeholder after it. This will insert your api key.
I also opted to add a “show notification” action to confirm the action has completed.
Now you have an action that you can click to execute with one click. You can put this in one of your iOS widgets if you’d like.
A couple things…
When you run it the first time, it might prompt you for permission to access the internet. You should allow this shortcut to do that. It says ‘internet’ but really it’s referring to your local server on your network.
You can also create a re-enable functionality by changing the disable
to enable
in the URL. Everything else would function the same.