Skip to main content

Assemblies Overview

Assemblies are visual workflow builders that let you design complex API orchestration without writing code. Chain authentication, rate limiting, transformations, caching, and more in a drag-and-drop interface.

What are Assemblies?

An Assembly is a directed graph of policy nodes that execute on API requests. Think of it as a visual programming language for API traffic control.

┌─────────┐    ┌─────────────┐    ┌───────────┐    ┌─────────┐
│ Auth │───▶│ Rate Limit │───▶│ Transform │───▶│ Invoke │
└─────────┘ └─────────────┘ └───────────┘ └─────────┘

Key Features

  • Visual Editor - Drag-and-drop workflow builder
  • 21+ Policy Types - Auth, rate limit, transform, cache, validate, and more
  • Real-time Testing - Test workflows instantly with built-in API tester
  • Execution Logs - Track every node execution with detailed traces
  • YAML Import/Export - Git-friendly workflow definitions
  • Hot Reload - Changes apply instantly without restarts

Assembly Types

TypeDescriptionUse Case
PreflowExecutes before backend callAuthentication, validation, rate limiting
PostflowExecutes after backend responseResponse transformation, caching, logging
ErrorExecutes on errorsError handling, fallbacks, notifications
StandaloneIndependent workflowScheduled tasks, webhooks

Assembly Scopes

ScopeDescription
GlobalOrganization-level (enforced on all requests)
ProjectProject-level policies
GatewayGateway-level policies
RouteRoute-specific policies

Quick Example

Here's a simple preflow assembly that authenticates requests and applies rate limiting:

apiVersion: tunnelapi.in/v1
kind: Assembly
metadata:
name: API Security Flow
spec:
type: preflow
entryNodeId: auth-node
nodes:
- id: auth-node
type: auth
name: JWT Authentication
config:
type: jwt
jwt:
secret: ${env.JWT_SECRET}
- id: rate-limit-node
type: rate-limit
name: Rate Limiter
config:
windowMs: 60000
maxRequests: 100
edges:
- source: auth-node
target: rate-limit-node

Next Steps