Toggle navigation

Integration

Version 1.0.2

Register and get your License Keys

30 Day Free Trial and get your Public and Private key. (Please note eDNA is only available by invitation only for the time being).

Deploy eDNA

To integrate with eDNA you will need to select one:

  1. API Integration or Backend Server Connector
  2. Frontend Connector (Javascript Tag)

You can integrate with eDNA through several options. You will need to use our Javascript snippet for the Frontend Connector and one Backend Server Connector.

API Endpoint
https://api.westopbots.com/secure
Example Request
curl --data "secret=value&server=value&site=value" --user name:password https://api.westopbots.com/secure 
Method
POST

You will have to send your email and password used to log into the dashboard, for us to know the right user.

Official libraries for the eDna API are available in multiple languages, we are working hard to create a module for each language, so contact us in case you can’t find the correct one for your project.

Example Response
{
    "error": null,
    "results": {
        "clean": true,
        "black": false,
        "type": null,
        "risk": 0
    },
    "status": 200,
    "mode": "active",
    "security": "on",
    "benchmark": 0.13751816749573,
    "ip": "160.176.66.232",
    "settings": {
        "security": "on",
        "mode": "active",
        "behavior": "nothing",
        "actions": {
			"0":"captcha",
			"0_25":"captcha",
			"0_50":"block",
			"0_75":"block"
        },
        "captcha": null,
        "http": [],
        "pages": [],
        "token": []
    }
}

 

ATTRIBUTES
  • Secret

    The secret key generated when creating an API application

  • Server

    Server and execution environment information

  • Site

    The host domain name e.g. www.example.com

The Server and execution environment information, is an array containing information such as headers, paths, and script locations. The entries in this array are created by the web server. There is no guarantee that every web server will provide any of these; servers may omit some, or provide others not listed here. That said, a large number of these variables are accounted for in the » CGI/1.1 specification, so you should be able to expect those. 
[
	"HTTP_HOST" => "Contents of the Host: header from the current request.",
	"HTTP_USER_AGENT" => "Contents of the User-Agent: header from the current request, if there is one. This is a string denoting the user agent being which is accessing the page. A typical example is: Mozilla/4.5 [en] (X11; U; Linux 2.2.9 i586).",
	"SERVER_NAME" => "The name of the server host under which the current script is executing. If the script is running on a virtual host, this will be the value defined for that virtual host.",
	"SERVER_ADDR" => "The IP address of the server under which the current script is executing.",
	"REMOTE_ADDR" => "The IP address from which the user is viewing the current page.",
	"REQUEST_TIME" => "The timestamp of the start of the request.",
	"HTTP_REFERER" => "The address of the page (if any) which referred the user agent to the current page.",
	"REQUEST_URI" => "The URI which was given in order to access this page; for instance, '/index.html'.",
	"SCRIPT_NAME" => "Contains the current script's path.",
	"QUERY_STRING" => "The query string, if any, via which the page was accessed."
]
NOTE: The Site attribute must be in this format www.example.com any other format will be rejected due to uniqueness of the domain name in our databases.
Best Practice
  • Add timeout on your HTTP request inline with your response requirements.
  • Add a breaker to prevent downtime issues in the unlikely event that one of our servers returns a 500 HTTP error.
  • Request our API over HTTP instead of HTTPS for a higher speed and low response time, in the unlikely event you will be sending us sensitive data for security reasons we recommend HTTPS calls.

The Javascript Tag installation is required by eDNA as it helps to optimize its efficiency in detecting bots and scraper. Combined with our server-side module, it helps the eDNA machine learning algorithms make full use of behavioural patterns available by your visitors.

The eDNA JS tag is loaded asynchronously.

 

Prerequisite

Download the eDNA Javascript Library. Click Here

Integration

Your JS tag will use the public and private key as displayed on your dashboard.

<script src="../build/edna.min.js" type="text/javascript"></script>
<script type="text/javascript">
    // setup the options of this library
    var options = {timeOut: 700, apiUrl: 'https://api.westopbots.com/'};
    var edna_publicKey = 'your_public_key';
    // start the analyser
    edna.start(options);
    // the timeout will break the request if no response is received after chosen time
    // the timeout value is in ms
    // please remember don't forget to add a backslash in the end of API endpoint URI
