IBM WebSphere · Capability
IBM MQ REST API — Messages
IBM MQ REST API — Messages. 4 operations. Lead operation: Send a Message to a Queue. Self-contained Naftiko capability covering one Websphere business surface.
What You Can Do
POST
Sendmessage
— Send a Message to a Queue
/v1/messaging/qmgr/{qmgrname}/queue/{queuename}/message
GET
Browsemessages
— Browse Messages on a Queue
/v1/messaging/qmgr/{qmgrname}/queue/{queuename}/message
DELETE
Receivemessage
— Receive (destructively Get) a Message
/v1/messaging/qmgr/{qmgrname}/queue/{queuename}/message
POST
Publishmessage
— Publish a Message to a Topic
/v1/messaging/qmgr/{qmgrname}/topic/{topicstring}/message
MCP Tools
send-message-queue
Send a Message to a Queue
browse-messages-queue
Browse Messages on a Queue
read-only
idempotent
receive-destructively-get-message
Receive (destructively Get) a Message
idempotent
publish-message-topic
Publish a Message to a Topic
Capability Spec
naftiko: 1.0.0-alpha2
info:
label: IBM MQ REST API — Messages
description: 'IBM MQ REST API — Messages. 4 operations. Lead operation: Send a Message to a Queue. Self-contained Naftiko
capability covering one Websphere business surface.'
tags:
- Websphere
- Messages
created: '2026-05-19'
modified: '2026-05-19'
binds:
- namespace: env
keys:
WEBSPHERE_API_KEY: WEBSPHERE_API_KEY
capability:
consumes:
- type: http
namespace: mq-rest-messages
baseUri: https://localhost:9443/ibmmq/rest/v2
description: IBM MQ REST API — Messages business capability. Self-contained, no shared references.
resources:
- name: messaging-qmgr-qmgrName-queue-queueName-message
path: /messaging/qmgr/{qmgrName}/queue/{queueName}/message
operations:
- name: sendmessage
method: POST
description: Send a Message to a Queue
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: ibm-mq-md-correlationId
in: header
type: string
description: Correlation ID for the message
- name: ibm-mq-md-expiry
in: header
type: integer
description: Message expiry in tenths of a second
- name: ibm-mq-md-persistence
in: header
type: string
description: Message persistence
- name: ibm-mq-md-replyTo
in: header
type: string
description: Reply-to queue name
- name: body
in: body
type: object
description: Request body (JSON).
required: true
- name: browsemessages
method: GET
description: Browse Messages on a Queue
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: limit
in: query
type: integer
description: Maximum number of messages to browse
- name: ibm-mq-md-messageId
in: header
type: string
description: Filter by message ID
- name: ibm-mq-md-correlationId
in: header
type: string
description: Filter by correlation ID
- name: receivemessage
method: DELETE
description: Receive (destructively Get) a Message
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: wait
in: query
type: integer
description: Wait time in milliseconds for a message
- name: ibm-mq-md-messageId
in: header
type: string
description: Filter by message ID
- name: ibm-mq-md-correlationId
in: header
type: string
description: Filter by correlation ID
- name: messaging-qmgr-qmgrName-topic-topicString-message
path: /messaging/qmgr/{qmgrName}/topic/{topicString}/message
operations:
- name: publishmessage
method: POST
description: Publish a Message to a Topic
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: topicString
in: path
type: string
description: Topic string to publish to
required: true
- name: body
in: body
type: object
description: Request body (JSON).
required: true
authentication:
type: apikey
key: LtpaToken2
value: '{{env.WEBSPHERE_API_KEY}}'
placement: cookie
exposes:
- type: rest
namespace: mq-rest-messages-rest
port: 8080
description: REST adapter for IBM MQ REST API — Messages. One Spectral-compliant resource per consumed operation, prefixed
with /v1.
resources:
- path: /v1/messaging/qmgr/{qmgrname}/queue/{queuename}/message
name: messaging-qmgr-qmgrname-queue-queuename-message
description: REST surface for messaging-qmgr-qmgrName-queue-queueName-message.
operations:
- method: POST
name: sendmessage
description: Send a Message to a Queue
call: mq-rest-messages.sendmessage
with:
ibm-mq-md-correlationId: rest.ibm-mq-md-correlationId
ibm-mq-md-expiry: rest.ibm-mq-md-expiry
ibm-mq-md-persistence: rest.ibm-mq-md-persistence
ibm-mq-md-replyTo: rest.ibm-mq-md-replyTo
body: rest.body
outputParameters:
- type: object
mapping: $.
- method: GET
name: browsemessages
description: Browse Messages on a Queue
call: mq-rest-messages.browsemessages
with:
limit: rest.limit
ibm-mq-md-messageId: rest.ibm-mq-md-messageId
ibm-mq-md-correlationId: rest.ibm-mq-md-correlationId
outputParameters:
- type: object
mapping: $.
- method: DELETE
name: receivemessage
description: Receive (destructively Get) a Message
call: mq-rest-messages.receivemessage
with:
wait: rest.wait
ibm-mq-md-messageId: rest.ibm-mq-md-messageId
ibm-mq-md-correlationId: rest.ibm-mq-md-correlationId
outputParameters:
- type: object
mapping: $.
- path: /v1/messaging/qmgr/{qmgrname}/topic/{topicstring}/message
name: messaging-qmgr-qmgrname-topic-topicstring-message
description: REST surface for messaging-qmgr-qmgrName-topic-topicString-message.
operations:
- method: POST
name: publishmessage
description: Publish a Message to a Topic
call: mq-rest-messages.publishmessage
with:
topicString: rest.topicString
body: rest.body
outputParameters:
- type: object
mapping: $.
- type: mcp
namespace: mq-rest-messages-mcp
port: 9090
transport: http
description: MCP adapter for IBM MQ REST API — Messages. One tool per consumed operation, routed inline through this capability's
consumes block.
tools:
- name: send-message-queue
description: Send a Message to a Queue
hints:
readOnly: false
destructive: false
idempotent: false
call: mq-rest-messages.sendmessage
with:
ibm-mq-md-correlationId: tools.ibm-mq-md-correlationId
ibm-mq-md-expiry: tools.ibm-mq-md-expiry
ibm-mq-md-persistence: tools.ibm-mq-md-persistence
ibm-mq-md-replyTo: tools.ibm-mq-md-replyTo
body: tools.body
outputParameters:
- type: object
mapping: $.
- name: browse-messages-queue
description: Browse Messages on a Queue
hints:
readOnly: true
destructive: false
idempotent: true
call: mq-rest-messages.browsemessages
with:
limit: tools.limit
ibm-mq-md-messageId: tools.ibm-mq-md-messageId
ibm-mq-md-correlationId: tools.ibm-mq-md-correlationId
outputParameters:
- type: object
mapping: $.
- name: receive-destructively-get-message
description: Receive (destructively Get) a Message
hints:
readOnly: false
destructive: true
idempotent: true
call: mq-rest-messages.receivemessage
with:
wait: tools.wait
ibm-mq-md-messageId: tools.ibm-mq-md-messageId
ibm-mq-md-correlationId: tools.ibm-mq-md-correlationId
outputParameters:
- type: object
mapping: $.
- name: publish-message-topic
description: Publish a Message to a Topic
hints:
readOnly: false
destructive: false
idempotent: false
call: mq-rest-messages.publishmessage
with:
topicString: tools.topicString
body: tools.body
outputParameters:
- type: object
mapping: $.