Robust Intelligence REST API SDK
Project description
ri.fwclient
API methods for Robust Intelligence. Users must authenticate using the X-Firewall-Auth-Token
header.
This Python package is automatically generated by the OpenAPI Generator project:
- API version: 1.0
- Package version: 1.0.0
- Generator version: 7.6.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit https://www.robustintelligence.com
Requirements.
Python 3.7+
Installation & Usage
pip install
If the python package is hosted on a repository, you can install directly using:
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
(you may need to run pip
with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
)
Then import the package:
import ri.fwclient
Setuptools
Install via Setuptools.
python setup.py install --user
(or sudo python setup.py install
to install the package for all users)
Then import the package:
import ri.fwclient
Tests
Execute pytest
to run the tests.
Getting Started
Please follow the installation procedure and then run the following:
import ri.fwclient
from ri.fwclient.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://https://<ai-firewall-domain>.rbst.io
# See configuration.py for a list of all supported configuration parameters.
configuration = ri.fwclient.Configuration(
host = "http://https://<ai-firewall-domain>.rbst.io"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: X-Firewall-Auth-Token
configuration.api_key['X-Firewall-Auth-Token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-Firewall-Auth-Token'] = 'Bearer'
# Enter a context with an instance of the API client
with ri.fwclient.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ri.fwclient.FirewallApi(api_client)
firewall_instance_id_uuid = 'firewall_instance_id_uuid_example' # str | Unique object ID.
try:
# GetFirewallEffectiveConfig
api_response = api_instance.effective_config(firewall_instance_id_uuid)
print("The response of FirewallApi->effective_config:\n")
pprint(api_response)
except ApiException as e:
print("Exception when calling FirewallApi->effective_config: %s\n" % e)
Documentation for API Endpoints
All URIs are relative to http://https://.rbst.io
Class | Method | HTTP request | Description |
---|---|---|---|
FirewallApi | effective_config | GET /v1-beta/firewall/{firewallInstanceId.uuid}/effective-config | GetFirewallEffectiveConfig |
FirewallApi | validate | PUT /v1-beta/firewall/{firewallInstanceId.uuid}/validate | Validate |
FirewallInstanceManagerApi | create_instance | POST /v1-beta/firewall-instance | CreateFirewallInstance |
FirewallInstanceManagerApi | delete_instance | DELETE /v1-beta/firewall-instance/{firewallInstanceId.uuid} | DeleteFirewallInstance |
FirewallInstanceManagerApi | get_instance | GET /v1-beta/firewall-instance/{firewallInstanceId.uuid} | GetFirewallInstance |
FirewallInstanceManagerApi | list_instances | GET /v1-beta/firewall-instance | ListFirewallInstances |
FirewallInstanceManagerApi | update_instance | PATCH /v1-beta/firewall-instance/{firewallInstance.firewallInstanceId.uuid} | UpdateFirewallInstance |
Documentation For Models
- Any
- AttackObjective
- AttackTechnique
- CodeDetectionDetails
- CodeDetectionRuleConfig
- CodeSubstring
- CreateFirewallInstanceRequest
- CreateFirewallInstanceResponse
- CustomPiiEntity
- FirewallAction
- FirewallInstanceDeploymentConfig
- FirewallInstanceInfo
- FirewallInstanceStatus
- FirewallRuleConfig
- FirewallRuleType
- FirewallTokenizer
- FlaggedEntity
- FlaggedSubstring
- GetFirewallEffectiveConfigResponse
- GetFirewallInstanceResponse
- ID
- IndividualRulesConfig
- Language
- LanguageDetectionDetails
- LanguageDetectionRuleConfig
- LanguageSubstring
- ListFirewallInstancesResponse
- ModelInfo
- OffTopicRuleConfig
- PiiDetectionDetails
- PiiDetectionRuleConfig
- PiiEntityType
- ProcessedRequest
- ProductMetadata
- PromptInjectionDetails
- PromptInjectionRuleConfig
- RawModelPrediction
- RequestBodyComponent
- RiskCategoryType
- RpcStatus
- RuleEvaluationMetadata
- RuleOutput
- RuleSensitivity
- StandardInfo
- TextClassificationPred
- TokenCounterRuleConfig
- ToxicityDetectionDetails
- ToxicityRuleConfig
- ToxicityRuleMode
- ToxicityThreatCategory
- UnknownExternalSourceRuleConfig
- UpdateFirewallInstanceResponse
- UpdateInstanceRequest
- ValidateRequest
- ValidateResponse
- YaraInfo
Documentation For Authorization
Authentication schemes defined for the API:
X-Firewall-Auth-Token
- Type: API key
- API key parameter name: X-Firewall-Auth-Token
- Location: HTTP header
Author
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Hashes for robustintelligence-2.10.0rc10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e3ad0947d6f70bc495ab89c8a8526a48baecac9b385b5fcd06572f6fd8d8423 |
|
MD5 | 235cbf1e68fcd0280305c12056575b43 |
|
BLAKE2b-256 | d3d279c536606892df23e978f1342fc14c797a301c9af3b468f1dc0c45554aef |