<?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: I cant seem to get the api/v6/timeseries data with curl.  Can anyone post a snippet to get me go in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/I-cant-seem-to-get-the-api-v6-timeseries-data-with-curl-Can/m-p/15296#M2313</link>
    <description>&lt;P&gt;Thanks,&amp;nbsp; I was missing replacing&amp;nbsp; spaces with + signs in the select statement&lt;/P&gt;</description>
    <pubDate>Thu, 17 Jul 2014 17:12:09 GMT</pubDate>
    <dc:creator>ranks</dc:creator>
    <dc:date>2014-07-17T17:12:09Z</dc:date>
    <item>
      <title>I cant seem to get the api/v6/timeseries data with curl.  Can anyone post a snippet to get me going</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/I-cant-seem-to-get-the-api-v6-timeseries-data-with-curl-Can/m-p/15280#M2311</link>
      <description>&lt;P&gt;I cant seem to get the api/v6/timeseries data with curl. &amp;nbsp;Can anyone post a snippet to get me going&lt;/P&gt;&lt;P&gt;I have been able to get other data from the api, but everytime I try and use timeseries, I just get Http 400 bad request&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jul 2014 14:56:07 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/I-cant-seem-to-get-the-api-v6-timeseries-data-with-curl-Can/m-p/15280#M2311</guid>
      <dc:creator>ranks</dc:creator>
      <dc:date>2014-07-17T14:56:07Z</dc:date>
    </item>
    <item>
      <title>Re: I cant seem to get the api/v6/timeseries data with curl.  Can anyone post a snippet to get me go</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/I-cant-seem-to-get-the-api-v6-timeseries-data-with-curl-Can/m-p/15288#M2312</link>
      <description>&lt;P&gt;Hi ranks,&lt;BR /&gt;&lt;BR /&gt;In Cloudera Manager 5 and higher, every chart you see in the web UI will provide you a direct /timeseries URL showing exactly how that chart itself retrieved metrics with the /timeseries endpoint! You can grab this same URL and use it with curl.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Find any chart and click on the blue arrow that will appear at the top-right. Choose "Export JSON". This will open a new window with the location bar already populated. This URL is a fully-formatted /timeseries API endpoint! Feel free to use any of them as a springboard for your curl testing. I tried to post one here but the forum doesn't like the URL and won't let me post. However it'd look like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://community.cloudera.com/t5/image/serverpage/image-id/506i697CB234DA2A37F2/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" align="center" title="Home_-_Cloudera_Manager.png" alt="Home_-_Cloudera_Manager.png" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;IMG src="https://community.cloudera.com/t5/image/serverpage/image-id/508iDA20D1DF1A695357/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" align="center" title="url.png" alt="url.png" /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I can use this now directly with my curl command ($curl -v -u $USER:$PASS '$URL')&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;and I get json output as requested.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="andale mono,times"&gt;$ curl -v -u $USER:$PASS '&lt;A href="http://my.cluster.com:7180/api/v6/timeseries?query=select+cpu_percent_across_hosts+where+category+%3D+CLUSTER+and+clusterId+%3D+%221%22&amp;amp;contentType=application%2Fjson&amp;amp;from=2014-07-17T14%3A31%3A57.948Z&amp;amp;to=2014-07-17T15%3A01%3A57.948Z'" target="_blank"&gt;http://my.cluster.com:7180/api/v6/timeseries?query=select+cpu_percent_across_hosts+where+category+%3D+CLUSTER+and+clusterId+%3D+%221%22&amp;amp;contentType=application%2Fjson&amp;amp;from=2014-07-17T14%3A31%3A57.948Z&amp;amp;to=2014-07-17T15%3A01%3A57.948Z'&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 14px;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Hope this helps! Add -v and/or -i to your curl testing to get more information about the 400 error you're getting, as needed.&lt;BR /&gt;&lt;BR /&gt;--&lt;BR /&gt;Mark S.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jul 2014 15:23:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/I-cant-seem-to-get-the-api-v6-timeseries-data-with-curl-Can/m-p/15288#M2312</guid>
      <dc:creator>smark</dc:creator>
      <dc:date>2014-07-17T15:23:41Z</dc:date>
    </item>
    <item>
      <title>Re: I cant seem to get the api/v6/timeseries data with curl.  Can anyone post a snippet to get me go</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/I-cant-seem-to-get-the-api-v6-timeseries-data-with-curl-Can/m-p/15296#M2313</link>
      <description>&lt;P&gt;Thanks,&amp;nbsp; I was missing replacing&amp;nbsp; spaces with + signs in the select statement&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jul 2014 17:12:09 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/I-cant-seem-to-get-the-api-v6-timeseries-data-with-curl-Can/m-p/15296#M2313</guid>
      <dc:creator>ranks</dc:creator>
      <dc:date>2014-07-17T17:12:09Z</dc:date>
    </item>
  </channel>
</rss>

