Skip to main content

Cyware Orchestrate

Cloudflare API

App Vendor: Cloudflare

App Category: Network Security

Connector Version: 2.0.0

API Version: 4.0.0

About App

Cloudflare global cloud platform delivers a broad range of network services with integrated, purpose-built products to enterprises, making them more secure, enhancing the performance of their business-critical applications, and eliminating the cost and complexity of managing individual network hardware.

The Cloudflare app is configured with the Orchestrate application to perform the following actions:

Action Name

Description

List User Agent Rules

This action lists the user agent rules on a zone.

Create User Agent Rule

This action creates a new user agent rule for a zone.

Get User Agent Rule Details

This action retrieves the details of the user agent rule for a zone.

Update User Agent Rule

This action updates a user agent rule.

List Filters

This action lists all the filters currently defined.

Get Filter Details

This action filters the details.

Create Filters

This action creates a new filter.

Update Filter Details

This action updates a filter.

List Firewall Rules

This action lists the firewall rules currently defined.

Get Firewall Rule Details

This action retrieves the properties of an individual firewall rule.

Create Firewall Rule

This action lists all the firewall rules currently defined.

Update Firewall Rule

This action updates an individual existing firewall rule.

List Zones

This action lists all the firewall rules currently defined.

Configuration Parameters

The following configuration parameters are required for the Cloudflare app to communicate with the Cloudflare enterprise application. The parameters can be configured by creating instances in the app.

Parameter

Description

Field Type

Required/Optional

Comments

API Token

Enter the API token to access Cloudflare and perform all the actions.

Example:

"c2547ebxxx9dac9xxxxxx5cf483cc5cfxxa41"

Password

Required

Action: List User Agent Rules

This action retrieves the list of user agent rules from the Cloudflare application.

Action Input Parameters

Parameter

Description

Field Type

Required/Optional

Comments

Zone ID

Enter the zone identifier.

Example:

"023e105f4ecef8ad9ca31a8372d0c353"

Text

Required

Description

Enter a single string to search for in the description.

Example:

"abusive"

Text

Optional

User agent

Enter a single user agent string to search for.

Example:

"safari"

Text

Optional

Page number

Enter the page number of paginated results.

Example:

1

Integer

Optional

Default value:1

Page size

Enter the maximum number of results to display per page. This can only be provided as 1 or in multiples of 5 such as 5, 10, 15 or 20.

Example:

5

Integer

Optional

Default value:20

Example Request

[
    {
        "zone_id": "372exxxxx025e0ba6aaaxxxxxx9e0b59",
        “page_size“: “5“,
        “description“: “abusive"
    }
]
Action: Create User Agent Rule

This action creates a new user agent rule for a zone. See the record object definitions for required attributes for each record type.

Action Input Parameters

Parameter

Description

Field Type

Required/Optional

Comments

Zone ID

Enter the zone identifier to create a user agent rule.

Example:

"023e105f4ecef8ad9ca31a8372d0c353"

Text

Required

Mode

Enter the type of action to perform.

Example:

"block"

Text

Required

Allowed values:

  • block

  • challenge

  • js_challenge

Configuration target

Specify the configuration target for this rule.

Text

Required

Allowed values:

  • ua - for user agent rule

Configuration value

Enter the exact user agent string to match with this rule.

Example:

"mozilla/5.0 (macintosh; intel mac os x 10_12_5) applewebkit/603.2.4 (khtml, like gecko) version/10.1.1 safari/603.2.4"

Text

Required

UA rule ID

Enter the UA rule identifier.

Example:

"372e67954025e0ba6aaa6d586b9e0b59"

Text

Optional

Pause UA Rule

Choose whether this UA rule is currently paused.

Boolean

Optional

Allowed values:

  • True

  • False

Rule Description

Enter useful information about this rule to help identify the purpose of it.

Text

Optional

Example Request

[
    {
        "zone_id": "372exxxxx025e0ba6aaaxxxxxx9e0b59",
        "mode": "block",
        "configuration_target": "ua",
        "configuration_value":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/603.2.4 (KHTML, like Gecko) Version/10.1.1 Safari/603.2.4",
       
    }
]
Action: Get User Agent Rule Details

This action retrieves details of one user agent rule for a zone.

Action Input Parameters

Parameter

Description

Field Type

Required/Optional

Comments

