ShieldAI
  • 🚀 Welcome to the ShieldAI Universe! đŸ›Ąī¸
  • 🤔 What is ShieldAI? The Grand Vision
  • ShieldAI Liftoff in Minutes! âąī¸
  • đŸ›Ąī¸ Threat Detection & Prevention Deep Dive
  • HAPI Reference: Unleash ShieldAI Programmatically 👩‍đŸ’ģ👨‍đŸ’ģ
Powered by GitBook
On this page
  • HAPI Reference: Command ShieldAI via Code! đŸ•šī¸
  • 🔑 Getting Started with the API
  • 🔭 Exploring the API Endpoints
  • đŸ› ī¸ SDKs: Your Integration Accelerators

HAPI Reference: Unleash ShieldAI Programmatically 👩‍đŸ’ģ👨‍đŸ’ģ

HAPI Reference: Command ShieldAI via Code! đŸ•šī¸

Welcome, developers, to the ShieldAI Application Programming Interface (API) Reference!

This section is your gateway to interacting with the ShieldAI platform directly through code. Whether you need to automate policy updates, integrate security events into your SIEM, or build custom dashboards, the API empowers you to extend and customize your ShieldAI experience. 🚀

🔑 Getting Started with the API

Before you make your first API call, here are the essential concepts you need to grasp:

  • Base URL: All ShieldAI API endpoints are relative to the base URL

    Note: Always use HTTPS for secure communication. The API version (`v1`) is included in the path.

  • Authentication: 🔐 Every API request must be authenticated. We primarily use API Keys passed via HTTP headers. Head over to the Authentication page for detailed instructions on generating keys and formatting your requests. Unauthenticated requests will result in a 401 Unauthorized error.

  • Content Type: The ShieldAI API expects request bodies (for POST, PUT, PATCH) to be in JSON format and returns responses in JSON. Ensure your requests include the header:

    Content-Type: application/json

  • Rate Limiting: đŸšĻ To ensure service stability for all users, API requests are rate-limited. If you exceed the limit, you'll receive a 429 Too Many Requests error. Check the response headers (e.g., `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset`) for details. Plan your integrations accordingly!

  • Error Handling: đŸ’Ĩ Things don't always go as planned! The API uses standard HTTP status codes to indicate success or failure. Consult the Error Handling page (you'll need to create this!) for a list of common status codes and error response formats. Well-structured error responses will include a machine-readable error code and a descriptive message.

  • Versioning: As the API evolves, we may introduce new versions. Versioning is handled via the URL path (`/v1/`). We strive to maintain backward compatibility within a version but will announce any breaking changes well in advance.


🔭 Exploring the API Endpoints

The API is organized into logical resource categories. Dive into the specifics for each area:

  • Policies API: 📜 Programmatically create, read, update, delete (CRUD), and list your security policies. Define rules, actions, and detection settings.

  • Events API: 📊 Fetch security event logs generated by ShieldAI. Filter by time range, threat type, action taken, etc. Ideal for feeding into monitoring or SIEM systems.

  • Rules API: 🔧 Manage custom detection rules (e.g., specific keywords, regex patterns) that feed into your policies.

  • Protected Models API: 🤖 List and manage the AI model endpoints registered with ShieldAI.

  • Analytics API: 📈 Retrieve aggregated statistics and insights about threat trends, policy effectiveness, and model traffic patterns.

  • Account Management API: 👤 Manage users, API keys, and basic account settings (permissions permitting).

đŸ› ī¸ SDKs: Your Integration Accelerators

While the REST API offers maximum flexibility, our official Software Development Kits (SDKs) can significantly simplify integration by handling authentication, request formatting, and response parsing for you:

  • 🐍 Python SDK

  • Node.js SDK

  • Java SDK

We highly recommend using an SDK if one is available for your language!

Now you're equipped with the basics! Choose an endpoint category to explore or head straight to Authentication to get your keys ready. Happy coding! 🎉

PreviousđŸ›Ąī¸ Threat Detection & Prevention Deep Dive

Last updated 1 month ago