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 » python get call to IBM MQ Rest

Post new topic  Reply 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

Acolyte

Joined: 31 Oct 2014
Posts: 58
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

Acolyte

Joined: 31 Oct 2014
Posts: 58
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
NiaSmith
PostPosted: Sun Oct 24, 2021 10:17 pm    Post subject: Reply with quote

Newbie

Joined: 23 Oct 2021
Posts: 2

Thanks for advice! it worked
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 » python 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.