MQWeb
Administrating WebSphere MQ with your browser.
ChannelController
The second part of the URI must be channel
to call the ChannelController.
This controller can be used to get information from a channel.
copy
Create a new channel by copying attributes from another channel.
This action will execute MQCMD_COPY_CHANNEL. On success the
JSON response object will have an empty data
array, on failure an error
object.
URL Parameters
api/channel/copy/<QueueManager>/<FromChannelName>/<ToChannelName>
QueueManager
The name of the queuemanager. This parameter is required.
FromChannelName
The name of a channel to copy from. This parameter is optional if you use the corresponding query parameter.
ToChannelName
The name of the new channel. This parameter is optional if you use the corresponding query parameter.
ChannelType
The type of a channel. ChannelType must be Sender
, Server
,
Receiver
, Requester
, Server-connection
, Client-connection
,
Cluster-receiver
or Cluster-sender
. This value is case-sensitive.
This parameter is optional if you use the corresponding query parameter.
Query Parameters
All query parameters are copied as attribute for the channel. FromChannelName, ToChannelName and ChannelType are required. When a POST request is used, all query parameters will be ignored.
/api/channel/copy/PIGEON/CL.MQWEB.01/CL.MQWEB.01?ChannelType=ServerConnection
JSON Object
When using an application/json POST request you can post a JSON object to create a queue. All URL parameters (except queuemanager) and query parameters are ignored.
create
Create a new channel. This action will execute MQCMD_CREATE_CHANNEL. On success
the JSON response object will have an empty data
array, on failure an error
object.
URL Parameters
api/queue/create/<QueueManager>/<ChannelName>/<ChannelType>
QueueManager
The name of the queuemanager. This parameter is required.
ChannelName
The name of a channel. This parameter is optional if you use the corresponding query parameter.
ChannelType
The type of a channel. ChannelType must be Sender
, Server
,
Receiver
, Requester
, Server-connection
, Client-connection
,
Cluster-receiver
or Cluster-sender
. This value is case-sensitive.
This parameter is optional if you use the corresponding query parameter.
Query Parameters
All query parameters are copied as attribute for the channel. ChannelName and ChannelType are required. If a channelname is passed on the URL, the ChannelName query parameter will be ignored. If a channeltype is passed on the URL, the ChannelType query parameter will be ignored.
JSON Object
When using an application/json POST request you can post a JSON object to create a channel. All URL parameters (except queuemanager) and query parameters are ignored.
inquire
Get information about one or more channels. This action executes the
MQCMD_INQUIRE_CHANNEL pcf command. On success, the returned JSON object will
have a data
array, on failure an error
object.
URL Parameters
/api/channel/inquire/<QueueManager>/<ChannelName>/<ChannelType>
QueueManager
The name of the queuemanager. This parameter is required!
ChannelName
The name of a channel. Generic names are supported. When this parameter is used, query parameters are ignored. This parameter is optional.
ChannelType
The type of the channel. ChannelType must be All
, Sender
, Server
,
Receiver
, Requester
, Server-connection
, Client-connection
,
Cluster-receiver
or Cluster-sender
. This value is case-sensitive.
Query Parameters
ChannelAttrs
With the ChannelAttrs parameter you can specify which attributes must be returned from the PCF command. Multiple occurences of this parameter are possible. The value must be a (case-sensitive) valid attribute name.
Attrs is a synonym for ChannelAttrs
ChannelName
The name of a channel. Generic names are supported. This parameter is ignored
when a channelname is passed as URL parameter. When
this parameter is omitted, * will be used. name
is a synonym for this
parameter.
ChannelType
ChannelType must be All
, Sender
, Server
, Receiver
, Requester
,
Server-connection
, Client-connection
, Cluster-receiver
or
Cluster-sender
. This value is case-sensitive. When channel type is passed as
URL parameter, this query parameter is ignored.
CommandScope
Specifies how the command is executed when the queuemanager is a member of a queue-sharing group. This parameter applies to z/OS only.
DefaultChannelDisposition
This parameter is not allowed for Client-connection channels and only applies
to z/OS. Possible values are All
, Private
or Shared
. It Specifies the
disposition of the channels for which information is to be returned.
ExcludeSystem
When value is true
, all channels with a name starting with SYSTEM. will be
discarded. This parameter is optional. By default the value is set to false
.
Filter
Speficies which filter to use: I
means Integerfilter, S
means Stringfilter.
FilterParam and FilterValue are required to create the filter. When a
filter can’t be build because of too little information, it will be silently
discarded.
FilterOp
The operator that is being used to evaluate whether the parameter satisfies the filter-value.
The default is EQ
.
The following values are allowed:
GT
: Greater thanLT
: Less thanEQ
: Equal toNE
: Not equal toNLT
: Not less thanNGT
: Not greater thanLE
: Less than or equal toGE
: Greater than or equal toCT
: ContainsEX
: Excludes
A Stringfilter can use some additional operators:
LK
: Matches a generic stringNL
: Does not match a generic stringCTG
: Contains an item which matches a generic stringEXG
: Does not contain any item which matches a generic string.
FilterParam
The name of the parameter to filter on. The names are based on the names used in the WebSphere MQ information center.
FilterValue
The value to use for filtering. When a string is passed for an Integerfilter, a WebSphere MQ constant is assumed.
QSGDisposition
Disposition of the object within the group. Possible values are Live
, Copy
,
Group
, QMgr
, Private
or All
. This parameter applies to z/OS only.
Example
/api/channel/inquire/PIGEON
/api/channel/inquire/PIGEON/CL.*
/api/channel/inquire/PIGEON?ChannelName=CL.*
JSON Object
When using an application/json POST request you can post a JSON object with names like the query parameters.
All URL parameters and query parameters are ignored except for the URL parameter for the name of the queuemanager.
There are some differences between query parameters and a JSON object:
- JSON property names are case-sensitive
- ChannelName is a mandatory property. No default values is used.
- ChannelAttrs is a JSON array with attributenames as element.
- A filter is an object: IntegerFilterCommand can be used to filter on parameters which has integer values, while StringFilterCommand can be used to filter on parameters with string values. The filter object has these three properties: Parameter (see FilterParam), Operator (see FilterOp) and FilterValue (see FilterValue).
An IntegerFilterCommand can’t be used together with a StringFilterCommand
This sample is a Perl script that inquires all channels starting with SYSTEM
and only returns the channelname and connectionname (if available):
start
Starts a channel. This action will execute MQCMD_START_CHANNEL.
On success the JSON response object will have an empty data
array,
on failure an error
object.
URL Parameters
api/channel/start/<QueueManager>/<ChannelName>
QueueManager
The name of the queuemanager. This parameter is required.
ChannelName
The name of a channel to start. This parameter is optional if you use the corresponding query parameter.
Query Parameters
CommandScope
Specifies how the command is executed when the queuemanager is a member of a queue-sharing group. This parameter applies to z/OS only.
ChannelDisposition
Specifies the disposition of the channels to be started.
Possible values are Private
, Shared
, or FixShared
.
This parameter applies to z/OS only.
stop
Stops a channel by. This action will execute MQCMD_STOP_CHANNEL.
On success the JSON response object will have an empty data
array,
on failure an error
object.
URL Parameters
api/channel/start/<QueueManager>/<ChannelName>
QueueManager
The name of the queuemanager. This parameter is required.
ChannelName
The name of a channel to start. This parameter is optional if you use the corresponding query parameter.
Query Parameters
CommandScope
Specifies how the command is executed when the queuemanager is a member of a queue-sharing group. This parameter applies to z/OS only.
ChannelDisposition
Specifies the disposition of the channels to be started.
Possible values are Private
, Shared
, or FixShared
.
This parameter applies to z/OS only.
ChannelStatus
The new state of the channel after the command is executed.
Possible values are Inactive
or Stopped
.
ConnectionName
This parameter is the connection name of the channel to be stopped.
Mode
How the channel must be stopped. Possible values are Quiesce
, Force
or Terminate
.
QMgrName
This parameter is the name of the remote queue manager to which the channel is connected.
remove
Removes a channel. This action will execute MQCMD_DELETE_CHANNEL. On success the
JSON response object will have an empty data
array, on failure an error
object.
URL Parameters
api/queue/remove/<QueueManager>/<QName>
QueueManager
The name of the queuemanager. This parameter is required.
ChannelName
The name of the channel to remove. This parameter is optional when the ChannelName is passed as query parameter.
Query Parameters
ChannelName
The name of the channel to remove.
ChannelTable
Specifies the ownership of the channel definition table that contains the
specified channel definition. Possible values are QMgr
or Client-connection
.
ChannelType
The type of a channel. ChannelType must be Sender
, Server
,
Receiver
, Requester
, Server-connection
, Client-connection
,
Cluster-receiver
or Cluster-sender
. This value is case-sensitive.
This parameter is optional if you use the corresponding query parameter.
CommandScope
Specifies how the command is executed when the queue manager is a member of a queue-sharing group. This parameter applies to z/OS only.
QSGDisposition
Disposition of the object within the group. Possible values are Live
, Copy
,
Group
, QMgr
, Private
or All
. This parameter applies to z/OS only.