REST Publisher
A model that allow you to publish document family metadata to a REST API
Slug: rest-publisher
Version: 1.0.0
Infer: No
Event Aware: Yes
Overview
REST Publisher Model
The REST Publisher model enables integration between Kodexa and external systems by automatically publishing document metadata to external REST APIs when document content changes. This event-driven model facilitates real-time synchronization with external systems and workflow triggers based on document updates.
How It Works
- The model listens for document content update events in Kodexa
- When a content update event occurs, it prepares a standardized payload with document details
- The payload is securely sent to your configured external REST endpoint
- If the request fails, it can automatically retry based on your configuration
- The external system can then process the document metadata and take appropriate action
Options Configuration
Option | Description |
---|---|
url | The target REST API endpoint URL to receive document metadata |
api_token | Authentication token to securely access the external API |
data_store | The Kodexa data store containing document metadata (format: ‘org/store:version’) |
max_retries | Number of retry attempts if the API request fails (default: 3) |
retry_delay | Seconds to wait between retry attempts (default: 15) |
API Request Format
The model sends the following JSON payload to the external API:
Process Flow
Security Considerations
The REST Publisher model includes several security features:
- API Token Authentication: Uses API key-based authentication for secure communication
- HTTPS Support: Fully compatible with encrypted HTTPS connections
- Sensitive Field Protection: API token is stored securely as a password field
- Configurable Retries: Prevents data loss when temporary connection issues occur
Example Usage
This model is particularly useful for:
- Content Management Integration: Notifying a CMS when documents are updated
- Workflow Automation: Triggering external workflows when document content changes
- Data Synchronization: Keeping external systems in sync with Kodexa document metadata
- External Processing: Initiating document processing in third-party systems
- Audit Trail Creation: Logging document changes to external compliance systems
Configuration Example
To publish document updates to an external workflow system:
Integration Pattern
The REST Publisher follows the “fire and forget” integration pattern, where:
- The event is detected and processed asynchronously
- The notification is sent to the external system
- The external system processes the notification independently
- No response processing is required in Kodexa
This pattern allows for loose coupling between systems while ensuring reliable notification delivery through the retry mechanism.
Inference Options
The following options can be configured when using this model for inference:
Name | Label | Type | Description | Default | Required |
---|---|---|---|---|---|
api_token | API Token | password | N/A | - | No |
url | URL | string | N/A | - | No |
data_store | Data Store | tableStore | N/A | - | No |
max_retries | Max Retries | number | N/A | 3 | No |
retry_delay | Retry Delay in Seconds | number | N/A | 15 | No |
Model Details
- Provider: Kodexa AI