Skip to main content

Content Hub: Integration

Content Hub templates integrate with multiple DataStream platform components. Templates can include route configurations for automatic pipeline-to-target connections, define dependencies on other templates, transform into fully editable pipelines after installation, and expose REST API endpoints for programmatic management.

Route Integration

Templates can include pre-configured route definitions that automatically connect pipelines to devices and targets upon installation.

Route Configuration Structure

A template's route configuration specifies how the installed pipeline connects to data sources and destinations:

  • Route name and description: Identifier and purpose of the route
  • Pipeline references: Which pipelines the route uses for processing
  • Filter expressions: Conditional routing based on data content
  • Scheduling: Cron or interval-based execution (only available from Advanced Routes)
  • Defined targets: Abstract target types the route expects (e.g., "SIEM", "Storage")

Target Mapping

When installing a template that includes route configuration, the installation modal presents target mapping options:

  • Target selection toggles: Enable or disable each target defined in the route
  • Target dropdown: Map abstract targets to actual configured datasources in your environment
  • Configuration inheritance: Target mapping determines which destinations receive processed data

The target mapping step connects template-defined abstract targets (like "primary_siem" or "archive_storage") to your organization's actual target configurations.

Installing Routes

Routes from templates can be installed through two workflows:

During initial template installation (combined flow):

  1. Click Install Template on the template detail page
  2. Complete dependency selection if applicable
  3. Configure target mappings in the route configuration step
  4. Confirm installation to create both pipeline and route

After pipeline installation (separate route installation):

  1. Navigate to the installed template in Content Hub
  2. Select Install Route from the Actions menu
  3. Configure target mappings
  4. Confirm to create the route

After installation, the route appears in the Advanced Routes section of Routes management and can be edited like any other route.

Dependency Integration

Templates can reference other templates as dependencies, enabling modular pipeline composition.

Dependency Types

Required dependencies are essential for template functionality:

  • Must be installed for the template to function correctly
  • Include core processing libraries and shared modules
  • System enforces installation before the dependent template

Optional dependencies provide enhanced features:

  • Can be skipped during installation
  • Include advanced transformations and integrations
  • Can be added later through Manage Dependencies

Dependency Detection

The system analyzes template content to detect dependencies:

  • Pipeline references: {{ IngestPipeline "pipeline-name" }} calls in template YAML
  • Required vs optional: The ignore_missing_pipeline flag determines classification
    • ignore_missing_pipeline: false (or absent): Required dependency
    • ignore_missing_pipeline: true: Optional dependency

Managing Dependencies

Pre-installation dependency check: When clicking Install Template, the system automatically checks for dependencies and displays them in the installation modal.

Selecting optional dependencies during installation:

  • Required dependencies are pre-selected and cannot be deselected
  • Optional dependencies appear as checkboxes that can be enabled or skipped
  • Already-installed dependencies show an Installed badge and disabled checkbox

Adding optional dependencies after installation:

  1. Navigate to the installed template in Content Hub
  2. Select Manage Dependencies from the Actions menu
  3. Enable additional optional dependencies
  4. Confirm to install selected dependencies

Dependency status indicators:

  • Installed badge on dependencies already present in your pipeline library
  • Clickable dependency names open dependency detail pages

Pipeline Integration

Installed templates become fully editable pipelines within DataStream.

Template-to-Pipeline Transformation

When a template is installed:

  1. Content copy: Template YAML content is copied to the pipeline table
  2. Hash preservation: A content hash tracks the original template version for update detection
  3. Child pipeline handling: Child pipelines maintain parent relationships
  4. Name collision handling: If a pipeline with the same name exists, an automatic suffix is appended

The installed pipeline is independent from the template source. Modifications to the installed pipeline do not affect the original template.

Post-Installation Workflow

After installation:

  1. Navigate to pipeline: Click See Installed Pipeline from the template Actions menu
  2. Full editing access: Modify processing logic, field mappings, and transformation rules
  3. Customization preservation: Template updates preserve your modifications through the merge workflow
  4. Child pipeline management: Create, modify, or delete child pipelines as needed

Installed pipelines appear in the Pipelines management interface with full editing capabilities.

API Integration

REST API endpoints enable programmatic template management for automation and integration scenarios.

tip

Templates installed via API remain accessible through the Content Hub web interface for subsequent management, configuration changes, and deployment operations.

Endpoint Reference

MethodEndpointDescription
GET/api/templatesList templates (paginated, filterable)
GET/api/templates/{id}Get template details
GET/api/templates/dependencies/{id}Check template dependencies
POST/api/templates/install/{id}Install template as pipeline
PUT/api/templates/install/{id}Add optional dependencies to installed template
POST/api/templates/install-route/{id}Install route configuration
GET/api/templates/deviceTypesGet device type filter options
GET/api/templates/deviceVendorsGet vendor filter options
GET/api/templates/deviceFamiliesGet family filter options

Filtering Parameters

When listing templates (GET /api/templates):

ParameterTypeDescription
searchQuerystringCase-insensitive name search
deviceTypestringFilter by device category
deviceVendorstring[]Filter by manufacturer (supports multiple)
deviceFamilystring[]Filter by device family (supports multiple)
pageNumberintegerPage number for pagination
itemCountintegerItems per page

Authentication and Permissions

All template endpoints require valid authentication. Specific operations require corresponding permissions:

OperationRequired Permission
Browse templatesContentHubRead
Install templatePipelineCreate
Install routeAdvancedRouteCreate
Manage dependenciesPipelineCreate

Response Codes

CodeDescription
200Success
400Invalid request or template already installed
404Template not found
500Server error

Examples

The following examples demonstrate programmatic Content Hub integration using the REST API.

List Templates with Filters

Retrieve templates filtered by device type and vendor with pagination. Replace <token> with a valid authentication token.

Invoke-RestMethod -Uri "https://api.example.com/api/templates?deviceType=firewall&deviceVendor=Cisco&pageNumber=1&itemCount=25" `
-Headers @{ Authorization = "Bearer <token>" }

Install Template

Install a template as a pipeline, including all required and optional dependencies. The installDependencies flag controls whether dependencies are automatically installed.

Invoke-RestMethod -Uri "https://api.example.com/api/templates/install/12345" `
-Method Post `
-Headers @{ Authorization = "Bearer <token>"; "Content-Type" = "application/json" } `
-Body '{"installDependencies": true}'

Install Route Configuration

Install a route configuration for an already-installed template, mapping abstract target types to actual target instances in your environment.

$body = @{
targetMappings = @(
@{ abstractTarget = "primary_siem"; targetId = "67890" }
)
} | ConvertTo-Json

Invoke-RestMethod -Uri "https://api.example.com/api/templates/install-route/12345" `
-Method Post `
-Headers @{ Authorization = "Bearer <token>"; "Content-Type" = "application/json" } `
-Body $body