Zone ID

Enter the zone identifier to retrieve the user agent rule details.

Example:

"023e105f4xxxxx9ca31a8372d0c353"

Text

Required

Rule ID

Enter the rule ID.

Example:

"372e67954025xxxxxaaa6d586b9e0b59"

Text

Required

Example Request

[
    {
        "zone_id": "023e105f4xxxxx9ca31a8372d0c353",
        “rule_id”: "372e67954025xxxxxaaa6d586b9e0b59"
    }
]
Action: Update User Agent Rule

This action updates one user agent rule.

Action Input Parameters

Parameter

Description

Field Type

Required/Optional

Comments

Zone ID

Enter the zone identifier to update the user agent rule.

Example:

"023e105f4xxxxxa31a8372d0c353"

Text

Required

Rule ID

Enter the rule ID to update.

Example:

"372e67954025xxxxxd586b9e0b59"

Text

Required

Mode

Enter the type of action to perform.

Example:

"block"

Text

Required

Allowed values:

  • block

  • challenge

  • js_challenge

Configuration Target

Specify the configuration target for this rule. For user agent rules, this value is UA.

Example:

"ua"

Text

Required

Configuration Value

Specify the exact user agent string to match with this rule.

Example:

"mozilla/5.0 (macintosh; intel mac os x 10_12_5) applewebkit/603.2.4 (khtml, like gecko) version/10.1.1 safari/603.2.4"

Text

Required

Pause UA Rule

Choose whether this UA rule is currently paused.

Boolean

Optional

Allowed values:

  • True

  • False

Rule Description

Enter useful information about this rule to help identify the purpose of it.

Text

Optional

Example Request

[
    {
        "zone_id": "372exxxxx025e0ba6aaaxxxxxx9e0b59",
        "rule_id": "869exxxxxxe0ba6aaa6d3xxxxe0b43",
        "mode": "block",
        "configuration_target": "ua",
        "configuration_value": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/603.2.4 (KHTML, like Gecko) Version/10.1.1 Safari/603.2.4"
    }
]
Action: List Filters

This action lists all the filters currently defined.

Action Input Parameters

Parameter

Description

Field Type

Required/Optional

Comments

Zone ID

Enter the zone identifier to retrieve the list of filters.

Example:

"372exxxxx025e0ba6aaaxxxxxx9e0b59"

Text

Required

Filter ID

Enter the filter identifier.

Example:

"0222exxx25e0ba6aaa6dxxxe0b61"

Text

Optional

Page number

Enter the page number of paginated results.

Example:

1

Integer

Optional

Default value:

1

Page size

Enter the number of filters to return per page.

Integer

Optional

Default value:

20

Description

Enter a case-insensitive string to find in description.

Example:

"browsers"

Text

Optional

Expression

Enter a case-insensitive string to find in expression.

Example:

"php"

Text

Optional

Filter is paused

Choose whether this filter is currently paused.

Boolean

Optional

Allowed values:

  • True

  • False

Example Request

[
    {
        "zone_id": "372exxxxx025e0ba6aaaxxxxxx9e0b59",
        “filter_id”: "0222exxx25e0ba6aaa6dxxxe0b61"
    }
]
Action: Get Filter Details

This action retrieves the filter details currently defined.

Action Input Parameters

Parameter

Description

Field Type

Required/Optional

Comments

Zone ID

Enter the zone identifier to retrieve the filter details.

Example:

"023e105f4xxxxxxxxx2d0c353"

Text

Required

Filter ID

Enter the filter identifier to retrieve the filter details.

Example:

"372e67954025xxxxxx86b9e0b61"

Text

Required

Example Request

[
    {
        "zone_id": "023e105f4xxxxxxxxx2d0c353",
        “filter_id”: "372e67954025xxxxxx86b9e0b61"
    }
]
Action: Create Filters

This action creates a new filter.

Action Input Parameters

Parameter

Description

Field Type

Required/Optional

Comments

Zone ID

Enter the zone identifier to create filters.

Example:

"023e10xxx372xxxxxxdxxx0c353"

Text

Required

Expression

Enter the filter expression to be used.

Example:

"http.request.uri.path ~ \".*wp-login.php\"

"http.request.uri.path ~ \".*xmlrpc.php\")"

"ip.addr ne 172.16.22.155"

Text

Required

Ref

Enter the short reference tag to quickly select related rules.

Example:

"fil-100"

Text

Optional

Description

Enter a case-insensitive string to find in description.

Example:

"browsers"

Text

Optional

Pause filter

Set this value to true if you want to pause it.

Boolean

Optional

Allowed values:

  • True

  • False

Example Request

[
    {
        "zone_id": "023e10xxx372xxxxxxdxxx0c353",
        "expression": "ip.addr ne 172.16.22.155"
    }
]
Action: Update Filter Details

This action updates a filter.

Action Input Parameters

Parameter

Description

Field Type

Required/Optional

Comments

Zone ID

Enter the zone identifier to update the filter details.

Example:

"023e105fxxxxx1a8372d0c353"

Text

Required

Filter ID

Enter the filter identifier.

Example:

"372e679540xxxxx6aaa6d586b9e0b61"

Text

Required

Expression

Enter the filter expression to be used.

Example:

  • "http.request.uri.path ~ \".*wp-login.php\"

  • "http.request.uri.path ~ \".*xmlrpc.php\"

  • "ip.addr ne 172.16.22.155"

Text

Optional

Ref

Enter a short reference tag to quickly select related rules.

Example:

"fil-100"

Text

Optional

Description

Enter a case-insensitive string to find in the description.

Example:

"browsers"

Text

Optional

Pause filter

Set this value to true if you want to pause it, else set it to false.

Boolean

Optional

Allowed values:

  • True

  • False

Example Request

[
    {
        "zone_id": "023e105fxxxxx1a8372d0c353",
        "filter_id": "372e679540xxxxx6aaa6d586b9e0b61",
       
    }
]
Action: List Firewall Rules

This action lists all the firewall rules currently defined.

Action Input Parameters

Parameter

Description

Field Type

Required/Optional

Comments

Zone ID

Enter the zone identifier to list the firewall rules.

Example:

"023e105f4xxxxxxxca31a8372d0c353"

Text

Required

Firewall ID

Enter the firewall rule identifier.

Example:

"372e67954025xxxxxxa6d586b9e0b61"

Text

Optional

Page Number

Enter the page number of paginated results.

Integer

Optional

Default value:1

Page Size

Enter the number of filter based firewall rules per page.

Integer

Optional

Default value:20

Description

Enter a case-insensitive string to find in description.

Example:

"browsers"

Text

Optional

Action

Enter the exact match on a rule action.

Example:

"block"

Text

Optional

Firewall is Paused

Choose whether this firewall rule is currently paused.

Boolean

Optional

Allowed values:

  • True

  • False

Example Request

[
    {
        "zone_id": "023e105f4xxxxxxxca31a8372d0c353",
        "firewall_id": "372e67954025xxxxxxa6d586b9e0b61"
    }
]
Action: Get Firewall Rule Details

This action retrieves the properties of an individual firewall rule.

Action Input Parameters

Parameter

Description

Field Type

Required/Optional

Comments

Zone ID

Enter the zone identifier to retrieve the firewall rule details.

Example:

"023e105f4xxxxxxx9ca31a8372d0c353"

Text

Required

Firewall rule ID

Enter the firewall rule identifier.

Example:

"372e6795402xxxxx6d586b9e0b61"

Text

Required

Example Request

[
    {
        "zone_id": "023e105f4xxxxxxx9ca31a8372d0c353",
        “firewall_rule_id”: "372e6795402xxxxx6d586b9e0b61"
    }
]
Action: Create Firewall Rule

This action lists all the firewall rules currently defined.

Action Input Parameters

Parameter

Description

Field Type

Required/Optional

Comments

Zone ID

Enter the zone identifier to create a firewall rule.

Example:

"023e105f4xxxxx9ca31a8372d0c353"

Text

Required

Action

Enter the action to apply to a matched request. Note that action "log" is only available for enterprise customers.

Example:

"block"

Text

Required

Allowed values:

  • block

  • challenge

  • js_challenge

  • allow

  • log

  • bypass

Filter ID

Enter the filter identifier.

Example:

"372e67954025xxxxxa6d586b9e0b61"

Text

Required

Filter expression

Enter the filter expression to be used.

Example:

  • http.request.uri.path ~ \".*wp-login.php\

  • http.request.uri.path ~ \".*xmlrpc.php\

  • ip.addr ne 172.16.22.155

