title: Google API Explorer returns no Rows, Postman does with same query
body: <p>I have been working on a project to pull analytics data from the YouTube Analytics API (v1, v1beta1 provides the same results).  I began getting no rows returned in a batch call and, naturally, I suspected errors on my end.</p>
  
  <p>I recreated one of the queries from my program in the Google APIs Explorer to see where I may have gone wrong.  And that's where things got complicated.</p>
  
  <p>Note: I am using OAuth and executing my program and the API explorer with  OAuth authentication of the same user in all locations.  I have omitted the <code>Authorization Bearer [token]</code> details from this post for obvious reasons.</p>
  
  <p>Google API Explorer query:</p>
  
  <pre><code>GET https://www.googleapis.com/youtube/analytics/v1/reports?ids=channel%3D%3DMINE&amp;start-date=2016-05-01&amp;end-date=2016-05-31&amp;metrics=views%2CestimatedMinutesWatched&amp;dimensions=insightTrafficSourceType&amp;filters=video%3D%3DEeEHdFmKrGo%3Bcountry%3D%3DUS&amp;fields=rows&amp;key={YOUR_API_KEY}
  </code></pre>
  
  <p>Google API Explorer results:</p>
  
  <pre><code>200 HTTP/2.0 200
  
  - Show headers -
  
  {
  }
  </code></pre>
  
  <p>Postman query:</p>
  
  <pre><code>GET https://www.googleapis.com/youtube/analytics/v1/reports?ids=channel%3D%3DMINE&amp;start-date=2016-05-01&amp;end-date=2016-05-31&amp;metrics=views%2CestimatedMinutesWatched&amp;dimensions=insightTrafficSourceType&amp;filters=video%3D%3DEeEHdFmKrGo%3Bcountry%3D%3DUS&amp;fields=rows
  </code></pre>
  
  <p>Postman results:</p>
  
  <pre><code>{
    "rows": [
      [
        "YT_PLAYLIST_PAGE",
        83,
        153
      ],
      [
        "YT_CHANNEL",
        21,
        38
      ],
      [
        "PLAYLIST",
        103,
        193
      ],
      [
        "SUBSCRIBER",
        41,
        63
      ],
      [
        "NOTIFICATION",
        16,
        5
      ],
      [
        "ADVERTISING",
        1954,
        2973
      ],
      [
        "RELATED_VIDEO",
        179,
        294
      ],
      [
        "YT_OTHER_PAGE",
        16,
        20
      ],
      [
        "EXT_URL",
        98,
        189
      ],
      [
        "NO_LINK_OTHER",
        603,
        23
      ],
      [
        "YT_SEARCH",
        80,
        130
      ]
    ]
  }
  </code></pre>
  
  <p>So data <em>is</em> available.  Why does the API Explorer not show it?  The API Explorer matches the behavior of my program: no rows returned.</p>
  
  <p>Yes, if I omit the <code>fields</code> value, it will give me the column headers:</p>
  
  <pre><code>200 HTTP/2.0 200
  
  - Show headers -
  
  {
   "kind": "youtubeAnalytics#resultTable",
   "columnHeaders": [
    {
     "name": "insightTrafficSourceType",
     "columnType": "DIMENSION",
     "dataType": "STRING"
    },
    {
     "name": "views",
     "columnType": "METRIC",
     "dataType": "INTEGER"
    },
    {
     "name": "estimatedMinutesWatched",
     "columnType": "METRIC",
     "dataType": "INTEGER"
    }
   ]
  }
  </code></pre>
  
  <p>Other similar questions:</p>
  
  <ol>
  <li><a href="https://stackoverflow.com/questions/22884183/rows-not-returning-in-youtube-analytics-api">ROWS not returning in Youtube Analytics API?</a></li>
  <li><a href="https://stackoverflow.com/questions/30370161/youtube-analytics-api-doesnt-return-rows-for-query-for-a-specific-video">YouTube Analytics API doesn't return ROWS for query for a specific video</a></li>
  <li><a href="https://stackoverflow.com/questions/13977776/youtube-analytics-api-returns-no-rows-for-demographic-query-but-does-return-vi">YouTube Analytics API returns no rows for demographic query - but does return views</a></li>
  <li><a href="https://stackoverflow.com/questions/25147822/youtube-analytics-api-channel-the-response-has-no-rows-parameter">YouTube Analytics API channel: The response has no rows parameter</a></li>
  </ol>
  
  <p>I've verified some of the leads in these questions.</p>
  
  <ol>
  <li>I <em>am</em> getting data for the query... just not via batch nor the API explorer.</li>
  <li>Same as #1, really.  If I change or extend the date ranges, the API Explorer still returns no rows while Postman's query shows rows.</li>
  <li>See investigations for #4</li>
  <li>I can pull the report in the YouTube interface — as the same user being used for the API Explorer and my program — and see data.</li>
  </ol>
  
  <p><a href="https://i.stack.imgur.com/9FQdy.png" rel="nofollow noreferrer">YouTube Interface Screenshot</a></p>
  
  <p>This data matches what I get from Postman's query.  This implies that the same data should be available via the API Explorer and batch requests, however they obviously differ.</p>
  
  <p>Am missing something?  Shouldn't I receive rows in the response from the API Explorer?  Likewise, shouldn't a batch response contain the same contents as the direct <code>GET</code> request I'm seeing via Postman?</p>
  
  <p>Any insight or suggestions for further exploration appreciated.  If you've made it this far, thanks for your time.</p>
  
  <p>Garret</p>