ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ API Support » Problem with using Administrative Rest API

Post new topic  Reply to topic
 Problem with using Administrative Rest API « View previous topic :: View next topic » 
Author Message
liamf
PostPosted: Thu Jun 03, 2021 9:54 am    Post subject: Problem with using Administrative Rest API Reply with quote

Novice

Joined: 22 Apr 2021
Posts: 12

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
View user's profile Send private message
hughson
PostPosted: Thu Jun 03, 2021 12:55 pm    Post subject: Reply with quote

Padawan

Joined: 09 May 2013
Posts: 1914
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
View user's profile Send private message Visit poster's website
liamf
PostPosted: Thu Jun 03, 2021 6:02 pm    Post subject: Reply with quote

Novice

Joined: 22 Apr 2021
Posts: 12

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
View user's profile Send private message
hughson
PostPosted: Thu Jun 03, 2021 8:53 pm    Post subject: Reply with quote

Padawan

Joined: 09 May 2013
Posts: 1914
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
View user's profile Send private message Visit poster's website
liamf
PostPosted: Thu Jun 03, 2021 11:05 pm    Post subject: Reply with quote

Novice

Joined: 22 Apr 2021
Posts: 12

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
View user's profile Send private message
zpat
PostPosted: Fri Jun 04, 2021 10:03 pm    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5849
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
View user's profile Send private message
liamf
PostPosted: Sun Jun 06, 2021 2:10 am    Post subject: Reply with quote

Novice

Joined: 22 Apr 2021
Posts: 12

zpat wrote:
Morag is suggesting that you raise a case with IBM.



Hah,my bad.i will do it.

Thanks
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » Problem with using Administrative Rest API
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.