Protocol Visual Editors
SureStage supports 30+ protocol types beyond REST/HTTP. Each protocol has a dedicated visual editor that lets you configure mock definitions through forms, trees, and grids instead of writing raw JSON. This guide covers all available protocol editors and how to use them.
Overview
The Protocol Visual Editor opens when you click Edit Definition on any non-HTTP protocol simulation. Instead of manually crafting JSON, you use a tailored interface designed for that protocol's specific needs.
Why Use Visual Editors?
- No JSON required - Build configurations through familiar UI patterns
- Protocol-specific - Editors are designed for each protocol's data model
- Validation - Real-time feedback on configuration errors
- Faster setup - Pre-built templates for common patterns
- Less error-prone - Guided structure prevents invalid configurations
Editor Access
- Navigate to your protocol simulation
- Click Edit Definition to open the modal
- Use the visual editor to configure the mock definition
- Click Save Definition to persist changes
- Optionally enable Reload running server to hot-reload without restarting
Protocol Groups
Protocols are organized by category and editor type. Each group uses a UI pattern optimized for that protocol's data structure.
Group A — File & Directory Protocols
Protocols that simulate file systems and directory structures.
| Protocol | Editor Type | Key Features |
|---|---|---|
| SMB | File tree editor | Drag-drop folder structure, file content, permissions, share settings |
| SFTP | File tree editor | SSH-based file system, directory listing, file access |
| S3 | File tree editor | Bucket structure, object metadata, versioning, lifecycle policies |
| LDAP | DN tree editor | Distinguished names, attributes, search filters, user objects |
| JDBC | Table editor | Database tables, columns, rows, SQL query results |
Using File Tree Editors (SMB, SFTP, S3)
- Click New Folder to create directory structure
- Click New File to add files
- Configure file properties:
- Name - File or folder name
- Content - File data (text or binary)
- Metadata - Size, timestamp, permissions
- Drag and drop to organize hierarchy
- Right-click for context menu (rename, delete, duplicate)
For S3, you can configure object versioning and lifecycle rules per bucket. For SMB/SFTP, set file permissions and share-level access controls.
Using LDAP Directory Editor
- Build DN hierarchy starting with root
- Add user and group objects
- Configure attributes:
- CN (Common Name) - Object identifier
- OU (Organizational Unit) - Container structure
- Custom Attributes - Any custom LDAP attributes
- Set search filters and base DN for queries
- Test DN path resolution
Using Table Editor (JDBC)
- Click New Table to create database tables
- Define schema:
- Table Name - Database table identifier
- Columns - Column name, type, constraints
- Primary Key - Unique identifier(s)
- Indexes - Query optimization
- Add rows directly in grid view
- Configure SQL query results for SELECT statements
JDBC editor supports common data types: INT, VARCHAR, TIMESTAMP, DECIMAL, BOOLEAN, and JSON.
Group B — Document Stores
Protocols that store semi-structured documents and collections.
| Protocol | Editor Type | Key Features |
|---|---|---|
| MongoDB | List + JSON hybrid | Collections, documents, indexes, aggregation pipelines |
| DynamoDB | List + JSON hybrid | Tables, items, key schema, global secondary indexes |
| Elasticsearch | List + JSON hybrid | Indices, mappings, documents, analyzer settings |
| VectorDB | List + JSON hybrid | Collections, vectors, similarity search, embeddings |
Using Document Store Editors
- Click New Collection (MongoDB/Elasticsearch) or New Table (DynamoDB)
- Configure collection metadata:
- Name - Collection identifier
- Schema - Field definitions (optional for MongoDB)
- Settings - Sharding, replication, TTL
- Add documents in two ways:
- Form mode - Fill out fields in a structured form
- JSON mode - Paste or edit raw JSON
- For search capabilities:
- Configure indexes on frequently queried fields
- Set up analyzer settings (Elasticsearch)
- Define embedding dimensions (VectorDB)
For VectorDB, ensure your vector dimensions match the embedding model. A 1536-dimension embedding requires correctly configured vector fields.
Group C — Message Brokers
Protocols for event streaming and asynchronous messaging.
| Protocol | Editor Type | Key Features |
|---|---|---|
| Kafka | Topic/queue list + message editor | Topics, partitions, seed messages, consumer groups |
| MQTT | Topic/queue list + message editor | Topics, QoS levels, retained messages, subscriptions |
| AMQP | Topic/queue list + message editor | Exchanges, queues, bindings, routing keys |
| SQS/SNS | Topic/queue list + message editor | Queues, topics, subscriptions, message attributes |
Using Message Broker Editors
- Click New Topic or New Queue to create channels
- Configure channel properties:
- Name - Topic/queue identifier
- Partitions/Shards - Data distribution (Kafka, AMQP)
- QoS Level - Message delivery guarantee (MQTT)
- Retention - How long messages persist
- Add seed messages:
- Click Add Message in the topic/queue
- Enter message key and payload
- Set headers or attributes
- Configure expiration if needed
- For advanced configuration:
- Set consumer groups (Kafka)
- Configure dead-letter queues (SQS)
- Set up exchange bindings (AMQP)
Kafka partitions allow parallel processing. MQTT QoS levels control delivery guarantees: 0 (at most once), 1 (at least once), 2 (exactly once).
Group D — Identity & Auth
Protocols for user identity and access management.
| Protocol | Editor Type | Key Features |
|---|---|---|
| OAuth2 | Entity card editor | Clients, access tokens, scopes, grant types |
| SAML | Entity card editor | Identity provider config, service provider metadata, assertions |
| SCIM | Entity card editor | Users, groups, schemas, resource types |
Using Identity Editors
- Click New Entity to create users, clients, or providers
- Configure entity properties:
- ID - Unique identifier
- Name - Display name
- Attributes - Type-specific fields
- For OAuth2:
- Define clients with client IDs
- Assign scopes (e.g.,
read:users,write:posts) - Set grant types (authorization_code, client_credentials)
- Configure token expiration
- For SAML:
- Upload IdP certificate
- Configure assertion attributes
- Set NameID format
- Define attribute mappings
- For SCIM:
- Create users with attributes
- Create groups with members
- Define custom schemas
- Set resource type permissions
For OAuth2, use standard scopes like openid profile email for better interoperability. For SAML, test assertion validation carefully as encoding issues are common.
Group E — Schema-Driven APIs
Protocols that use formal schema definitions like GraphQL and gRPC.
| Protocol | Editor Type | Key Features |
|---|---|---|
| GraphQL | Code editor + method grid | SDL schema, resolvers, queries/mutations, subscriptions |
| gRPC | Code editor + method grid | Proto definitions, services, methods, message types |
| SOAP | Code editor + method grid | WSDL, operations, message types, bindings |
| Thrift | Code editor + method grid | IDL, services, structs, enums |
Using Schema Editors
- Configure the schema in the Schema Panel:
- For GraphQL: Paste GraphQL SDL
- For gRPC: Paste Proto3 definition
- For SOAP: Paste WSDL or define operations
- For Thrift: Paste Thrift IDL
- Click Validate Schema to check syntax
- Once validated, the Method Grid appears showing:
- All available operations/methods
- Input and output types
- Description and documentation
- Configure resolvers:
- Click Configure Response for each method
- Define mock response data
- Set error scenarios
- Add response delays
GraphQL schemas are case-sensitive. Ensure type names match exactly when referencing them in resolvers. For gRPC, proto3 syntax is recommended for better compatibility.
Group F — Streaming Protocols
Real-time protocols for push communication and event streaming.
| Protocol | Editor Type | Key Features |
|---|---|---|
| WebSocket | Channel list + event builder | Channels, message handlers, bidirectional events |
| SSE | Channel list + event builder | Event streams, event types, data patterns |
Using Streaming Editors
- Click New Channel to create communication channels
- Configure channel properties:
- Name - Channel identifier
- Description - What this channel represents
- Auth Required - Authentication for this channel
- Add events to the channel:
- Click New Event in the channel
- Define event name and schema
- Configure event payload
- For WebSocket:
- Set up bidirectional handlers
- Configure message acknowledgment
- Set up connection lifecycle events (connect, disconnect)
- For SSE:
- Define server-sent events
- Set event emission frequency
- Configure retry behavior
- Set data format (JSON, text, binary)
WebSocket connections are persistent. SSE is unidirectional (server to client only), making it simpler for many use cases but less suitable for true bidirectional communication.
Group G — Infrastructure Protocols
System-level protocols for monitoring, configuration, and operations.
| Protocol | Editor Type | Key Features |
|---|---|---|
| SMTP | Smart defaults | Mail server config, mailbox simulation, message templates |
| Redis | Smart defaults | Key types, commands, data structures, expiration |
| Syslog | Smart defaults | Facility, severity, message format, log aggregation |
| StatsD/Prometheus | Smart defaults | Metrics, counters, gauges, histograms, labels |
| OTLP | Smart defaults | Traces, spans, metrics, logs, resource attributes |
| OPA | Smart defaults | Policies, data, decision rules, test bundles |
Using Smart Default Editors
Smart default editors provide pre-configured templates for common infrastructure scenarios. They require minimal configuration:
- Review the default configuration presented
- Customize as needed:
- Add specific metrics (Prometheus)
- Configure mail rules (SMTP)
- Set policy rules (OPA)
- Examples provided for common patterns:
- Response time histogram (Prometheus)
- Email validation policy (OPA)
- Log severity levels (Syslog)
- Click Save to apply defaults
Protocol-Specific Options:
- SMTP - Simulate mailbox behavior, bounce handling, delivery delays
- Redis - Set key expiration, configure persistence, simulate eviction
- Syslog - Filter by facility/severity, configure forwarding
- StatsD/Prometheus - Define metric types and labels, set scrape intervals
- OTLP - Configure sampling rates, resource detection, exporter settings
- OPA - Load policy bundles, configure data, test policy decisions
Most infrastructure protocols work best with realistic default configurations. The smart defaults provide templates that match real-world deployments, reducing setup time.
Group H — Agent & Webhook Protocols
Protocols for agent-to-agent communication and external integrations.
| Protocol | Editor Type | Key Features |
|---|---|---|
| A2A | Entity card editor | Agent cards, skills, task handling, routing |
| ACP | Entity card editor | Agent capabilities, permissions, delegation rules |
| Webhooks | Entity card editor | Endpoints, payloads, delivery config, retry policies |
Using Agent & Webhook Editors
- Click New Entity to create agents, capabilities, or webhooks
- Configure entity properties:
- ID - Unique identifier
- Name - Display name
- Config - Type-specific settings
- For A2A (Agent-to-Agent):
- Define agent capabilities (skills)
- Configure routing rules
- Set up task handling behavior
- Define inter-agent protocols
- For ACP (Agent Capabilities):
- Define capabilities available to agents
- Set permission levels
- Configure delegation rules
- Define resource access
- For Webhooks:
- Set webhook URL pattern
- Configure request headers
- Define payload schema
- Set delivery and retry options
For webhook testing, configure retry policies with exponential backoff. For A2A, document the capability contract clearly so consuming agents understand the interface.
Mock Definition Editor
The Mock Definition Editor is the central interface for all protocol editors. It provides consistent features across all 30+ protocols.
Editor Modes
The editor supports two modes that work together:
Visual Mode
- Use protocol-specific editor (file tree, form, grid, etc.)
- Configuration updates automatically reflected in JSON
- Recommended for most use cases
JSON Mode
- Edit raw JSON directly
- Full control over all properties
- Use when visual editor doesn't support a feature
- Real-time validation and error highlighting
Switching Between Modes
- Look for Visual and JSON tabs at the top of the editor
- Click to switch modes
- Changes sync bidirectionally - edit in visual, see updates in JSON
- If JSON is invalid, visual mode is disabled until fixed
Save and Reload Options
After editing:
- Click Save Definition to persist changes
- Optionally enable Reload running server:
- Without reload: Changes apply to new requests only
- With reload: Existing connections are gracefully closed and reconnected with new config
- Click Cancel to discard changes
Reloading a running server briefly interrupts active connections. Schedule reloads during low-traffic periods for production mocks.
AI Mock Definition Generator
Quickly generate mock definitions using AI instead of building them manually.
Enabling AI Generation
- Look for AI Mock Definition Generator panel at the top of the editor
- Toggle Enable AI to expand the panel
- Requires the
ai_response_generationfeature flag to be enabled
Quick Templates
Choose a pre-built template matching your use case:
- E-commerce - Product catalog, shopping carts, orders, payments
- Healthcare - Patient records, prescriptions, appointments, billing
- Fintech - Accounts, transactions, transfers, fraud detection
- IoT - Sensor data, device management, telemetry, alerts
- Social Media - Users, posts, followers, messaging, notifications
Custom Prompt
Or write your own prompt describing the data structure:
"Generate a Kafka topic with 10 seed messages representing real-time stock price updates. Each message should include symbol, price, volume, and timestamp."
Generation Process
- Select template or write custom prompt
- Click Generate Preview to create a definition
- Review the JSON preview that appears:
- Check structure and data types
- Verify it matches your requirements
- Scroll through entire definition
- Click Use This Definition to apply to the visual editor
- Make any manual adjustments
- Click Save Definition
AI-generated definitions provide a good starting point but may need refinement. Always review generated content before deploying to production mocks.
JSON Fallback Editor
All protocols support direct JSON editing for maximum flexibility.
Accessing JSON Editor
- Click the JSON tab in the editor modal
- Full JSON editor appears with syntax highlighting
- Edit the definition directly
Features
- Syntax highlighting - Color-coded JSON structure
- Real-time validation - Error messages appear as you type
- Auto-formatting - Press Cmd+Shift+F (Mac) or Ctrl+Shift+F (Windows) to format
- Copy/paste - Copy JSON from other tools and paste here
- Keyboard shortcuts:
- Cmd+S (Mac) or Ctrl+S (Windows) - Save
- Esc - Cancel and close
- Cmd+Z (Mac) or Ctrl+Z (Windows) - Undo
JSON Schema Reference
Each protocol has a specific JSON schema. When editing JSON:
- Hover over fields for inline documentation
- Invalid fields show error tooltips
- Required fields are marked with asterisks
- Consult protocol documentation for full schema
JSON mode requires correct syntax. A single missing comma or bracket will prevent saving. Use the error messages to identify issues quickly.
Protocol Editor Examples
Example 1: MongoDB Collection with Documents
Scenario: Set up a mock MongoDB database for an e-commerce API.
- Click New Collection and name it "products"
- Configure collection schema:
_id(ObjectId) - Auto-generatedname(String)price(Number)inventory(Number)tags(Array of Strings)
- Click New Document and add sample products:
- Product 1: "Laptop", 999.99, 5 in stock, tags: ["electronics", "computers"]
- Product 2: "Mouse", 29.99, 50 in stock, tags: ["electronics", "accessories"]
- Create an index on the "name" field for search optimization
- Save the definition
Example 2: GraphQL API with Queries and Mutations
Scenario: Mock a social media GraphQL API.
- Paste GraphQL SDL schema:
type Query {
user(id: ID!): User
posts(limit: Int): [Post!]!
}
type Mutation {
createPost(input: CreatePostInput!): Post!
}
type User {
id: ID!
name: String!
email: String!
}
type Post {
id: ID!
title: String!
author: User!
createdAt: String!
}
input CreatePostInput {
title: String!
authorId: ID!
} - Click Validate Schema
- Configure resolver responses in the Method Grid:
user(id)returns sample user dataposts(limit)returns array of postscreatePostreturns newly created post
- Set response delays (e.g., 100ms) for realism
- Save the definition
Example 3: Kafka Topic with Seed Messages
Scenario: Simulate real-time order events.
- Click New Topic and name it "orders.events"
- Configure topic:
- Partitions: 3 (for parallelism)
- Retention: 7 days
- Add seed messages (one per partition):
- Message 1:
{"orderId": "ORD-001", "status": "created", "timestamp": "2026-02-21T10:30:00Z"} - Message 2:
{"orderId": "ORD-002", "status": "confirmed", "timestamp": "2026-02-21T10:31:00Z"} - Message 3:
{"orderId": "ORD-003", "status": "shipped", "timestamp": "2026-02-21T10:32:00Z"}
- Message 1:
- Save the definition
- Consumers can now subscribe and receive these seed messages
Best Practices
Design Principles
- Start with the template - Use quick templates or AI generation for initial structure
- Review and customize - Don't deploy AI-generated definitions without review
- Keep it realistic - Mock data should match production patterns
- Document intentions - Use descriptions to explain configuration choices
Editor Usage
- Visual when possible - Use the protocol-specific editor for most work
- JSON for fine-tuning - Switch to JSON for precise control
- Validate often - Check for errors before saving
- Test after changes - Verify mock behavior after updating definitions
Data Configuration
- Use realistic values - Test with data that matches production use cases
- Include edge cases - Add boundary value examples (min, max, null)
- Test error paths - Define error responses alongside happy paths
- Consider scale - Create enough sample data to exercise pagination, filtering, sorting
Troubleshooting
Definition Won't Save
- Check JSON syntax in JSON tab for errors
- Ensure all required fields are present
- Look for error messages below the editor
- Copy JSON to an online JSON validator for debugging
Visual Editor Shows Errors
- Switch to JSON mode to see exact error location
- Validate the JSON syntax
- Review the protocol's schema documentation
- Reset to a known-good state and make incremental changes
AI Generation Seems Off
- Review the generated definition carefully
- Verify the template or prompt matched your intent
- Edit the definition manually to correct issues
- AI provides starting points, not production-ready definitions
Changes Not Applying
- Click Save Definition after making changes
- Enable Reload running server if changes need immediate effect
- Check that the simulation is running
- Verify the protocol type matches expected protocol
Next Steps
- AI Features - Explore additional AI-powered capabilities
- Routes & Responses - Configure HTTP endpoints alongside protocols
- Managing Simulations - Learn simulation lifecycle and settings
- Environments - Reuse protocol configurations across simulations