<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: How to get full POST response in python API? in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-get-full-POST-response-in-python-API/m-p/24592#M4854</link>
    <description>&lt;P&gt;The length of the message is restricted to 32 characters, see [1] in the python API&lt;/P&gt;&lt;P&gt;To get the full POST/GET you can replace the line with&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;self._client.logger.debug("%s Got response: %s%s" % (method, body, ""))&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[1]&amp;nbsp;&lt;A href="https://github.com/cloudera/cm_api/blob/master/python/src/cm_api/resource.py#L70-L72" target="_blank"&gt;https://github.com/cloudera/cm_api/blob/master/python/src/cm_api/resource.py#L70-L72&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 12 Feb 2015 11:25:58 GMT</pubDate>
    <dc:creator>michalis</dc:creator>
    <dc:date>2015-02-12T11:25:58Z</dc:date>
    <item>
      <title>How to get full POST response in python API?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-get-full-POST-response-in-python-API/m-p/24290#M4853</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I enable debug logging in python scripts for installing and configuring the cluster.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;import logging

logging.basicConfig(format='%(asctime)s [%(levelname)s] [%(name)s][%(funcName)s:%(lineno)d] - %(message)s', level=logging.DEBUG)
logger = logging.getLogger(__name__)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In http_client response I get only partial output printed:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;2015-01-29 18:22:40,660 [DEBUG] [cm_api.http_client][execute:157] - GET http://cdm1b.ECS-Site-1.comverse.com:7180/api/v6/commands/153
2015-01-29 18:22:40,670 [DEBUG] [cm_api.http_client][invoke:72] - GET Got response: {
  "id" : 153,
  "name" : "Enab...
2015-01-29 18:22:45,676 [DEBUG] [cm_api.http_client][execute:157] - GET http://cdm1b.ECS-Site-1.comverse.com:7180/api/v6/commands/153
2015-01-29 18:22:45,686 [DEBUG] [cm_api.http_client][invoke:72] - GET Got response: {
  "id" : 153,
  "name" : "Enab...
2015-01-29 18:22:45,687 [DEBUG] [cm_api.http_client][execute:157] - POST http://cdm1b.ECS-Site-1.comverse.com:7180/api/v6/clusters/ECS-HBASE/services/yarn/commands/start
2015-01-29 18:22:46,281 [DEBUG] [cm_api.http_client][invoke:72] - POST Got response: {
  "id" : 161,
  "name" : "Yarn...
2015-01-29 18:22:46,281 [DEBUG] [cm_api.http_client][execute:157] - GET http://cdm1b.ECS-Site-1.comverse.com:7180/api/v6/commands/153&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I get full response in the output ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 09:20:49 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-get-full-POST-response-in-python-API/m-p/24290#M4853</guid>
      <dc:creator>Gregory Danenberg</dc:creator>
      <dc:date>2022-09-16T09:20:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to get full POST response in python API?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-get-full-POST-response-in-python-API/m-p/24592#M4854</link>
      <description>&lt;P&gt;The length of the message is restricted to 32 characters, see [1] in the python API&lt;/P&gt;&lt;P&gt;To get the full POST/GET you can replace the line with&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;self._client.logger.debug("%s Got response: %s%s" % (method, body, ""))&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[1]&amp;nbsp;&lt;A href="https://github.com/cloudera/cm_api/blob/master/python/src/cm_api/resource.py#L70-L72" target="_blank"&gt;https://github.com/cloudera/cm_api/blob/master/python/src/cm_api/resource.py#L70-L72&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Feb 2015 11:25:58 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-get-full-POST-response-in-python-API/m-p/24592#M4854</guid>
      <dc:creator>michalis</dc:creator>
      <dc:date>2015-02-12T11:25:58Z</dc:date>
    </item>
  </channel>
</rss>

