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
- CodeDetectionDetailsCodeSubstring
- FlaggedSubstringRequestBodyComponent
- GenerativefirewallCodeDetectionDetails
- GenerativefirewallCodeDetectionRuleConfig
- GenerativefirewallCreateFirewallInstanceRequest
- GenerativefirewallCreateFirewallInstanceResponse
- GenerativefirewallCustomPiiEntity
- GenerativefirewallFirewallAction
- GenerativefirewallFirewallInstanceDeploymentConfig
- GenerativefirewallFirewallInstanceInfo
- GenerativefirewallFirewallInstanceStatus
- GenerativefirewallFirewallRuleConfig
- GenerativefirewallFirewallRuleType
- GenerativefirewallFirewallTokenizer
- GenerativefirewallFlaggedSubstring
- GenerativefirewallGetFirewallEffectiveConfigResponse
- GenerativefirewallGetFirewallInstanceResponse
- GenerativefirewallIndividualRulesConfig
- GenerativefirewallLanguageDetectionDetails
- GenerativefirewallLanguageDetectionRuleConfig
- GenerativefirewallListFirewallInstancesResponse
- GenerativefirewallOffTopicRuleConfig
- GenerativefirewallPiiDetectionDetails
- GenerativefirewallPiiDetectionRuleConfig
- GenerativefirewallPiiEntityType
- GenerativefirewallPromptInjectionDetails
- GenerativefirewallPromptInjectionRuleConfig
- GenerativefirewallRawModelPrediction
- GenerativefirewallRuleOutput
- GenerativefirewallRuleSensitivity
- GenerativefirewallStandardInfo
- GenerativefirewallTokenCounterRuleConfig
- GenerativefirewallToxicityDetectionDetails
- GenerativefirewallToxicityRuleConfig
- GenerativefirewallToxicityRuleMode
- GenerativefirewallUnknownExternalSourceRuleConfig
- GenerativefirewallUpdateFirewallInstanceResponse
- GenerativefirewallValidateResponse
- GooglerpcStatus
- LanguageDetectionDetailsLanguageSubstring
- PiiDetectionDetailsFlaggedEntity
- ProtobufAny
- RawModelPredictionTextClassificationPred
- RimeAttackObjective
- RimeAttackTechnique
- RimeLanguage
- RimeToxicityThreatCategory
- RimeUUID
- RiskscoreRiskCategoryType
- RuleEvaluationMetadataModelInfo
- RuleEvaluationMetadataYaraInfo
- RuleOutputRuleEvaluationMetadata
- UpdateInstanceRequest
- ValidateRequest
- ValidateResponseProcessedRequest
- ValidateResponseProductMetadata
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.0rc8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2207974b441f09c5a9caf2e4f3d7dd938ac4283d6a997b8293708bdf7e5925f4 |
|
MD5 | a93d43e5339ff438f9294c0a2be8d308 |
|
BLAKE2b-256 | e4ccdc975e56b752c78edd1fef562f8272e52f9be095d1f0f9bff10a9c55f49f |