The security APIs help you detect and block security threats.
If everything is set correctly:
-
Running
sfdx version
in a command prompt should output something like:sfdx-cli/5.7.5-05549de (darwin-amd64) go1.7.5 sfdxstable
-
Copy the output into your Salesforce DX folder - or alternatively deploy the output directly into the workspace.
-
Deploy the code via Salesforce DX to your Scratch Org
$ sfdx force:source:push
-
If the API needs authentication update the Named Credential in Setup.
-
Run your Apex tests using
$ sfdx sfdx force:apex:test:run
-
Retrieve the job id from the console and check the test results.
$ sfdx force:apex:test:report -i theJobId
Please follow the installation instruction and execute the following Apex code:
SwagContentThreatDetectionApi api = new SwagContentThreatDetectionApi();
SwagClient client = api.getClient();
Map<String, Object> params = new Map<String, Object>{
'value' => 'value_example'
};
try {
// cross your fingers
SwagStringAutomaticThreatDetection result = api.contentThreatDetectionAutomaticThreatDetectionString(params);
System.debug(result);
} catch (Swagger.ApiException e) {
// ...handle your exceptions
}
All URIs are relative to https://api.cloudmersive.com
Class | Method | HTTP request | Description |
---|---|---|---|
SwagContentThreatDetectionApi | contentThreatDetectionAutomaticThreatDetectionString | POST /security/threat-detection/content/automatic/detect/string | Automatically detect threats in an input string |
SwagContentThreatDetectionApi | contentThreatDetectionCheckSqlInjectionString | POST /security/threat-detection/content/sql-injection/detect/string | Check text input for SQL Injection (SQLI) attacks |
SwagContentThreatDetectionApi | contentThreatDetectionCheckXxe | POST /security/threat-detection/content/xxe/detect/xml/string | Protect text input from XML External Entity (XXE) attacks |
SwagContentThreatDetectionApi | contentThreatDetectionDetectInsecureDeserializationJsonString | POST /security/threat-detection/content/insecure-deserialization/json/detect/string | Detect Insecure Deserialization JSON (JID) attacks in a string |
SwagContentThreatDetectionApi | contentThreatDetectionProtectXss | POST /security/threat-detection/content/xss/detect/string | Protect text input from Cross-Site-Scripting (XSS) attacks through normalization |
SwagNetworkThreatDetectionApi | networkThreatDetectionDetectSsrfUrl | POST /security/threat-detection/network/url/ssrf/detect | Check a URL for Server-side Request Forgery (SSRF) threats |
SwagNetworkThreatDetectionApi | networkThreatDetectionIsBot | POST /security/threat-detection/network/ip/is-bot | Check if IP address is a Bot client threat |
SwagNetworkThreatDetectionApi | networkThreatDetectionIsThreat | POST /security/threat-detection/network/ip/is-threat | Check if IP address is a known threat |
SwagNetworkThreatDetectionApi | networkThreatDetectionIsTorNode | POST /security/threat-detection/network/ip/is-tor-node | Check if IP address is a Tor node server |
- SwagIPThreatDetectionResponse
- SwagStringAutomaticThreatDetection
- SwagStringInsecureDeserializationJso
- SwagStringSqlInjectionDetectionResul
- SwagStringXssProtectionResult
- SwagStringXxeDetectionResult
- SwagThreatDetectionBotCheckResponse
- SwagThreatDetectionTorNodeResponse
- SwagUrlSsrfThreatDetectionRequestFul
- SwagUrlSsrfThreatDetectionResponseFu
Authentication schemes defined for the API:
- Type: API key
- API key parameter name: Apikey
- Location: HTTP header