</script>

Running the Tag

Include the JS library in your website then start the main function by typing:

edna.start( // set your options )

The Backend server connector will work seamlessly with our Frontend Connector in helping our machine learning algorithms identify Bots  and Scrapers on your application.

Please note you will only require one connector from the list below.

Language

  • C#.NET
  • PHP
  • Java
  • Django
  • js
  • Ruby on Rails
  • ColdFusion

Server Module

  • Nginx
  • Apache
  • IIS

CMS

  • Magento
  • WordPress
  • Drupal

 

Prerequisite

Download the eDNA C#.NET by clicking here.

Integration

Step 1.

Open CODE  file and add our module parameters into your Application settings:

<appSettings>
	...
	<add key="_username" value="Your Email" />
	<add key="_password" value="Your Password" />
	<add key="_secretkey" value="API Secret key" />
	<add key="_publickey" value="API Public key" />
	<add key="_uri" value="https://api.westopbots.com/" />
    <add key="_timeout" value="300" />
    <add key="_debug_mode" value="false" />
    <add key="_security_mode" value="monitor" />
    <add key="_autoRedirection" value="false" />
    <add key="_breaker_reset_timeout" value="200" />
    <add key="_breaker_invoc_timeout" value="200" />
    <add key="_breaker_max_failures" value="2" />
    <add key="_proxy_address" value="http://192.168.10.33:3021" />
	...
</appSettings>

Step 2.

Then add our module into your system and server settings:

<system.web>
	...
	<httpModules>
		...
		<add name="Edna" type="Edna.Secure, Edna"/>
		...
	</httpModules>
	...
</system.web>
...
<system.webServer>
	...
	<modules>
		...
		<add name="Edna" type="Edna.Secure, Edna"/>
		...
	</modules>
</system.webServer>

 

Definitions

##### Definition of each parameter
`_username`: **String**, *++Required++* **The Autentication username to be used in the Http Simple Athentication**.
`_password`: **String**, *++Required++* **The Authentication password to be sent with the _username**.
`_secretkey`: **String**, *++Required++* **Your Application secret key**.
`_publickey`: **String**, *++Optional++* **This key is not required for a server side request**.
`_uri`: **String**, Required **The API endpoint**.
`_timeout`: **Int32** Milliseconds, *++Required++* **This parameter indicates the time limit after which an API call has to be timed out. No synchronous API call would block for more than the value specified to this parameter**.
`_debug_mode`: **Boolean**, *++Required++* **Set this parameter as 'true' if you want to enable logging**.
`_autoRedirection`: **Boolean**, *++Required++* **Set this parameter to 'true' if you want our deep malware scanner to be used, this action will redirect the visitor to our own scanner URI**.
`_breaker_max_failures`: **Int32**, *++Required++* **Set this parameter's value if you want the module to re-try sending a request in case of failure, this param is a need for the reset timeout param to work perfectly**.
`_breaker_invoc_timeout`: **Int32**, *++Required++* **The breaker is set there waiting when to start an action, the actual action is the Http request, so this param is set to tell the module to start an Async call after a given timestamp.**.
`_breaker_reset_timeout`: **Int32**, *++Required++* **In case the module failed this value will again try to launch the Http request to our API, this param works only if there is is a value upper than 1**.
`_proxy_address`: **String**, *++Optional++* **If you want to send requests throughout a proxy address, then simply use this param and set it to your desired address, remember if the proxy IP chosen is blacklisted or a reported address we may block requests untill you fix it.**.

 

NOTE: For further information about the breaker, please refer to https://github.com/alexandrnikitin/CircuitBreaker.Net, also all the time values are in milliseconds so please be careful when setting a value, one last thing to remember is that all our requests are async.

We are strongly recommending that you start testing in your development environment before moving to production servers, also note each domain requires a new application.
For more help please don’t hesitate contact our integration developer jeffery@e-dna.co.