Text

Required

Filter Pause

Choose whether this filter is currently paused.

Boolean

Required

Allowed values:

  • True

  • False

Filter Description

Enter a note that you can use to describe the purpose of the filter.

Text

Required

Filter Ref

Enter a short reference tag to quickly select related rules.

Example:

"fil-100"

Text

Required

Firewall Description

Enter a description of the rule to help identify it.

Text

Optional

Priority

Enter the priority of the rule to allow control of processing order. A lower number indicates high priority. If not provided, any rules with a priority will be sequenced before those without.

Integer

Optional

Minimum value:0Maximum value:2147483647

Extra params

Enter any additional parameters.

Key Value

Optional

Allowed keys:

  • products(list)

  • id(str)

  • paused(boolean)

  • ref(str)

Example Request

[
    {
        "zone_id": "372exxxxx025e0ba6aaaxxxxxx9e0b59",
        "action": "block",
        "filter_id": "869exxxxxxe0ba6aaa6d3xxxxe0b43",
        "filter_expression": "ip.addr ne 172.16.22.155",
        “filter_pause”: False,
        "filter_description": "Sample description",
        "filter_ref": "FIL-100" 
    }
]
Action: Update Firewall Rule

This action updates an individual existing firewall rule. See the record object definitions for required attributes for each record type.

Action Input Parameters

Parameter

Description

Field Type

Required/Optional

Comments

Zone ID

Enter the zone identifier.

Example:

"023e105fxxxxxxxxca31a8372d0c353"

Text

Required

Firewall Rule ID

Enter the firewall rule identifier.

Example:

"372e67954025xxxxxxx6d586b9e0b61"

Text

Required

Action

Enter the action to apply to a matched request. Note that the action "log" is only available for enterprise customers.

Example:

"block"

Text

Required

Allowed values:

  • block

  • challenge

  • js_challenge

  • allow

  • log

  • bypass

Filter ID

Enter the filter identifier.

Example:

"372e67954025xxxxxd586b9e0b61"

Text

Required

Filter Expression

Enter the filter expression to be used.

Example:

  • http.request.uri.path ~ \".*wp-login.php\

  • http.request.uri.path ~ \".*xmlrpc.php\

  • ip.addr ne 172.16.22.155

Text

Required

Filter Pause

Choose whether this filter is currently paused.

Boolean

Required

Filter Description

Enter a note that you can use to describe the purpose of the filter.

Text

Required

Filter Ref

Enter a short reference tag to quickly select related rules.

Example:

"fil-100"

Text

Required

Extra params

Enter any extra parameters if required.

Key Value

Optional

Allowed keys:

  • products(list)

  • id(str)

  • paused(boolean)

  • ref(str)

  • priority(int)

  • description(str)

Example Request

[
    {
        "zone_id": "023e105fxxxxxxxxca31a8372d0c353",
        "firewall_rule_id": "372e67954025xxxxxxx6d586b9e0b61",
        "action": "block",
        "filter_id": "372e679xxxxxa6d586b9e0b61",
        "filter_expression": "ip.addr ne 172.16.22.155",
        "filter_pause": True
    }
]
Action: List Zones

This action lists all the firewall rules currently defined.

Action Input Parameters

Parameter

Description

Field Type

Required/Optional

Comments

Match

Enter the value to match all search requirements or at least one.

Example:

"all"

Text

Optional

Default value:

  • all

Allowed values:

  • all

  • any

Name

Enter a domain name.

Example:

"sampledomain.com"

Text

Optional

Page number

Enter the page number of the paginated results.

Example:

1

Integer

Optional

Default value:1

Page size

Enter the number of filter based firewall rules per page.

Example:

10

Integer

Optional

Default value:20

Status

Enter the status of the zone.

Example:

"active"

Text

Optional

Allowed values:

  • active

  • pending

  • initializing

  • moved

  • deleted

  • deactivated

  • read only

Account ID

Enter the account identifier tag.

Example:

"01a7362d577a6c3019a474fd6f485823"

Text

Optional

Extra params

Enter any extra parameters required to list the zones.

Key Value

Optional

Allowed keys:

  • direction(str)- asc, desc

  • order(str)- name, status, account.id, account.name, account.name(str)

Example Request

[
    {
        "match": "all",
        “name”: "google.com",
        "page_number": 1
    }
]