Dashboard GUI to list equivalent API command

Been think about the Cloudflare API which may be foreign to newbie folks and reading documentation might not be enough to grasp the API usage.

So how about an Advanced mode of GUI dashboard which can be turned on which lists an accompanying API command example when you use the dashboard.

Example

  1. if you add a DNS A record via gui, you also get shown the equivalent curl based Cloudflare API command to do the same task. It could be hidden under the current Help expandable text info you have.

  2. You pause Cloudflare protection, you also you also get shown the equivalent curl based Cloudflare API command to do the same task.

  3. You create a page rule, you also get shown the equivalent curl based Cloudflare API command to do the same task.

  4. You add or remove a firewall IP address, you also get shown the equivalent curl based Cloudflare API command to do the same task.

It would allow users to get a grasp of the API commands much faster when there are examples accompanying their GUI dashboard usage. Making it only available in an Advanced mode, would hide it from most users unless they want to use the API. Thus preventing further confusion :slight_smile:

You can kind of glean this by using the browser inspector after making the request actually.

For example, after clicking on the cache everything option in my dashboard, and with the browser inspector open, I see the POST request to /api/v4/zones/ZONEID/purge_cache/.

API documentation can be found on https://api.cloudflare.com/.

1 Like

Thanks for the tip. Though making more viewable would be nice in the form of an API command that is generated :slight_smile:

3 Likes