virtual_services_messaging_virtual_service
Create, deploy, and manage messaging virtual services for IBM MQ, ActiveMQ, and Kafka to simulate broker interactions for testing.
Instructions
Operations on messaging virtual services.
Use this when a user needs to create, update, deploy, or manage a messaging virtual service.
Actions:
- read: Get full details of a virtual service.
args:
workspace_id (int): Mandatory.
id (int): Mandatory.
- list: List messaging virtual services.
args:
workspace_id (int): Mandatory.
serviceId (int): Optional. Filter by service.
limit (int, default=10): Max results (1–50).
offset (int, default=0): Pagination offset.
- create: Create a messaging virtual service for any supported protocol.
args:
workspace_id (int): Mandatory.
name (str): Mandatory.
serviceId (int): Mandatory.
harborId (str): Mandatory. Location harbor ID.
shipId (str): Mandatory. Location ship ID.
messagingProtocol (str): Mandatory. One of: IBM_MQ9_JMS, IBM_MQ9_NATIVE,
ACTIVE_MQ_CLASSIC, ACTIVE_MQ_ARTEMIS, KAFKA.
brokerConfig (dict): Mandatory. Protocol-specific connection config.Protocol-to-BrokerConfig field matrix: IBM_MQ9_JMS / IBM_MQ9_NATIVE: hostname, port (default "1414"), channel, queueManager, username, password, sslAuthentication, sslCipherSuite, queues, topics, subscriptions, flowConfigurations. ACTIVE_MQ_CLASSIC / ACTIVE_MQ_ARTEMIS: hostname, port (default "61616"), username, password, embeddedBroker, sslAuthentication, queues, topics, subscriptions, flowConfigurations. KAFKA: hostname, port (e.g. "broker1:9092,broker2:9092"), username (optional), password (optional), autoOffsetReset (earliest|latest|none), numPartitions, topics, flowConfigurations.
mockServiceTransactions (list): Optional. Transaction references [{txnId, priority, ...}].
mockServiceRecordings (list): Optional. Recording references [{recordingId, runtimeConfig}].
recorderConfig (dict): Optional. Live recording config {maxMessagesCount, maxMessagesPerSecondCount, mappings}.
priorityMode (str): Optional. DEFAULT or UNIQUE_PRIORITY.
responseDelay (dict): Optional. {type, fixedDelay} or {type, median, sigma} etc.
messagingRunnerEnabled (bool): Optional. Default true.
- update: Update an existing messaging virtual service (partial — only provided fields change).
args:
workspace_id (int): Mandatory.
id (int): Mandatory.
name (str): Optional.
serviceId (int): Optional.
harborId (str): Optional.
shipId (str): Optional.
messagingProtocol (str): Optional. Changing protocol requires a new brokerConfig.
brokerConfig (dict): Optional.
mockServiceTransactions (list): Optional.
mockServiceRecordings (list): Optional.
recorderConfig (dict): Optional.
priorityMode (str): Optional.
responseDelay (dict): Optional.
messagingRunnerEnabled (bool): Optional.
- create-mq9: (Legacy) Create an IBM MQ9 virtual service using named fields.
args:
workspace_id (int): Mandatory.
name (str): Mandatory.
serviceId (int): Mandatory.
harborId (str): Mandatory.
shipId (str): Mandatory.
mq9_broker_hostname (str): Mandatory.
mq9_broker_port (int): Mandatory.
mq9_broker_channel (str): Mandatory.
mq9_queue_manager (str): Mandatory.
mq9_queue_username (str): Mandatory.
mq9_queue_password (str): Mandatory.
- update-mq9: (Legacy) Update IBM MQ9 virtual service using named fields.
args: Same as create-mq9 but all optional except workspace_id and vs_id (int).
- deploy: Deploy a virtual service.
Action result contains trackingId. Use tracking tool to poll until FINISHED or FAILED.
args:
workspace_id (int): Mandatory.
id (int): Mandatory.
- stop: Stop a running virtual service.
Action result contains trackingId.
args:
workspace_id (int): Mandatory.
id (int): Mandatory.
- configure: Hot-reload transactions into a running virtual service.
Action result contains trackingId.
args:
workspace_id (int): Mandatory.
id (int): Mandatory.
- assign_transactions: Assign transactions to a messaging virtual service.
When the broker config uses flow configurations, pass flow_configuration so the
server can copy the named flow's routing (sourceName, sourceType, destinations)
onto every newly added transaction.
args:
workspace_id (int): Mandatory.
id (int): Mandatory.
transaction_ids (list[int]): Mandatory.
flow_configuration (str): Optional. Name of a flow in brokerConfig.flowConfigurations[].name.
Required when the VS uses flow-based routing — omitting it leaves transactions with
an empty MessagingTransactionMapping (no routing).
- unassign_transactions: Unassign transactions from a virtual service.
args:
workspace_id (int): Mandatory.
id (int): Mandatory.
transaction_ids (list[int]): Mandatory.
- assign_recordings: Assign recordings to a messaging virtual service.
args:
workspace_id (int): Mandatory.
id (int): Mandatory.
recording_ids (list[int]): Mandatory. IDs of recordings to assign.
- unassign_recordings: Unassign recordings from a messaging virtual service.
args:
workspace_id (int): Mandatory.
id (int): Mandatory.
recording_ids (list[int]): Mandatory. IDs of recordings to unassign.
- assign_configuration: Assign a configuration to a virtual service.
args:
workspace_id (int): Mandatory.
id (int): Mandatory.
configuration_id (int): Mandatory. Pass null to unassign.
- set_proxy: Set proxy configuration.
args:
workspace_id (int): Mandatory.
id (int): Mandatory.
proxyUrl (str): Mandatory.
nonProxyHosts (str): Optional.
username (str): Optional.
password (str): Optional.
certificate_id (int): Optional.
- unset_proxy: Remove proxy configuration.
args:
workspace_id (int): Mandatory.
id (int): Mandatory.
- assign_queue: Assign a queue to the virtual service.
args:
workspace_id (int): Mandatory.
id (int): Mandatory.
queue_name (str): Mandatory.
- assign_topic: Assign a topic to the virtual service.
args:
workspace_id (int): Mandatory.
id (int): Mandatory.
topic_name (str): Mandatory.
VirtualService schema:
{'$defs': {'AssignedAsset': {'properties': {'assetId': {'description': 'The identifier of the asset', 'title': 'Assetid', 'type': 'integer'}, 'assetUsageType': {'description': 'The usage type of the asset', 'title': 'Assetusagetype', 'type': 'string'}, 'alias': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'default': None, 'description': 'The asset certificate alias', 'title': 'Alias'}}, 'required': ['assetId', 'assetUsageType'], 'title': 'AssignedAsset', 'type': 'object'}, 'BrokerConfiguration': {'additionalProperties': True, 'properties': {'hostname': {'anyOf': [{'type': 'string'}, {'type': 'integer'}, {'type': 'null'}], 'default': None, 'description': 'Broker hostname', 'title': 'Hostname'}, 'port': {'anyOf': [{'type': 'string'}, {'type': 'integer'}, {'type': 'null'}], 'default': None, 'description': "Broker port (string). Use 'host:port,host:port' for Kafka multi-broker lists.", 'title': 'Port'}, 'channel': {'anyOf': [{'type': 'string'}, {'type': 'integer'}, {'type': 'null'}], 'default': None, 'description': 'IBM MQ channel name, e.g. SYSTEM.DEF.SVRCONN', 'title': 'Channel'}, 'queueManager': {'anyOf': [{'type': 'string'}, {'type': 'integer'}, {'type': 'null'}], 'default': None, 'description': 'IBM MQ queue manager name', 'title': 'Queuemanager'}, 'username': {'anyOf': [{'type': 'string'}, {'type': 'integer'}, {'type': 'null'}], 'default': None, 'description': 'Broker username', 'title': 'Username'}, 'password': {'anyOf': [{'type': 'string'}, {'type': 'integer'}, {'type': 'null'}], 'default': None, 'description': 'Broker password', 'title': 'Password'}, 'sslAuthentication': {'anyOf': [{'type': 'boolean'}, {'type': 'null'}], 'default': None, 'description': 'Enable SSL/TLS authentication', 'title': 'Sslauthentication'}, 'sslCipherSuite': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'default': None, 'description': 'SSL cipher suite (IBM MQ only), e.g. TLS_RSA_WITH_AES_256_CBC_SHA256', 'title': 'Sslciphersuite'}, 'embeddedBroker': {'anyOf': [{'type': 'boolean'}, {'type': 'null'}], 'default': None, 'description': 'Start an embedded broker — ACTIVE_MQ_CLASSIC and ARTEMIS only', 'title': 'Embeddedbroker'}, 'autoOffsetReset': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'default': None, 'description': 'Kafka offset reset strategy: earliest, latest, or none', 'title': 'Autooffsetreset'}, 'numPartitions': {'anyOf': [{'type': 'integer'}, {'type': 'null'}], 'default': None, 'description': 'Kafka number of partitions (default 1)', 'title': 'Numpartitions'}, 'queues': {'anyOf': [{'items': {'$ref': '#/$defs/BrokerQueue'}, 'type': 'array'}, {'type': 'null'}], 'default': [], 'description': 'List of queues', 'title': 'Queues'}, 'topics': {'anyOf': [{'items': {'$ref': '#/$defs/BrokerTopic'}, 'type': 'array'}, {'type': 'null'}], 'default': [], 'description': 'List of topics', 'title': 'Topics'}, 'subscriptions': {'anyOf': [{'items': {'$ref': '#/$defs/BrokerSubscription'}, 'type': 'array'}, {'type': 'null'}], 'default': [], 'description': 'List of subscriptions', 'title': 'Subscriptions'}, 'flowConfigurations': {'anyOf': [{'items': {'$ref': '#/$defs/FlowConfiguration'}, 'type': 'array'}, {'type': 'null'}], 'default': [], 'description': 'Broker-level flow routing configurations', 'title': 'Flowconfigurations'}}, 'title': 'BrokerConfiguration', 'type': 'object'}, 'BrokerQueue': {'properties': {'name': {'description': 'Queue name', 'title': 'Name', 'type': 'string'}}, 'required': ['name'], 'title': 'BrokerQueue', 'type': 'object'}, 'BrokerSubscription': {'properties': {'name': {'description': 'Subscription name', 'title': 'Name', 'type': 'string'}}, 'required': ['name'], 'title': 'BrokerSubscription', 'type': 'object'}, 'BrokerTopic': {'properties': {'name': {'description': 'Topic name', 'title': 'Name', 'type': 'string'}, 'isDurable': {'anyOf': [{'type': 'boolean'}, {'type': 'null'}], 'default': None, 'description': 'Whether the subscription is durable', 'title': 'Isdurable'}, 'durableSubscriptionName': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'default': None, 'description': 'Durable subscription name — required when isDurable=True', 'title': 'Durablesubscriptionname'}}, 'required': ['name'], 'title': 'BrokerTopic', 'type': 'object'}, 'Endpoint': {'properties': {'endpoint': {'description': 'Endpoint URL', 'title': 'Endpoint', 'type': 'string'}}, 'required': ['endpoint'], 'title': 'Endpoint', 'type': 'object'}, 'FlowConfiguration': {'properties': {'name': {'description': 'Flow configuration name', 'title': 'Name', 'type': 'string'}, 'transactionMapping': {'$ref': '#/$defs/FlowTransactionMapping', 'description': 'Source-to-destination routing for this flow'}}, 'required': ['name', 'transactionMapping'], 'title': 'FlowConfiguration', 'type': 'object'}, 'FlowTransactionMapping': {'properties': {'sourceName': {'description': 'Source queue/topic/subscription name', 'title': 'Sourcename', 'type': 'string'}, 'sourceType': {'description': 'Source type: QUEUE, TOPIC, or SUBSCRIPTION', 'title': 'Sourcetype', 'type': 'string'}, 'destinations': {'default': [], 'description': 'Destination list', 'items': {'$ref': '#/$defs/MessagingDestination'}, 'title': 'Destinations', 'type': 'array'}}, 'required': ['sourceName', 'sourceType'], 'title': 'FlowTransactionMapping', 'type': 'object'}, 'MessagingDestination': {'properties': {'destinationName': {'description': 'Destination name', 'title': 'Destinationname', 'type': 'string'}, 'destinationType': {'description': 'Destination type: QUEUE, TOPIC, or SUBSCRIPTION', 'title': 'Destinationtype', 'type': 'string'}}, 'required': ['destinationName', 'destinationType'], 'title': 'MessagingDestination', 'type': 'object'}, 'MockServiceRecording': {'properties': {'recordingId': {'description': 'ID of the recording to include in this virtual service', 'title': 'Recordingid', 'type': 'integer'}, 'runtimeConfig': {'anyOf': [{'$ref': '#/$defs/ReplayConfig'}, {'type': 'null'}], 'default': None, 'description': 'Replay configuration for this recording'}}, 'required': ['recordingId'], 'title': 'MockServiceRecording', 'type': 'object'}, 'MockServiceTransaction': {'properties': {'txnId': {'description': 'Transaction id.', 'title': 'Txnid', 'type': 'integer'}, 'priority': {'default': 10, 'description': 'Transaction Priority. If not specified, defaults to 10.', 'title': 'Priority', 'type': 'integer'}, 'destinations': {'anyOf': [{'items': {'$ref': '#/$defs/MessagingDestination'}, 'type': 'array'}, {'type': 'null'}], 'default': [], 'description': 'List of messaging destinations.', 'title': 'Destinations'}}, 'required': ['txnId'], 'title': 'MockServiceTransaction', 'type': 'object'}, 'ProxyConfiguration': {'additionalProperties': True, 'properties': {'proxyUrl': {'description': 'Proxy url', 'title': 'Proxyurl', 'type': 'string'}, 'nonProxyHosts': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'default': None, 'description': 'Non proxy hosts, | separated', 'title': 'Nonproxyhosts'}, 'username': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'description': 'Proxy username', 'title': 'Username'}, 'password': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'description': 'Proxy password', 'title': 'Password'}, 'certificateId': {'anyOf': [{'type': 'integer'}, {'type': 'null'}], 'default': None, 'description': 'Certificate asset identifier', 'title': 'Certificateid'}}, 'required': ['proxyUrl', 'username', 'password'], 'title': 'ProxyConfiguration', 'type': 'object'}, 'RecorderConfig': {'additionalProperties': True, 'properties': {'maxMessagesCount': {'anyOf': [{'type': 'integer'}, {'type': 'null'}], 'default': None, 'description': 'Maximum number of messages to capture per recording session', 'title': 'Maxmessagescount'}, 'maxMessagesPerSecondCount': {'anyOf': [{'type': 'integer'}, {'type': 'null'}], 'default': None, 'description': 'Rate limit for capturing messages per second', 'title': 'Maxmessagespersecondcount'}, 'mappings': {'anyOf': [{'items': {'$ref': '#/$defs/RecorderMapping'}, 'type': 'array'}, {'type': 'null'}], 'default': [], 'description': 'Inbound/outbound destination mappings for recording', 'title': 'Mappings'}}, 'title': 'RecorderConfig', 'type': 'object'}, 'RecorderMapping': {'properties': {'inboundDestination': {'description': 'Source destination to record from', 'title': 'Inbounddestination', 'type': 'string'}, 'outboundDestination': {'description': 'Destination to replay captured messages to', 'title': 'Outbounddestination', 'type': 'string'}, 'originType': {'description': 'Origin type: QUEUE, TOPIC, or SUBSCRIPTION', 'title': 'Origintype', 'type': 'string'}}, 'required': ['inboundDestination', 'outboundDestination', 'originType'], 'title': 'RecorderMapping', 'type': 'object'}, 'ReplayConfig': {'additionalProperties': True, 'properties': {'replayCount': {'anyOf': [{'type': 'integer'}, {'type': 'null'}], 'default': 1, 'description': 'Number of times to replay the recording', 'title': 'Replaycount'}, 'delayBetweenReplays': {'anyOf': [{'type': 'integer'}, {'type': 'null'}], 'default': 0, 'description': 'Delay in ms between replays', 'title': 'Delaybetweenreplays'}, 'initialDelay': {'anyOf': [{'type': 'integer'}, {'type': 'null'}], 'default': 0, 'description': 'Initial delay in ms before the first replay', 'title': 'Initialdelay'}}, 'title': 'ReplayConfig', 'type': 'object'}, 'ResponseDelay': {'additionalProperties': True, 'properties': {'type': {'default': 'FIXED', 'description': 'Delay type: FIXED, LOGNORMAL, or UNIFORM', 'title': 'Type', 'type': 'string'}, 'fixedDelay': {'anyOf': [{'type': 'integer'}, {'type': 'null'}], 'default': None, 'description': 'Fixed delay in ms (FIXED type)', 'title': 'Fixeddelay'}, 'median': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Median for LOGNORMAL distribution', 'title': 'Median'}, 'sigma': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Sigma for LOGNORMAL distribution', 'title': 'Sigma'}, 'lower': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Lower bound for UNIFORM distribution', 'title': 'Lower'}, 'upper': {'anyOf': [{'type': 'number'}, {'type': 'null'}], 'default': None, 'description': 'Upper bound for UNIFORM distribution', 'title': 'Upper'}}, 'title': 'ResponseDelay', 'type': 'object'}}, 'properties': {'id': {'description': 'The unique identifier of the virtual service', 'title': 'Id', 'type': 'integer'}, 'name': {'description': 'The name of the virtual service', 'title': 'Name', 'type': 'string'}, 'status': {'default': '', 'description': 'The status of the virtual service', 'title': 'Status', 'type': 'string'}, 'serviceId': {'description': 'The unique identifier of the service where the virtual service belongs', 'title': 'Serviceid', 'type': 'integer'}, 'type': {'description': "Type of the virtual service. Possible values are 'TRANSACTIONAL' and 'MESSAGING'. Transactional virtual services are used for simulating user interactions with web applications, while messaging virtual services are used for simulating message-based interactions.", 'title': 'Type', 'type': 'string'}, 'harborId': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'default': None, 'description': 'Location harbor identifier', 'title': 'Harborid'}, 'shipId': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'default': None, 'description': 'Location ship identifier', 'title': 'Shipid'}, 'configurationId': {'anyOf': [{'type': 'integer'}, {'type': 'null'}], 'default': None, 'description': 'Configuration identifier', 'title': 'Configurationid'}, 'noMatchingRequestPreference': {'description': "For transactional virtual services, defines the behavior when no matching request is found. Possible values are 'return404' and 'bypasslive'.", 'title': 'Nomatchingrequestpreference', 'type': 'string'}, 'endpointPreference': {'description': "For transactional virtual services, defines endpoint schema. Possible values are 'HTTP' and 'HTTPS'.", 'title': 'Endpointpreference', 'type': 'string'}, 'replicas': {'default': 1, 'description': 'The number of replicas for the virtual service. Always set to 1.', 'title': 'Replicas', 'type': 'integer'}, 'mockServiceTransactions': {'anyOf': [{'items': {'$ref': '#/$defs/MockServiceTransaction'}, 'type': 'array'}, {'type': 'null'}], 'default': [], 'description': 'List of transaction definitions associated with the virtual service', 'title': 'Mockservicetransactions'}, 'mockServiceRecordings': {'anyOf': [{'items': {'$ref': '#/$defs/MockServiceRecording'}, 'type': 'array'}, {'type': 'null'}], 'default': [], 'description': 'List of recording references associated with the virtual service', 'title': 'Mockservicerecordings'}, 'endpoints': {'anyOf': [{'items': {'$ref': '#/$defs/Endpoint'}, 'type': 'array'}, {'type': 'null'}], 'default': [], 'description': 'List of virtual service endpoints. Available after deployment only.', 'title': 'Endpoints'}, 'httpRunnerEnabled': {'default': True, 'description': "Http runner enabled flag, must be enabled for virtual services with 'TRANSACTIONAL' type.", 'title': 'Httprunnerenabled', 'type': 'boolean'}, 'messagingRunnerEnabled': {'anyOf': [{'type': 'boolean'}, {'type': 'null'}], 'default': None, 'description': "Messaging runner enabled flag for 'MESSAGING' type virtual services.", 'title': 'Messagingrunnerenabled'}, 'messagingProtocol': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'default': None, 'description': 'Messaging broker protocol. One of: IBM_MQ9_JMS, IBM_MQ9_NATIVE, ACTIVE_MQ_CLASSIC, ACTIVE_MQ_ARTEMIS, KAFKA.', 'title': 'Messagingprotocol'}, 'priorityMode': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'default': None, 'description': 'Transaction selection mode: DEFAULT or UNIQUE_PRIORITY.', 'title': 'Prioritymode'}, 'responseDelay': {'anyOf': [{'$ref': '#/$defs/ResponseDelay'}, {'type': 'null'}], 'default': None, 'description': 'Global response delay applied to all transactions in this virtual service.'}, 'recorderConfig': {'anyOf': [{'$ref': '#/$defs/RecorderConfig'}, {'type': 'null'}], 'default': None, 'description': 'Configuration for recording live broker traffic.'}, 'classPathJars': {'anyOf': [{'additionalProperties': True, 'type': 'object'}, {'type': 'null'}], 'default': None, 'description': 'Custom broker JAR paths, e.g. {"paths": ["string"]}.', 'title': 'Classpathjars'}, 'proxy': {'anyOf': [{'$ref': '#/$defs/ProxyConfiguration'}, {'type': 'null'}], 'default': None, 'description': 'Proxy configuration for the virtual service'}, 'brokerConfig': {'anyOf': [{'$ref': '#/$defs/BrokerConfiguration'}, {'type': 'null'}], 'default': None, 'description': 'Messaging broker connection configuration'}, 'assets': {'anyOf': [{'items': {'$ref': '#/$defs/AssignedAsset'}, 'type': 'array'}, {'type': 'null'}], 'default': None, 'description': 'List of assets', 'title': 'Assets'}}, 'required': ['id', 'name', 'serviceId', 'type', 'noMatchingRequestPreference', 'endpointPreference'], 'title': 'VirtualService', 'type': 'object'}
Action result schema:
{'properties': {'tracking_id': {'description': 'Action tracking id', 'title': 'Tracking Id', 'type': 'string'}}, 'required': ['tracking_id'], 'title': 'ActionResult', 'type': 'object'}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | Yes | ||
| action | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| info | No | Info messages | |
| error | No | Error message | |
| total | No | Total available records | |
| result | No | Result | |
| warning | No | Warning messages | |
| has_more | No | More records per page to list |