|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Problem with using Administrative Rest API |
« View previous topic :: View next topic » |
Author |
Message
|
liamf |
Posted: Thu Jun 03, 2021 9:54 am Post subject: Problem with using Administrative Rest API |
|
|
Novice
Joined: 22 Apr 2021 Posts: 13
|
I am trying to use the mq administrative rest api to retrieve the channel infomation.Follow the instruction of the MQ 9.2. I use a http post request to send a mqsc command with Json.Below is the example:
The Request URL:
Code: |
http://[i]hostname:port[/i]/ibmmq/rest/v2/admin/action/qmgr/[i]qmgrName[/i]/mqsc
|
The MQSC Command in Json
Code: |
{
"type": "runCommandJSON",
"command": "display",
"qualifier": "channel",
"name": "*",
"parameters": {
"chltype": "svrconn"
},
"responseParameters": ["all"]
}
|
After i sent the request, the reponse seems to be strange.
when i run the same MQSC Command on the Linux System using runmqsc command. MQ will return a channel param and a chltype param. But those two params were shown like this in Http response.
Code: |
"def.svrconn) chltype": "SVRCONN"
|
It looks like that MQ have split those params or values in a wrong position.
What cause this kind of problem?
and how should i solve it.
Please help, thanks. |
|
Back to top |
|
 |
hughson |
Posted: Thu Jun 03, 2021 12:55 pm Post subject: |
|
|
 Padawan
Joined: 09 May 2013 Posts: 1959 Location: Bay of Plenty, New Zealand
|
Is that the entire response or have you parsed it somewhat already?
Cheers,
Morag _________________ Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software |
|
Back to top |
|
 |
liamf |
Posted: Thu Jun 03, 2021 6:02 pm Post subject: |
|
|
Novice
Joined: 22 Apr 2021 Posts: 13
|
hughson wrote: |
Is that the entire response or have you parsed it somewhat already?
Cheers,
Morag |
I use API development tool to test these request, either Postman or SoapUI will return the same result.
Below is the request body:
Code: |
{
"type": "runCommandJSON",
"command": "display",
"qualifier": "channel",
"name": "SYSTEM.AUTO.SVRCONN",
"parameters": {
"chltype": "svrconn"
},
"responseParameters": ["all"]
}
|
And the entire response:
Code: |
{
"commandResponse": [
{
"completionCode": 0,
"parameters": {
"altdate": "2021-03-08",
"alttime": "16.09.03",
"auto.svrconn) chltype": "SVRCONN",
"certlabl": "",
"comphdr": [
"NONE"
],
"compmsg": [
"NONE"
],
"descr": "Auto-defined by",
"discint": 0,
"hbint": 300,
"kaint": "AUTO",
"maxinst": 999999999,
"maxinstc": 999999999,
"maxmsgl": 4194304,
"mcauser": "",
"monchl": "QMGR",
"rcvdata": [],
"rcvexit": [],
"scydata": "",
"scyexit": "",
"senddata": [],
"sendexit": [],
"sharecnv": 10,
"sslcauth": "REQUIRED",
"sslciph": "",
"sslpeer": "",
"trptype": "TCP"
},
"reasonCode": 0
}
],
"overallCompletionCode": 0,
"overallReasonCode": 0
}
|
|
|
Back to top |
|
 |
hughson |
Posted: Thu Jun 03, 2021 8:53 pm Post subject: |
|
|
 Padawan
Joined: 09 May 2013 Posts: 1959 Location: Bay of Plenty, New Zealand
|
That looks like a defect to me. I would raise a case with IBM.
Cheers,
Morag _________________ Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software |
|
Back to top |
|
 |
liamf |
Posted: Thu Jun 03, 2021 11:05 pm Post subject: |
|
|
Novice
Joined: 22 Apr 2021 Posts: 13
|
hughson wrote: |
That looks like a defect to me. I would raise a case with IBM.
Cheers,
Morag |
Thank you !
I would use runCommand type instead of runCommandJSON type.
Please remind me if there is a solution of this issue.
Thank you again. |
|
Back to top |
|
 |
zpat |
Posted: Fri Jun 04, 2021 10:03 pm Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Morag is suggesting that you raise a case with IBM.
 _________________ Well, I don't think there is any question about it. It can only be attributable to human error. This sort of thing has cropped up before, and it has always been due to human error. |
|
Back to top |
|
 |
liamf |
Posted: Sun Jun 06, 2021 2:10 am Post subject: |
|
|
Novice
Joined: 22 Apr 2021 Posts: 13
|
zpat wrote: |
Morag is suggesting that you raise a case with IBM.
 |
Hah,my bad.i will do it.
Thanks |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|