Configurations

Learn about Configurations in Laminar

Overview

Configurations in Laminar manage environment-specific settings, credentials, and properties for workflows. They enable you to run the same workflow with different settings across environments or customers.

Configuration Model

Field
Type

id

Integer (int64)

name

String

workspaceId

Integer (int64)

properties

Array

flowCredentialPairs

Array

Key Components

Properties

Store reusable values referenced in workflows using {{props.propertyName}} syntax:

{
  "properties": [
    {
      "key": "apiVersion",
      "value": "2.1"
    },
    {
      "key": "baseUrl",
      "value": "https://api.store.com"
    }
  ]
}

Authentication Credentials

Manage API credentials for different flows:

{
  "flowCredentialPairs": [
    {
      "flowId": 456,
      "sourceAuthCredentialId": 789,
      "destinationAuthCredentialId": 101
    }
  ]
}

Multiple Customer Example

You can use configurations to run the same workflow with different settings per customer. For example:

Customer A Configuration

{
  "name": "Customer A Store",
  "properties": [
    {
      "key": "baseUrl",
      "value": "https://api.store.com"
    },
    {
      "key": "merchantId",
      "value": "MERCHANT_A"
    }
  ],
  "flowCredentialPairs": [
    {
      "flowId": 456,
      "sourceAuthCredentialId": 789,  // Customer A's credentials
      "destinationAuthCredentialId": 101
    }
  ]
}

Customer B Configuration

{
  "name": "Customer B Store",
  "properties": [
    {
      "key": "baseUrl",
      "value": "https://api.store.com"
    },
    {
      "key": "merchantId",
      "value": "MERCHANT_B"
    }
  ],
  "flowCredentialPairs": [
    {
      "flowId": 456,
      "sourceAuthCredentialId": 790,  // Customer B's credentials
      "destinationAuthCredentialId": 102
    }
  ]
}

Executing with Different Configurations

The same workflow can be executed with different configurations by specifying the configuration_id:

# Execute workflow for Customer A
POST /workflow/execute/{workflowId}?configuration_id=123&api_key=<api_key>
{
  "orderId": "12345",
  "quantity": 2
}

# Execute workflow for Customer B
POST /workflow/execute/{workflowId}?configuration_id=456&api_key=<api_key>
{
  "orderId": "67890",
  "quantity": 1
}

The workflow will use the appropriate credentials and properties based on the configuration_id provided.

Authentication Types

Basic Auth

{
  "authentication": {
    "type": "basic",
    "username": "{{props.apiUsername}}",
    "password": "{{props.apiPassword}}"
  }
}

OAuth2

{
  "authentication": {
    "type": "oauth2",
    "token": "{{props.apiToken}}"
  }
}

API Key

{
  "authentication": {
    "type": "apikey",
    "apiKey": "{{props.apiKey}}"
  }
}

Best Practices

Security

  • Store sensitive data like credentials in the configuration store

  • Rotate credentials regularly

  • Use different configurations per environment/customer

Organization

  • Use meaningful property names

  • Keep configurations focused and organized

  • Document configuration requirements

Usage

  • Reference properties using {{props.propertyName}} syntax

  • Validate configurations before deployment

  • Monitor credential expiration

Last updated

Was this helpful?