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

  1. The model listens for document content update events in Kodexa
  2. When a content update event occurs, it prepares a standardized payload with document details
  3. The payload is securely sent to your configured external REST endpoint
  4. If the request fails, it can automatically retry based on your configuration
  5. The external system can then process the document metadata and take appropriate action

Options Configuration

OptionDescription
urlThe target REST API endpoint URL to receive document metadata
api_tokenAuthentication token to securely access the external API
data_storeThe Kodexa data store containing document metadata (format: ‘org/store:version’)
max_retriesNumber of retry attempts if the API request fails (default: 3)
retry_delaySeconds to wait between retry attempts (default: 15)

API Request Format

The model sends the following JSON payload to the external API:

{
  "dataStoreSlug": "your-data-store",
  "documentId": "document-family-id",
  "orgSlug": "your-organization",
  "storeVersion": "store-version"
}

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:

url: "https://api.example.com/document-updates"
api_token: "your-secure-api-token"
data_store: "yourorg/document-metadata:1.0.0"
max_retries: 5
retry_delay: 30

Integration Pattern

The REST Publisher follows the “fire and forget” integration pattern, where:

  1. The event is detected and processed asynchronously
  2. The notification is sent to the external system
  3. The external system processes the notification independently
  4. 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:

NameLabelTypeDescriptionDefaultRequired
api_tokenAPI TokenpasswordN/A-No
urlURLstringN/A-No
data_storeData StoretableStoreN/A-No
max_retriesMax RetriesnumberN/A3No
retry_delayRetry Delay in SecondsnumberN/A15No

Model Details

  • Provider: Kodexa AI