Skip to content

Latest commit

 

History

History
466 lines (334 loc) · 19 KB

TextInputApi.md

File metadata and controls

466 lines (334 loc) · 19 KB

Swagger\Client\TextInputApi

All URIs are relative to https://api.cloudmersive.com

Method HTTP request Description
textInputCheckHtmlSsrf POST /validate/text-input/html/check/ssrf Protect html input from Server-side Request Forgery (SSRF) attacks
textInputCheckSqlInjection POST /validate/text-input/check/sql-injection Check text input for SQL Injection (SQLI) attacks
textInputCheckSqlInjectionBatch POST /validate/text-input/check/sql-injection/batch Check and protect multiple text inputs for SQL Injection (SQLI) attacks in batch
textInputCheckXss POST /validate/text-input/check/xss Check text input for Cross-Site-Scripting (XSS) attacks
textInputCheckXssBatch POST /validate/text-input/check-and-protect/xss/batch Check and protect multiple text inputs for Cross-Site-Scripting (XSS) attacks in batch
textInputCheckXxe POST /validate/text-input/check/xxe Protect text input from XML External Entity (XXE) attacks
textInputCheckXxeBatch POST /validate/text-input/check/xxe/batch Protect text input from XML External Entity (XXE) attacks
textInputProtectXss POST /validate/text-input/protect/xss Protect text input from Cross-Site-Scripting (XSS) attacks through normalization

textInputCheckHtmlSsrf

\Swagger\Client\Model\HtmlSsrfDetectionResult textInputCheckHtmlSsrf($value, $allow_cid_scheme)

Protect html input from Server-side Request Forgery (SSRF) attacks

Detects SSRF (Server-side request forgery) attacks and unsafe URL attacks from HTML text input, where attackers can attempt to access unsafe local or network paths in the server environment by injecting them into HTML.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: Apikey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Apikey', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Apikey', 'Bearer');

$apiInstance = new Swagger\Client\Api\TextInputApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$value = "value_example"; // string | User-facing HTML input.
$allow_cid_scheme = true; // bool | Optional: Set to true to allow cid: scheme URLs for email message attachments.  Default is false.

try {
    $result = $apiInstance->textInputCheckHtmlSsrf($value, $allow_cid_scheme);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TextInputApi->textInputCheckHtmlSsrf: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
value string User-facing HTML input.
allow_cid_scheme bool Optional: Set to true to allow cid: scheme URLs for email message attachments. Default is false. [optional]

Return type

\Swagger\Client\Model\HtmlSsrfDetectionResult

Authorization

Apikey

HTTP request headers

  • Content-Type: application/json, text/json
  • Accept: application/json, text/json, application/xml, text/xml

[Back to top] [Back to API list] [Back to Model list] [Back to README]

textInputCheckSqlInjection

\Swagger\Client\Model\SqlInjectionDetectionResult textInputCheckSqlInjection($value, $detection_level)

Check text input for SQL Injection (SQLI) attacks

Detects SQL Injection (SQLI) attacks from text input.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: Apikey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Apikey', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Apikey', 'Bearer');

$apiInstance = new Swagger\Client\Api\TextInputApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$value = "value_example"; // string | User-facing text input.
$detection_level = "detection_level_example"; // string | Set to Normal to target a high-security SQL Injection detection level with a very low false positive rate; select High to target a very-high security SQL Injection detection level with higher false positives.  Default is Normal (recommended).

try {
    $result = $apiInstance->textInputCheckSqlInjection($value, $detection_level);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TextInputApi->textInputCheckSqlInjection: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
value string User-facing text input.
detection_level string Set to Normal to target a high-security SQL Injection detection level with a very low false positive rate; select High to target a very-high security SQL Injection detection level with higher false positives. Default is Normal (recommended). [optional]

Return type

\Swagger\Client\Model\SqlInjectionDetectionResult

Authorization

Apikey

HTTP request headers

  • Content-Type: application/json, text/json
  • Accept: application/json, text/json, application/xml, text/xml

[Back to top] [Back to API list] [Back to Model list] [Back to README]

textInputCheckSqlInjectionBatch

\Swagger\Client\Model\SqlInjectionCheckBatchResponse textInputCheckSqlInjectionBatch($value)

Check and protect multiple text inputs for SQL Injection (SQLI) attacks in batch

Detects SQL Injection (SQLI) attacks from multiple text inputs. Output preverses order of input items.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: Apikey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Apikey', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Apikey', 'Bearer');

$apiInstance = new Swagger\Client\Api\TextInputApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$value = new \Swagger\Client\Model\SqlInjectionCheckBatchRequest(); // \Swagger\Client\Model\SqlInjectionCheckBatchRequest | User-facing text input.

try {
    $result = $apiInstance->textInputCheckSqlInjectionBatch($value);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TextInputApi->textInputCheckSqlInjectionBatch: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
value \Swagger\Client\Model\SqlInjectionCheckBatchRequest User-facing text input.

Return type

\Swagger\Client\Model\SqlInjectionCheckBatchResponse

Authorization

Apikey

HTTP request headers

  • Content-Type: application/json, text/json
  • Accept: application/json, text/json, application/xml, text/xml

[Back to top] [Back to API list] [Back to Model list] [Back to README]

textInputCheckXss

\Swagger\Client\Model\XssProtectionResult textInputCheckXss($value)

Check text input for Cross-Site-Scripting (XSS) attacks

Detects XSS (Cross-Site-Scripting) attacks from text input.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: Apikey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Apikey', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Apikey', 'Bearer');

