Best Practices for API Usage
To ensure optimal performance and security when using APIs, consider the following best practices:
Secure API Keys: Never expose your API key in public repositories or logs.
Use Rate Limits Efficiently: Avoid excessive requests to prevent throttling.
Validate User Input: Preprocess user input before sending it to the API to reduce false positives.
Monitor API Responses: Log flagged content for analysis and improvements.
Update Security Rules Regularly: Ensure that your configuration aligns with evolving security needs.
Note: A connection can have only one API key at a time. The gateway consistently applies the policies that the UI configures for inspection. The HTTP Inspects API strictly follows the rules specified in the request body's config section. For Chat Inspect API, the request's provided rules take precedence over the policies configured in the UI. Including enabled_rules in the request prevents the generation of events.