DFA Reporting API . dimensionValues

Instance Methods

query(profileId, body, pageToken=None, maxResults=None)

Retrieves list of report dimension values for a list of filters.

query_next(previous_request, previous_response)

Retrieves the next page of results.

Method Details

query(profileId, body, pageToken=None, maxResults=None)
Retrieves list of report dimension values for a list of filters.

Args:
  profileId: string, The DFA user profile id. (required)
  body: object, The request body. (required)
    The object takes the form of:

{ # Represents a DimensionValuesRequest.
    "dimensionName": "A String", # The name of the dimension values should be requested for.
    "startDate": "A String", # The start date of the date range for which to retrieve dimension values. A string of the format: "yyyy-MM-dd".
    "kind": "dfareporting#dimensionValueRequest", # Kind of request this is, in this case dfareporting#dimensionValueRequest.
    "endDate": "A String", # The end date of the date range for which to retrieve dimension values. A string of the format: "yyyy-MM-dd".
    "filters": [ # List of filters to filter values by. The filters are ANDed.
      { # Represents a dimension filter.
        "dimensionName": "A String", # The name of the dimension to filter.
        "kind": "dfareporting#dimensionFilter", # Kind of resource this is, in this case dfareporting#dimensionFilter.
        "value": "A String", # The value of the dimension to filter for.
      },
    ],
  }

  pageToken: string, The value of the nextToken from the previous result page.
  maxResults: integer, Maximum number of results to return.

Returns:
  An object of the form:

    { # Represents the list of DimensionValue resources.
    "nextPageToken": "A String", # Continuation token used to page through dimension values. To retrieve the next page of results, set the next request's "pageToken" to the value of this field. The page token is only valid for a limited amount of time and should not be persisted.
    "items": [ # The dimension values returned in this response.
      { # Represents a DimensionValue resource.
        "dimensionName": "A String", # Name of the dimension.
        "kind": "dfareporting#dimensionValue", # Kind of resource this is, in this case dfareporting#dimensionValue.
        "etag": "A String", # ETag of this response for caching purposes.
        "id": "A String", # The ID associated with the value if available.
        "value": "A String", # The value of the dimension.
      },
    ],
    "kind": "dfareporting#dimensionValueList", # Kind of list this is, in this case dfareporting#dimensionValueList.
    "etag": "A String", # ETag of this response for caching purposes.
  }
query_next(previous_request, previous_response)
Retrieves the next page of results.

Args:
  previous_request: The request for the previous page. (required)
  previous_response: The response from the request for the previous page. (required)

Returns:
  A request object that you can call 'execute()' on to request the next
  page. Returns None if there are no more items in the collection.