Posts Tagged
‘Cloudflare API’

Bulk Add and Edit Cloudflare Page Rules with Cloudflare API Console [Guide]

 

*** This software is included in Cloudflare API Console without extra charge ***

 

 


Video Demonstration

When you try to add a duplicate page rule for the same target URL and domain, Cloudflare will ignore those API requests as shown in the demonstration.

 


1) Fill in the username and APIkey

 

2) Then, click the List All Domains Button.

 

3) Now, You have a chance to remove some of the domains from the lookup list that you are not intend to change.

It will be very useful when you have 1000+ domain and you just want to modify 20 of them. You may only want to load 20 of them into cache instead of loading all of them into cache.

 

4) Click Get All Page Rules to get all records listed in the lookup list.

 

5) After that, you can start to use below section to Add New PageRules or delete Pagerules.

 

Above method is not a recommended method, we have a better way to do it and we will explain it soon.

 

 

In the web interface, every time you selected certain rule, another rule may be grey out to avoid conflict,

 

Since our software don’t check for page rules conflicts. It’s recommended to use the web interface to create your first set of rule , in order to ensure that no conflict rules are selected together.

 


In the following example, we have 500+ domains and we want add rules for them to make the let’s encrypt verification go through.

 

Cloudflare API Console - PageRule for Let's encrypt

 

We already added the rule via the web interface and now we’re going to apply the same set of rules to another 500+ domains.

 

Click the Copy ‘This set of Page rule’

Cloudflare API Console - Bulk Add Page Rules By Copy

 

The page rules is now copied into left panel’s Add Page Rules section,

Then, fill in the Target URL,

Tips: Please make sure that  using @ instead of full domain names.

Finally, click apply change

Cloudflare API Console - Bulk Add Page Rules By Copy 2

 

Now, 500+ page rules has been automatically generated in cache. The `@` is automatically replaced with full domains.

If everything looks good for you, click Sync back to Cloudflare to start to send the API requests and apply the change.

 

If you found that you mess up somethings and don’t want to submit the changes, you can click “Get All Page Rules” to startover.

Cloudflare API Console - Bulk Add Page Rules - Apply Change

 

 

 

With this software, you can managed 1000+ domains Page Rules using Cloudflare with ease.

 


 

Demonstration

 

Double click to view Cloudflare’s page rule details

Cloudflare API Console - PageRule Details View

 

The setting value can be change in the popup. Please make sure you have press the `End Edit` button after you made a change.

Manual change is not what we recommended for new user, because any typo mistake will lead to update failure and those API update request will be ignored.

We recommended new user to build the page rule with the web interface and then clone the same set of rules on other domains as needed.

 

The column width can be adjust, in order to view the page rules in single line.

 

 

 

 

Advanced Filter which helps you to find a record.

Cloudflare API Console - Advanced Filter for pagerule

 

 

Grouping View

Cloudflare API Console - Grouping Page rules

 

Cloudflare API Console - Grouping Page rules2

Cloudflare API Console - Grouping Page rule View

 

Cloudflare Page rule – URL Redirect               (Also supports Using Wildcards in Page Rules )

Cloudflare API Console - Redirect Pagerule                Cloudflare Page Rule - Url Forwarding wildcard matches

 

Remove page rule from the table

 

 

 

 

 

 

 

 

 

 

How To Use Cloudflare API Console [Guide]

 

1) Fill in the username and APIkey

 

2) Then, click the List All Domains Button.

 

3) Now, You have a chance to remove some of the domains from the lookup list that you are not intend to change.

It will be very useful when you have 1000+ domain and you just want to modify 20 of them. You may only want to load 20 of them into cache instead of loading all of them into cache.

 

4) Click Get All DNS Records to get all records listed in the lookup list.

 

5) After that, you can start to use below section to Add New DNS Records or delete DNS records.

Tips: Use @ instead of the full domain names when you are doing bulk add for different domains.

 

 

6) Advanced Mode

  1. Click Add New Or Open Template
  2. Fill in the “Add DNS Records into Top Panel” Section and click Add new records (Tips: Use @ instead of Domain Names)
  3. The Records are now showed up on top right panel.
  4. Now, you can choose add the DNS Records to All Domains or Select Domains from the bottom left.
  5. Then you can preview the pending add records via bottom right panel, if everything all right, click the green button to sync it back to main panel.

You can choose to replace @ into domain for DNS records. (Since Version 1.6.7)

Cloudflare API Console - Advanced mode bulk add

7) After you made all the changes, click the “Green Sync Back ” button to send the API requests to Cloudflare to make the changes.

If you found that you mess up somethings and don’t want to submit the changes, you can click “Get All DNS Records” to startover.

 

 

With this software, you can managed 1000+ domains DNS Records using Cloudflare with ease.

 


Common Usage

Change an existed A records to a new IP address

 

  • Filter Out the IP address you want to change using filter builder [You can open it by clicking the edit filter button]

  • Highlight and Bulk Edit the IP address you want to change

  • Review the pending change (If your screen resolution is limited, you may want to slide the middle panel to minimize)

Cloudflare API Console - Review the pending change

 

 

Bulk Delete A records for specific domains

For Bulk deletion, You can choose to leave the Name field blank.

Cloudflare API Console - Bulk Deletion A Records

 


 

Video Demonstration