API Documentation

  Output from this API can be in the following formats:
  - JSON

URL: https://www.cybersecuritywebtest.com/API/query.php?token=KEY

Your API token is used to authenticate you with our API. Your API can be copied from your account after login.

URL
https://www.cybersecuritywebtest.com/API/query.php?token=KEY

Parameters
token=Your API Key (string)

Query
GET https://www.cybersecuritywebtest.com/API/query.php?token=KEY



View a complete report with all projects.

URL
https://www.cybersecuritywebtest.com/API/query.php?token=KEY

Parameters
listprojects=1 (integer)

Query
POST https://www.cybersecuritywebtest.com/API/query.php?token=KEY

Returned
id of Url
URL
Status of scan

Example:
curl -X POST --data "listprojects=1" https://www.cybersecuritywebtest.com/API/query.php?token=KEY



Deleting existing project

URL
https://www.cybersecuritywebtest.com/API/query.php?token=KEY

Parameters
id=505 (integer)

Query
POST https://www.cybersecuritywebtest.com/API/query.php?token=KEY

Returned
Success Message
Fail Message (if you dont have that parameter)

Example:
curl -X POST --data "delproject=505" https://www.cybersecuritywebtest.com/API/query.php?token=KEY



Adding a website for scan

URL
https://www.cybersecuritywebtest.com/API/query.php?token=KEY

Parameters
url=https://www.cybersecuritywebtest.com (string)
startscan = 1 or timestamp (string). 1=Scan Now;
timestamp = when you want start a scan (string)

Query
POST https://www.cybersecuritywebtest.com/API/query.php?token=KEY

Returned
project was successfully added = Success Message
invalid url = Failed Message
insuficient credits(s) = Failed Message
timestamp missing! = Failed Message

Example:
curl -X POST --data "addproject=1&startscan=1&url=https://www.google.com" https://www.cybersecuritywebtest.com/API/query.php?token=KEY



Listing all found issues of the project

URL
https://www.cybersecuritywebtest.com/API/query.php?token=KEY

Parameters
issuesproject=1 (integer)
id=505 (integer) id parameter will be find after list all projects <see "Listing Projects" section>

Query
POST https://www.cybersecuritywebtest.com/API/query.php?token=KEY

Returned
Success Message will return all issues from project and the ID of project.
invalid url = Failed Message
insuficient credits(s) = Failed Message
timestamp missing! = Failed Message

Example:
curl -X POST --data "issuesproject=1&id=505" https://www.cybersecuritywebtest.com/API/query.php?token=KEY






Example CURL: Simple Script

curl -X POST --data "listprojects=1" https://www.cybersecuritywebtest.com/API/query.php?token=KEY

Example PHP: Simple Script

<?php
  $url = "https://www.cybersecuritywebtest.com/API/query.php?token=KEY";
  $UrlToScan = "https://www.cybersecuritywebtest.com";
  $ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, $url);
  curl_setopt($ch,CURLOPT_USERAGENT,'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.40 Gecko/20180311 Firefox/2.0.0.44');
  curl_setopt($ch, CURLOPT_POST, 1);
  curl_setopt($ch, CURLOPT_POSTFIELDS,"addproject=1&startscan=1571180254&url=".$UrlToScan);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
  curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
  curl_setopt($ch, CURLOPT_AUTOREFERER, true);
  curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
  curl_setopt($ch, CURLOPT_COOKIEJAR,"cookie.txt");
  curl_setopt($ch, CURLOPT_COOKIEFILE, "cookie.txt");
  $contents = @curl_exec($ch);
  curl_close($ch);

  $obj = (json_decode($contents, true));
  print_r($obj["projects"]) ;
?>