$apiInstance = new Swagger\Client\Api\TextInputApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$value = "value_example"; // string | User-facing text input.

try {
    $result = $apiInstance->textInputCheckXss($value);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TextInputApi->textInputCheckXss: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
value string User-facing text input.

Return type

\Swagger\Client\Model\XssProtectionResult

Authorization

Apikey

HTTP request headers

  • Content-Type: application/json, text/json
  • Accept: application/json, text/json, application/xml, text/xml

[Back to top] [Back to API list] [Back to Model list] [Back to README]

textInputCheckXssBatch

\Swagger\Client\Model\XssProtectionBatchResponse textInputCheckXssBatch($value)

Check and protect multiple text inputs for Cross-Site-Scripting (XSS) attacks in batch

Detects XSS (Cross-Site-Scripting) attacks from multiple text inputs. Output preverses order of input items.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: Apikey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Apikey', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Apikey', 'Bearer');

$apiInstance = new Swagger\Client\Api\TextInputApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$value = new \Swagger\Client\Model\XssProtectionBatchRequest(); // \Swagger\Client\Model\XssProtectionBatchRequest | User-facing text input.

try {
    $result = $apiInstance->textInputCheckXssBatch($value);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TextInputApi->textInputCheckXssBatch: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
value \Swagger\Client\Model\XssProtectionBatchRequest User-facing text input.

Return type

\Swagger\Client\Model\XssProtectionBatchResponse

Authorization

Apikey

HTTP request headers

  • Content-Type: application/json, text/json
  • Accept: application/json, text/json, application/xml, text/xml

[Back to top] [Back to API list] [Back to Model list] [Back to README]

textInputCheckXxe

\Swagger\Client\Model\XxeDetectionResult textInputCheckXxe($value, $allow_internet_urls, $known_safe_urls, $known_unsafe_urls)

Protect text input from XML External Entity (XXE) attacks

Detects XXE (XML External Entity) attacks from text input.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: Apikey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Apikey', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Apikey', 'Bearer');

$apiInstance = new Swagger\Client\Api\TextInputApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$value = "value_example"; // string | User-facing text input.
$allow_internet_urls = true; // bool | Optional: Set to true to allow Internet-based dependency URLs for DTDs and other XML External Entitites, set to false to block.  Default is false.
$known_safe_urls = "known_safe_urls_example"; // string | Optional: Comma separated list of fully-qualified URLs that will automatically be considered safe.
$known_unsafe_urls = "known_unsafe_urls_example"; // string | Optional: Comma separated list of fully-qualified URLs that will automatically be considered unsafe.

try {
    $result = $apiInstance->textInputCheckXxe($value, $allow_internet_urls, $known_safe_urls, $known_unsafe_urls);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TextInputApi->textInputCheckXxe: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
value string User-facing text input.
allow_internet_urls bool Optional: Set to true to allow Internet-based dependency URLs for DTDs and other XML External Entitites, set to false to block. Default is false. [optional]
known_safe_urls string Optional: Comma separated list of fully-qualified URLs that will automatically be considered safe. [optional]
known_unsafe_urls string Optional: Comma separated list of fully-qualified URLs that will automatically be considered unsafe. [optional]

Return type

\Swagger\Client\Model\XxeDetectionResult

Authorization

Apikey

HTTP request headers

  • Content-Type: application/json, text/json
  • Accept: application/json, text/json, application/xml, text/xml

[Back to top] [Back to API list] [Back to Model list] [Back to README]

textInputCheckXxeBatch

\Swagger\Client\Model\XxeDetectionBatchResponse textInputCheckXxeBatch($request)

Protect text input from XML External Entity (XXE) attacks

Detects XXE (XML External Entity) attacks from text input.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: Apikey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Apikey', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Apikey', 'Bearer');

$apiInstance = new Swagger\Client\Api\TextInputApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$request = new \Swagger\Client\Model\XxeDetectionBatchRequest(); // \Swagger\Client\Model\XxeDetectionBatchRequest | 

try {
    $result = $apiInstance->textInputCheckXxeBatch($request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TextInputApi->textInputCheckXxeBatch: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
request \Swagger\Client\Model\XxeDetectionBatchRequest

Return type

\Swagger\Client\Model\XxeDetectionBatchResponse

Authorization

Apikey

HTTP request headers

  • Content-Type: application/json, text/json
  • Accept: application/json, text/json, application/xml, text/xml

[Back to top] [Back to API list] [Back to Model list] [Back to README]

textInputProtectXss

\Swagger\Client\Model\XssProtectionResult textInputProtectXss($value)

Protect text input from Cross-Site-Scripting (XSS) attacks through normalization

Detects and removes XSS (Cross-Site-Scripting) attacks from text input through normalization. Returns the normalized result, as well as information on whether the original input contained an XSS risk.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: Apikey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Apikey', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Apikey', 'Bearer');

$apiInstance = new Swagger\Client\Api\TextInputApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$value = "value_example"; // string | User-facing text input.

try {
    $result = $apiInstance->textInputProtectXss($value);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TextInputApi->textInputProtectXss: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
value string User-facing text input.

Return type

\Swagger\Client\Model\XssProtectionResult

Authorization

Apikey

HTTP request headers

  • Content-Type: application/json, text/json
  • Accept: application/json, text/json, application/xml, text/xml

[Back to top] [Back to API list] [Back to Model list] [Back to README]