Skip to content

Instantly share code, notes, and snippets.

@nodesocket
Created October 25, 2012 23:38
Show Gist options
  • Select an option

  • Save nodesocket/3956163 to your computer and use it in GitHub Desktop.

Select an option

Save nodesocket/3956163 to your computer and use it in GitHub Desktop.
NetNDA Rules Engine API Documentation

Rules Engine API Documentation

Get all rules for a given zone

Method: GET
/{alias}/zones/pull/{zone-id}/rules.{xml|json}

Example Request /netdna/zones/pull/14686/rules.json

Get a single rule by id

Method: GET
/{alias}/zones/pull/{zone-id}/rules.{xml|json}/{rule-id}

Example Request /netdna/zones/pull/14686/rules.json/647463

Create a rule

Method: POST
/{alias}/zones/pull/{zone-id}/rules.{xml|json}

Example Request /netdna/zones/pull/14686/rules.json

Parameters:

match_type - ENUM [exact, literal, regex] - (required)
location - STRING[255] - (required)
case_sensitive - BOOL [0, 1] - (optional, defaults to 0)
active - BOOL [0, 1] - (optional, defaults to 0)
priority - INT [0 - 10000] - (optional, defaults to 0)

Update a rule

Method: PUT
/{alias}/zones/pull/{zone-id}/rules.{xml|json}/{rule-id}

Example Request /netdna/zones/pull/14686/rules.json/647463

Parameters:

match_type - ENUM [exact, literal, regex]
location - STRING[255]
case_sensitive - BOOL [0, 1]
active - BOOL [0, 1]
priority - INT [0 - 10000]

You may pick and choose which values you wish to update.

Delete a rule

Method: DELETE
/{alias}/zones/pull/{zone-id}/rules.{xml|json}/{rule-id}

Example Request /netdna/zones/pull/14686/rules.json/647463

Create a rule feature assigned to a rule

Method: POST
/{alias}/zones/pull/{zone-id}/rules/{rule-id}/features.{xml|json}

Example Request /netdna/zones/pull/14686/rules/647463/features.json

Parameters:

feature_id - INT - (required)
value - STRING[255] - (required)

To get a list of all features and their corresponding id, see the request to get all features.

Update a rule feature assigned to a rule

Method: PUT
 /{alias}/zones/pull/{zone-id}/rules/{rule-id}/features.{xml|json}/{rule-feature-id}

Example Request /netdna/zones/pull/14686/rules/647463/features.json/874864

Parameters:

feature_id - INT
value - STRING[255]

You may pick and choose which values you wish to update. To get a list of all features and their corresponding id, see the request to list all features.

Delete a rule feature assigned to a rule

Method: DELETE
/{alias}/zones/pull/{zone-id}/rules/{rule-id}/features.{xml|json}/{rule-feature-id}

Example Request /netdna/zones/pull/14686/rules/647463/features.json/874864

Get all features

Method: GET
/{alias}/zones/pull/features.{xml|json}

Example Request /netdna/zones/pull/features.json

Reload vhosts (actually activates rules on edge servers)

Method: PUT
/{alias}/zones/pull/{zone-id}/reload.{xml|json}

Example Request /netdna/zones/pull/14686/reload.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment