Returns the operations Resource.
Returns the results Resource.
Close httplib2 connections.
create(parent, body=None, x__xgafv=None)
Creates a `Report` object.
Deletes a `Report` object.
Retrieves a `Report` object.
list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, skip=None, x__xgafv=None)
Lists `Report` objects.
list_next(previous_request, previous_response)
Retrieves the next page of results.
patch(name, body=None, updateMask=None, x__xgafv=None)
Updates a `Report` object.
run(name, body=None, x__xgafv=None)
Initiates the execution of an existing report asynchronously. Users can get the report by polling this operation using `OperationsService.GetOperation`. Poll every 5 seconds initially, with an exponential backoff. Once a report is complete, the operation will contain a `RunReportResponse` in its response field containing a report_result that can be passed to the `FetchReportResultRows` method to retrieve the report data.
close()
Close httplib2 connections.
create(parent, body=None, x__xgafv=None)
Creates a `Report` object.
Args:
parent: string, Required. The parent resource where this `Report` will be created. Format: `agencies/{account_id}` (required)
body: object, The request body.
The object takes the form of:
{ # The `Report` resource.
"createTime": "A String", # Output only. The instant this report was created.
"displayName": "A String", # Optional. Display name for the report.
"locale": "A String", # Output only. The locale of this report. Locale is set from the user's locale at the time of the request. Locale can't be modified.
"name": "A String", # Identifier. The resource name of the report. Report resource name have the form: `agencies/{account_id}/reports/{report_id}`
"reportDefinition": { # The definition of how a report should be run. # Required. The report definition of the report.
"currencyCode": "A String", # Optional. The ISO 4217 currency code for this report. Defaults to account currency code if not specified.
"dateRange": { # A date range for a report. # Required. The primary date range of this report.
"fixed": { # A date range between two fixed dates (inclusive of end date). # A fixed date range.
"endDate": { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Required. The end date (inclusive) of this date range.
"day": 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.
"month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
"year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
},
"startDate": { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Required. The start date of this date range.
"day": 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.
"month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
"year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
},
},
"relative": "A String", # A relative date range.
},
"dimensions": [ # Required. The list of dimensions to report on. If empty, the report will have no dimensions, and any metrics will be totals.
"A String",
],
"filters": [ # Optional. The filters for this report.
{ # A filter over one or more fields.
"andFilter": { # A list of filters. # A list of filters whose results are AND-ed.
"filters": [ # Required. A list of filters.
# Object with schema name: Filter
],
},
"fieldFilter": { # A filter on a specific field. # A filter on a single field.
"field": { # A dimension or a metric in a report. # Required. The field to filter on.
"dimension": "A String", # The dimension this field represents.
"metric": "A String", # The metric this field represents.
},
"operation": "A String", # Required. The operation of this filter.
"values": [ # Required. Values to filter to.
{ # Represents a single value in a report.
"boolValue": True or False, # For boolean values.
"bytesValue": "A String", # For bytes values.
"doubleListValue": { # A list of double values. # For lists of double values.
"values": [ # The values
3.14,
],
},
"doubleValue": 3.14, # For double values.
"intListValue": { # A list of integer values. # For lists of integer values.
"values": [ # The values
"A String",
],
},
"intValue": "A String", # For integer values.
"stringListValue": { # A list of string values. # For lists of string values.
"values": [ # The values
"A String",
],
},
"stringValue": "A String", # For string values.
},
],
},
"notFilter": # Object with schema name: Filter # A filter whose result is negated.
"orFilter": { # A list of filters. # A list of filters whose results are OR-ed.
"filters": [ # Required. A list of filters.
# Object with schema name: Filter
],
},
},
],
"metrics": [ # Required. The list of metrics to report on. If empty, the report will have no metrics.
"A String",
],
"sorts": [ # Optional. Default sorts to apply to this report.
{ # Represents a sorting in a report.
"descending": True or False, # Optional. The sort order. If true the sort will be descending.
"field": { # A dimension or a metric in a report. # Required. A field (dimension or metric) to sort by.
"dimension": "A String", # The dimension this field represents.
"metric": "A String", # The metric this field represents.
},
},
],
"timeZone": "A String", # Optional. If time_zone_source is PROVIDED, this is the time zone to use for this report. Leave empty for any other time zone source. Time zone in IANA format. For example, "America/New_York".
"timeZoneSource": "A String", # Optional. Where to get the time zone for this report. Defaults to using the Pacific time zone (PT). If source is PROVIDED, the time_zone field in the report definition must also set a time zone.
},
"reportId": "A String", # Output only. Report ID.
"updateTime": "A String", # Output only. The instant this report was last modified.
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # The `Report` resource.
"createTime": "A String", # Output only. The instant this report was created.
"displayName": "A String", # Optional. Display name for the report.
"locale": "A String", # Output only. The locale of this report. Locale is set from the user's locale at the time of the request. Locale can't be modified.
"name": "A String", # Identifier. The resource name of the report. Report resource name have the form: `agencies/{account_id}/reports/{report_id}`
"reportDefinition": { # The definition of how a report should be run. # Required. The report definition of the report.
"currencyCode": "A String", # Optional. The ISO 4217 currency code for this report. Defaults to account currency code if not specified.
"dateRange": { # A date range for a report. # Required. The primary date range of this report.
"fixed": { # A date range between two fixed dates (inclusive of end date). # A fixed date range.
"endDate": { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Required. The end date (inclusive) of this date range.
"day": 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.
"month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
"year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
},
"startDate": { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Required. The start date of this date range.
"day": 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.
"month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
"year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
},
},
"relative": "A String", # A relative date range.
},
"dimensions": [ # Required. The list of dimensions to report on. If empty, the report will have no dimensions, and any metrics will be totals.
"A String",
],
"filters": [ # Optional. The filters for this report.
{ # A filter over one or more fields.
"andFilter": { # A list of filters. # A list of filters whose results are AND-ed.
"filters": [ # Required. A list of filters.
# Object with schema name: Filter
],
},
"fieldFilter": { # A filter on a specific field. # A filter on a single field.
"field": { # A dimension or a metric in a report. # Required. The field to filter on.
"dimension": "A String", # The dimension this field represents.
"metric": "A String", # The metric this field represents.
},
"operation": "A String", # Required. The operation of this filter.
"values": [ # Required. Values to filter to.
{ # Represents a single value in a report.
"boolValue": True or False, # For boolean values.
"bytesValue": "A String", # For bytes values.
"doubleListValue": { # A list of double values. # For lists of double values.
"values": [ # The values
3.14,
],
},
"doubleValue": 3.14, # For double values.
"intListValue": { # A list of integer values. # For lists of integer values.
"values": [ # The values
"A String",
],
},
"intValue": "A String", # For integer values.
"stringListValue": { # A list of string values. # For lists of string values.
"values": [ # The values
"A String",
],
},
"stringValue": "A String", # For string values.
},
],
},
"notFilter": # Object with schema name: Filter # A filter whose result is negated.
"orFilter": { # A list of filters. # A list of filters whose results are OR-ed.
"filters": [ # Required. A list of filters.
# Object with schema name: Filter
],
},
},
],
"metrics": [ # Required. The list of metrics to report on. If empty, the report will have no metrics.
"A String",
],
"sorts": [ # Optional. Default sorts to apply to this report.
{ # Represents a sorting in a report.
"descending": True or False, # Optional. The sort order. If true the sort will be descending.
"field": { # A dimension or a metric in a report. # Required. A field (dimension or metric) to sort by.
"dimension": "A String", # The dimension this field represents.
"metric": "A String", # The metric this field represents.
},
},
],
"timeZone": "A String", # Optional. If time_zone_source is PROVIDED, this is the time zone to use for this report. Leave empty for any other time zone source. Time zone in IANA format. For example, "America/New_York".
"timeZoneSource": "A String", # Optional. Where to get the time zone for this report. Defaults to using the Pacific time zone (PT). If source is PROVIDED, the time_zone field in the report definition must also set a time zone.
},
"reportId": "A String", # Output only. Report ID.
"updateTime": "A String", # Output only. The instant this report was last modified.
}
delete(name, x__xgafv=None)
Deletes a `Report` object.
Args:
name: string, Required. Resource name of the report to delete. Format: `agencies/{account_id}/reports/{report_id}` (required)
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
}
get(name, x__xgafv=None)
Retrieves a `Report` object.
Args:
name: string, Required. The resource name of the report. Format: `agencies/{account_id}/reports/{report_id}` (required)
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # The `Report` resource.
"createTime": "A String", # Output only. The instant this report was created.
"displayName": "A String", # Optional. Display name for the report.
"locale": "A String", # Output only. The locale of this report. Locale is set from the user's locale at the time of the request. Locale can't be modified.
"name": "A String", # Identifier. The resource name of the report. Report resource name have the form: `agencies/{account_id}/reports/{report_id}`
"reportDefinition": { # The definition of how a report should be run. # Required. The report definition of the report.
"currencyCode": "A String", # Optional. The ISO 4217 currency code for this report. Defaults to account currency code if not specified.
"dateRange": { # A date range for a report. # Required. The primary date range of this report.
"fixed": { # A date range between two fixed dates (inclusive of end date). # A fixed date range.
"endDate": { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Required. The end date (inclusive) of this date range.
"day": 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.
"month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
"year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
},
"startDate": { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Required. The start date of this date range.
"day": 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.
"month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
"year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
},
},
"relative": "A String", # A relative date range.
},
"dimensions": [ # Required. The list of dimensions to report on. If empty, the report will have no dimensions, and any metrics will be totals.
"A String",
],
"filters": [ # Optional. The filters for this report.
{ # A filter over one or more fields.
"andFilter": { # A list of filters. # A list of filters whose results are AND-ed.
"filters": [ # Required. A list of filters.
# Object with schema name: Filter
],
},
"fieldFilter": { # A filter on a specific field. # A filter on a single field.
"field": { # A dimension or a metric in a report. # Required. The field to filter on.
"dimension": "A String", # The dimension this field represents.
"metric": "A String", # The metric this field represents.
},
"operation": "A String", # Required. The operation of this filter.
"values": [ # Required. Values to filter to.
{ # Represents a single value in a report.
"boolValue": True or False, # For boolean values.
"bytesValue": "A String", # For bytes values.
"doubleListValue": { # A list of double values. # For lists of double values.
"values": [ # The values
3.14,
],
},
"doubleValue": 3.14, # For double values.
"intListValue": { # A list of integer values. # For lists of integer values.
"values": [ # The values
"A String",
],
},
"intValue": "A String", # For integer values.
"stringListValue": { # A list of string values. # For lists of string values.
"values": [ # The values
"A String",
],
},
"stringValue": "A String", # For string values.
},
],
},
"notFilter": # Object with schema name: Filter # A filter whose result is negated.
"orFilter": { # A list of filters. # A list of filters whose results are OR-ed.
"filters": [ # Required. A list of filters.
# Object with schema name: Filter
],
},
},
],
"metrics": [ # Required. The list of metrics to report on. If empty, the report will have no metrics.
"A String",
],
"sorts": [ # Optional. Default sorts to apply to this report.
{ # Represents a sorting in a report.
"descending": True or False, # Optional. The sort order. If true the sort will be descending.
"field": { # A dimension or a metric in a report. # Required. A field (dimension or metric) to sort by.
"dimension": "A String", # The dimension this field represents.
"metric": "A String", # The metric this field represents.
},
},
],
"timeZone": "A String", # Optional. If time_zone_source is PROVIDED, this is the time zone to use for this report. Leave empty for any other time zone source. Time zone in IANA format. For example, "America/New_York".
"timeZoneSource": "A String", # Optional. Where to get the time zone for this report. Defaults to using the Pacific time zone (PT). If source is PROVIDED, the time_zone field in the report definition must also set a time zone.
},
"reportId": "A String", # Output only. Report ID.
"updateTime": "A String", # Output only. The instant this report was last modified.
}
list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, skip=None, x__xgafv=None)
Lists `Report` objects.
Args:
parent: string, Required. The parent, which owns this collection of reports. Format: `agencies/{account_id}` (required)
filter: string, Optional. Expression to filter the response. See syntax details at https://developers.google.com/ad-manager/api/beta/filters
orderBy: string, Optional. Expression to specify sorting order. See syntax details at https://developers.google.com/ad-manager/api/beta/filters#order
pageSize: integer, Optional. The maximum number of `Reports` to return. The service may return fewer than this value. If unspecified, at most 50 `Reports` will be returned. The maximum value is 1000; values greater than 1000 will be coerced to 1000.
pageToken: string, Optional. A page token, received from a previous `ListReports` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListReports` must match the call that provided the page token.
skip: integer, Optional. Number of individual resources to skip while paginating.
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Response object for `ListReportsResponse` containing matching `Report` objects.
"nextPageToken": "A String", # A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.
"reports": [ # The `Report` objects from the specified network.
{ # The `Report` resource.
"createTime": "A String", # Output only. The instant this report was created.
"displayName": "A String", # Optional. Display name for the report.
"locale": "A String", # Output only. The locale of this report. Locale is set from the user's locale at the time of the request. Locale can't be modified.
"name": "A String", # Identifier. The resource name of the report. Report resource name have the form: `agencies/{account_id}/reports/{report_id}`
"reportDefinition": { # The definition of how a report should be run. # Required. The report definition of the report.
"currencyCode": "A String", # Optional. The ISO 4217 currency code for this report. Defaults to account currency code if not specified.
"dateRange": { # A date range for a report. # Required. The primary date range of this report.
"fixed": { # A date range between two fixed dates (inclusive of end date). # A fixed date range.
"endDate": { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Required. The end date (inclusive) of this date range.
"day": 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.
"month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
"year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
},
"startDate": { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Required. The start date of this date range.
"day": 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.
"month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
"year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
},
},
"relative": "A String", # A relative date range.
},
"dimensions": [ # Required. The list of dimensions to report on. If empty, the report will have no dimensions, and any metrics will be totals.
"A String",
],
"filters": [ # Optional. The filters for this report.
{ # A filter over one or more fields.
"andFilter": { # A list of filters. # A list of filters whose results are AND-ed.
"filters": [ # Required. A list of filters.
# Object with schema name: Filter
],
},
"fieldFilter": { # A filter on a specific field. # A filter on a single field.
"field": { # A dimension or a metric in a report. # Required. The field to filter on.
"dimension": "A String", # The dimension this field represents.
"metric": "A String", # The metric this field represents.
},
"operation": "A String", # Required. The operation of this filter.
"values": [ # Required. Values to filter to.
{ # Represents a single value in a report.
"boolValue": True or False, # For boolean values.
"bytesValue": "A String", # For bytes values.
"doubleListValue": { # A list of double values. # For lists of double values.
"values": [ # The values
3.14,
],
},
"doubleValue": 3.14, # For double values.
"intListValue": { # A list of integer values. # For lists of integer values.
"values": [ # The values
"A String",
],
},
"intValue": "A String", # For integer values.
"stringListValue": { # A list of string values. # For lists of string values.
"values": [ # The values
"A String",
],
},
"stringValue": "A String", # For string values.
},
],
},
"notFilter": # Object with schema name: Filter # A filter whose result is negated.
"orFilter": { # A list of filters. # A list of filters whose results are OR-ed.
"filters": [ # Required. A list of filters.
# Object with schema name: Filter
],
},
},
],
"metrics": [ # Required. The list of metrics to report on. If empty, the report will have no metrics.
"A String",
],
"sorts": [ # Optional. Default sorts to apply to this report.
{ # Represents a sorting in a report.
"descending": True or False, # Optional. The sort order. If true the sort will be descending.
"field": { # A dimension or a metric in a report. # Required. A field (dimension or metric) to sort by.
"dimension": "A String", # The dimension this field represents.
"metric": "A String", # The metric this field represents.
},
},
],
"timeZone": "A String", # Optional. If time_zone_source is PROVIDED, this is the time zone to use for this report. Leave empty for any other time zone source. Time zone in IANA format. For example, "America/New_York".
"timeZoneSource": "A String", # Optional. Where to get the time zone for this report. Defaults to using the Pacific time zone (PT). If source is PROVIDED, the time_zone field in the report definition must also set a time zone.
},
"reportId": "A String", # Output only. Report ID.
"updateTime": "A String", # Output only. The instant this report was last modified.
},
],
"totalSize": 42, # Total number of `Report` objects. If a filter was included in the request, this reflects the total number after the filtering is applied. `total_size` won't be calculated in the response unless it has been included in a response field mask. The response field mask can be provided to the method by using the URL parameter `$fields` or `fields`, or by using the HTTP/gRPC header `X-Goog-FieldMask`. For more information, see https://developers.google.com/ad-manager/api/beta/field-masks
}
list_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.
patch(name, body=None, updateMask=None, x__xgafv=None)
Updates a `Report` object.
Args:
name: string, Identifier. The resource name of the report. Report resource name have the form: `agencies/{account_id}/reports/{report_id}` (required)
body: object, The request body.
The object takes the form of:
{ # The `Report` resource.
"createTime": "A String", # Output only. The instant this report was created.
"displayName": "A String", # Optional. Display name for the report.
"locale": "A String", # Output only. The locale of this report. Locale is set from the user's locale at the time of the request. Locale can't be modified.
"name": "A String", # Identifier. The resource name of the report. Report resource name have the form: `agencies/{account_id}/reports/{report_id}`
"reportDefinition": { # The definition of how a report should be run. # Required. The report definition of the report.
"currencyCode": "A String", # Optional. The ISO 4217 currency code for this report. Defaults to account currency code if not specified.
"dateRange": { # A date range for a report. # Required. The primary date range of this report.
"fixed": { # A date range between two fixed dates (inclusive of end date). # A fixed date range.
"endDate": { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Required. The end date (inclusive) of this date range.
"day": 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.
"month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
"year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
},
"startDate": { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Required. The start date of this date range.
"day": 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.
"month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
"year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
},
},
"relative": "A String", # A relative date range.
},
"dimensions": [ # Required. The list of dimensions to report on. If empty, the report will have no dimensions, and any metrics will be totals.
"A String",
],
"filters": [ # Optional. The filters for this report.
{ # A filter over one or more fields.
"andFilter": { # A list of filters. # A list of filters whose results are AND-ed.
"filters": [ # Required. A list of filters.
# Object with schema name: Filter
],
},
"fieldFilter": { # A filter on a specific field. # A filter on a single field.
"field": { # A dimension or a metric in a report. # Required. The field to filter on.
"dimension": "A String", # The dimension this field represents.
"metric": "A String", # The metric this field represents.
},
"operation": "A String", # Required. The operation of this filter.
"values": [ # Required. Values to filter to.
{ # Represents a single value in a report.
"boolValue": True or False, # For boolean values.
"bytesValue": "A String", # For bytes values.
"doubleListValue": { # A list of double values. # For lists of double values.
"values": [ # The values
3.14,
],
},
"doubleValue": 3.14, # For double values.
"intListValue": { # A list of integer values. # For lists of integer values.
"values": [ # The values
"A String",
],
},
"intValue": "A String", # For integer values.
"stringListValue": { # A list of string values. # For lists of string values.
"values": [ # The values
"A String",
],
},
"stringValue": "A String", # For string values.
},
],
},
"notFilter": # Object with schema name: Filter # A filter whose result is negated.
"orFilter": { # A list of filters. # A list of filters whose results are OR-ed.
"filters": [ # Required. A list of filters.
# Object with schema name: Filter
],
},
},
],
"metrics": [ # Required. The list of metrics to report on. If empty, the report will have no metrics.
"A String",
],
"sorts": [ # Optional. Default sorts to apply to this report.
{ # Represents a sorting in a report.
"descending": True or False, # Optional. The sort order. If true the sort will be descending.
"field": { # A dimension or a metric in a report. # Required. A field (dimension or metric) to sort by.
"dimension": "A String", # The dimension this field represents.
"metric": "A String", # The metric this field represents.
},
},
],
"timeZone": "A String", # Optional. If time_zone_source is PROVIDED, this is the time zone to use for this report. Leave empty for any other time zone source. Time zone in IANA format. For example, "America/New_York".
"timeZoneSource": "A String", # Optional. Where to get the time zone for this report. Defaults to using the Pacific time zone (PT). If source is PROVIDED, the time_zone field in the report definition must also set a time zone.
},
"reportId": "A String", # Output only. Report ID.
"updateTime": "A String", # Output only. The instant this report was last modified.
}
updateMask: string, Optional. The list of fields to update.
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # The `Report` resource.
"createTime": "A String", # Output only. The instant this report was created.
"displayName": "A String", # Optional. Display name for the report.
"locale": "A String", # Output only. The locale of this report. Locale is set from the user's locale at the time of the request. Locale can't be modified.
"name": "A String", # Identifier. The resource name of the report. Report resource name have the form: `agencies/{account_id}/reports/{report_id}`
"reportDefinition": { # The definition of how a report should be run. # Required. The report definition of the report.
"currencyCode": "A String", # Optional. The ISO 4217 currency code for this report. Defaults to account currency code if not specified.
"dateRange": { # A date range for a report. # Required. The primary date range of this report.
"fixed": { # A date range between two fixed dates (inclusive of end date). # A fixed date range.
"endDate": { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Required. The end date (inclusive) of this date range.
"day": 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.
"month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
"year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
},
"startDate": { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Required. The start date of this date range.
"day": 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.
"month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
"year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
},
},
"relative": "A String", # A relative date range.
},
"dimensions": [ # Required. The list of dimensions to report on. If empty, the report will have no dimensions, and any metrics will be totals.
"A String",
],
"filters": [ # Optional. The filters for this report.
{ # A filter over one or more fields.
"andFilter": { # A list of filters. # A list of filters whose results are AND-ed.
"filters": [ # Required. A list of filters.
# Object with schema name: Filter
],
},
"fieldFilter": { # A filter on a specific field. # A filter on a single field.
"field": { # A dimension or a metric in a report. # Required. The field to filter on.
"dimension": "A String", # The dimension this field represents.
"metric": "A String", # The metric this field represents.
},
"operation": "A String", # Required. The operation of this filter.
"values": [ # Required. Values to filter to.
{ # Represents a single value in a report.
"boolValue": True or False, # For boolean values.
"bytesValue": "A String", # For bytes values.
"doubleListValue": { # A list of double values. # For lists of double values.
"values": [ # The values
3.14,
],
},
"doubleValue": 3.14, # For double values.
"intListValue": { # A list of integer values. # For lists of integer values.
"values": [ # The values
"A String",
],
},
"intValue": "A String", # For integer values.
"stringListValue": { # A list of string values. # For lists of string values.
"values": [ # The values
"A String",
],
},
"stringValue": "A String", # For string values.
},
],
},
"notFilter": # Object with schema name: Filter # A filter whose result is negated.
"orFilter": { # A list of filters. # A list of filters whose results are OR-ed.
"filters": [ # Required. A list of filters.
# Object with schema name: Filter
],
},
},
],
"metrics": [ # Required. The list of metrics to report on. If empty, the report will have no metrics.
"A String",
],
"sorts": [ # Optional. Default sorts to apply to this report.
{ # Represents a sorting in a report.
"descending": True or False, # Optional. The sort order. If true the sort will be descending.
"field": { # A dimension or a metric in a report. # Required. A field (dimension or metric) to sort by.
"dimension": "A String", # The dimension this field represents.
"metric": "A String", # The metric this field represents.
},
},
],
"timeZone": "A String", # Optional. If time_zone_source is PROVIDED, this is the time zone to use for this report. Leave empty for any other time zone source. Time zone in IANA format. For example, "America/New_York".
"timeZoneSource": "A String", # Optional. Where to get the time zone for this report. Defaults to using the Pacific time zone (PT). If source is PROVIDED, the time_zone field in the report definition must also set a time zone.
},
"reportId": "A String", # Output only. Report ID.
"updateTime": "A String", # Output only. The instant this report was last modified.
}
run(name, body=None, x__xgafv=None)
Initiates the execution of an existing report asynchronously. Users can get the report by polling this operation using `OperationsService.GetOperation`. Poll every 5 seconds initially, with an exponential backoff. Once a report is complete, the operation will contain a `RunReportResponse` in its response field containing a report_result that can be passed to the `FetchReportResultRows` method to retrieve the report data.
Args:
name: string, Required. The report to run. Format: `agencies/{account_id}/reports/{report_id}` (required)
body: object, The request body.
The object takes the form of:
{ # Request message for a running a report.
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # This resource represents a long-running operation that is the result of a network API call.
"done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
"error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
"code": 42, # The status code, which should be an enum value of google.rpc.Code.
"details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
{
"a_key": "", # Properties of the object. Contains field @type with type URL.
},
],
"message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
},
"metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
"a_key": "", # Properties of the object. Contains field @type with type URL.
},
"name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
"response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
"a_key": "", # Properties of the object. Contains field @type with type URL.
},
}