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 IndexIBM MQ API Supportpython get call to IBM MQ Rest

Post new topicReply to topic
python get call to IBM MQ Rest View previous topic :: View next topic
Author Message
vasilev
PostPosted: Fri Feb 19, 2021 3:26 am Post subject: python get call to IBM MQ Rest Reply with quote

Apprentice

Joined: 31 Oct 2014
Posts: 34
Location: Germany

Hello,
I am trying to get information about the qmanager in this way:

Code:
headers = {'Content-type': 'application/json', 'Accept': 'text/plain'}
    try:
        res = requests.get('https://website/ibmmq/rest/v1/admin/qmgr/'+qmgr+'/queue', auth=(usr, passwd), headers=headers)
        print(res)
    except requests.exceptions.RequestException as e: 
        print(e)


all i get is - <Response [406]>

the ibm-mq-rest-csrf-token is not necessary because I am making only GET.
please let me know what else I have to add as parameters.

thank you !
_________________
Regards
V.Vasilev
Back to top
View user's profile Send private message Visit poster's website
vasilev
PostPosted: Fri Feb 19, 2021 3:43 am Post subject: Reply with quote

Apprentice

Joined: 31 Oct 2014
Posts: 34
Location: Germany

for those with the same problem..
headers have been the problem


headers = {'Content-Type': 'text/plain', 'charset':'utf-8'}
_________________
Regards
V.Vasilev
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexIBM MQ API Supportpython get call to IBM MQ Rest
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.