This document outlines the standard folder structure and file contents for creating a new integration. Integrations are located in one of two directories:
content/response_integrations/third_party/communityfor community-contributed integrations.content/response_integrations/third_party/partnerfor partner-supported integrations.
All integrations, whether community or partner, follow the same internal structure described below.
Note: All file names must be in snake_case
An integration is placed inside either the community or partner directory. The integration_name folder itself has the following structure:
integration_name/
├── actions/
│ ├── __init__.py
│ ├── action1.py
│ ├── action1.yaml
│ ├── action2.py
│ └── action2.yaml
│
├── core/
│ ├── __init__.py
│ ├── integration_client.py
│ └── data_models/
│ ├── data_model_1.py
│ └── data_model_2.py
│
├── connectors/
│ ├── __init__.py
│ ├── connector1.py
│ ├── connector1.yaml
│ ├── connector2.py
│ └── connector2.yaml
│
├── widgets/
│ ├── widget1.html
│ ├── widget1.yaml
│ ├── widget2.html
│ └── widget2.yaml
│
├── jobs/
│ ├── __init__.py
│ ├── job1.py
│ ├── job1.yaml
│ ├── job2.py
│ └── job2.yaml
│
├── resources/
│ ├── action1_JsonResult_example.json
│ ├── image.png
│ └── logo.svg
│
├── tests/
│ ├── __init__.py
│ ├── common.py
│ ├── conftest.py
│ ├── core/
│ │ ├── __init__.py
│ │ ├── session.py
│ │ └── product.py
│ │
│ └── test_defaults/
│ │ ├── __init__.py
│ │ └── test_imports.py
│ │
│ └── test_actions/
│ ├── __init__.py
│ ├── test_action1.py
│ └── test_action2.py
│
├── __init__.py
├── .python-version
├── ontology_mapping.yaml
├── definition.yaml
├── pyproject.toml
├── release_notes.yaml
└── uv.lock
-
__init__.py: Empty file that marks the directory as a Python package. -
.python-version: Specifies the Python version required for the integration (typically 3.11). -
ontology_mapping.yaml: Specifies the default mapping rules of events to SOAR entities. A default configuration must exist if the integration has at least one connector. -
definition.yaml: Contains metadata about the integration, including:- API version
- Integration identifier and display name
- Configuration schema (API keys, endpoints, etc.)
- Author information
- Categories/tags
-
pyproject.toml: Defines project dependencies and build settings:- Name
- Description
- Version number
- Python version (typically ">=3.11,<3.12")
- Development dependencies (pytest, mypy, integration_testing, etc.)
- Production dependencies
- Tool configurations (pytest, mypy, etc.)
- Project metadata
-
release_notes.yaml: Documents changes for each version:- Version numbers
- Release dates (in YYYY-MM-DD format)
- Description of changes
- Bug fixes
- New features
- Optional boolean flags can be added and will default to false if omitted.
new : Set to true for a new component or for the initial 1.0 release. In the latter case, it will be displayed as new integration in the Content Hub.
deprecated : Set to true if a feature is being phased out but is still functional.
removed : Set to true when a feature has been completely removed.
regressive : Set to true if the change is breaking existing functionalities.
# Example: Adding a new action to an existing integration. - description: Added a new action 'action example'. integration_version: 2.0 item_name: action example item_type: Action new: true publish_time: '2025-10-15'
-
uv.lock: Lock file generated by the UV package manager, listing exact versions of all dependencies.
The actions/ directory contains all the actions that the integration provides:
__init__.py: Empty file to mark the directory as a Python package.action_name*.py: Python implementation files containing action classes:- Each action should be a standalone script/class
- Should include proper type hints
- Should handle errors gracefully
- Should document inputs/outputs with Google-style docstrings
- It is advised to use base classes from tip-common for out-of-the-box error handling, logging, and sdk handling of scripts
action_name*.yaml: YAML definition files for each action, including:- Input parameters with types, descriptions, and examples
- Output schema
- Display information (name, description, category)
- Required permissions
Typical actions include:
ping.py/ping.yaml: Basic connectivity test to verify API access- Service-specific actions (e.g.,
check_ip_reputation.py,fetch_alerts.py)
The core/ directory contains the core implementation of the integration:
__init__.py: Empty file to mark the directory as a Python package.- Include any other modules that are common code for your scripts.
- Include a class that is responsible for authenticating with the third party product
- Include an api_client class that receives an authenticated session and uses it to make requests to the product
- Modules for constants, utility functions, data models, and so on
- This folder can contain subfolders, all python files must have different names, even if in nested folders
The tests/ directory contains all test files for the integration:
__init__.py: Empty file to mark the directory as a Python package.common.py: Common test utilities and fixtures:- Mock response data
- Test constants
- Helper functions
conftest.py: Common test utilities and fixtures:- Shared fixtures
- Pytest configuration
test_defaults/: Directory containing default test cases:__init__.py: Empty file to mark the directory as a Python packagetest_imports.py: Tests that using the integration’s virtual environment, all python components in the integration do not have import issues
test_actions/: Directory containing all action test modules
- Modular Design: Keep the code modular with clear separation of concerns.
- Type Hints: Use Python type hints throughout the codebase for better IDE support and static type checking.
- Pydantic Models: Use Pydantic for data validation and serialization/deserialization.
- Error Handling: Implement comprehensive error handling with meaningful error messages.
- Documentation: Document all classes, methods, and functions with Google-style docstrings.
- Testing: Write comprehensive tests for all functionality, including:
- Unit tests for individual components
- Integration tests with mocked API responses
- Edge case testing (error conditions, unusual inputs)
- Configuration: Ensure all configurable aspects of the integration are defined in
definition.yaml. - Version Control: Follow semantic versioning for releases.
- Code Style: Adhere to the project's code style guidelines (using ruff for linting and formatting).
- Security: Never hardcode sensitive information such as API keys or passwords.
At minimum, every integration should implement:
- A core client class that handles API communication
- A Ping action to verify connectivity
- At least one service-specific action that demonstrates value
- Comprehensive tests for all components
- Proper error handling for API failures
- Type hints throughout the codebase
When creating a new integration:
- Start by setting up the basic folder structure
- Define the configuration schema in
definition.yaml - Create a new pyproject.toml file using
uv initand add dependencies like requests and tip-common usinguv add. - Implement the core client with authentication
- Create the Ping action for basic connectivity testing
- Add service-specific actions one by one
- Write tests as you implement each component
- Document everything thoroughly
- Run linting and type checking before submitting