My Business
2.9K members online now
2.9K members online now
For developers who are using the Google My Business API to manage locations
Guide Me
star_border
Reply

Requesting reportInsights daily aggregation

[ Edited ]
Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I'm using the "AGGREGATED_DAILY" metric option for just a basicRequest. Here is my request body (redacting location names):

{
    "locationNames": [
        "accounts/ACCOUNT_NUM/locations/LOC_NUM"
    ],
    "basicRequest": {
        "metricRequests": [
            {
                "metric": "ALL",
                "options": [
                    "AGGREGATED_DAILY"
                ]
            }
        ],
        "timeRange": {
            "startTime": "2017-07-10T00:00:00.000000000Z",
            "endTime": "2017-07-11T00:00:00.000000000Z"
        }
    }
}

The confusion is in the response body:

 

{
  "locationMetrics": [
    {
      "locationName": "accounts/account_num/locations/loc_num", 
      "timeZone": "Australia/Sydney", 
      "metricValues": [
        {
          "metric": "QUERIES_DIRECT", 
          "totalValue": {
            "timeDimension": {
              "timeRange": {
                "endTime": "2017-07-11T00:00:00Z", 
                "startTime": "2017-07-10T00:00:00Z"
              }
            }, 
            "metricOption": "AGGREGATED_TOTAL", 
            "value": "76"
          }, 
          "dimensionalValues": [
            {
              "timeDimension": {
                "timeRange": {
                  "startTime": "2017-07-10T14:00:00Z"
                }
              }, 
              "metricOption": "AGGREGATED_DAILY", 
              "value": "76"
            }
          ]
        },
...
I'm trying to get 1 day's worth of data, from 2017-07-10T00:00:00Z to 2017-07-11T00:00:00Z. In the "dimensionalValues" property, why is the startTime 2017-07-10T14:00:00Z, 2:00 PM? Shouldn't it be 2017-07-10T00:00:00Z, 12:00 AM? I thought this offset of 14 hours would be due to the Sydney, Australia time, but that's only an offset of 10 hours. And why isn't there an endTime in the timeRange for my single dimensionalValue?

 

 
Also, why is totalValue in the response? I didn't set my metric option to  "AGGREGATED_TOTAL".
I'm not sure if I'm missing anything, but I can't accurately collect a full day's data when it starts from 2:00 PM.
1 Expert replyverified_user

Re: Requesting reportInsights daily aggregation

Google Employee
# 2
Google Employee

Hi @Reid C,

 

We are looking into discrepancy in dimensionalValues for the reportInsights when using the Google My Business API and will get back to you shortly.

 

Thanks,

Shalini, The Google My Business API team