@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Google Analytics Data API
@base https://analyticsdata.googleapis.com/
@version v1beta
@auth OAuth2 | OAuth2
@endpoints 7
@toc v1beta(7)

@endpoint GET /v1beta/{name}
@required {name: str}
@returns(200) {dimensions: [map], metrics: [map], name: str}

@endpoint POST /v1beta/{property}:batchRunPivotReports
@required {property: str}
@optional {requests: [map{cohortSpec: map, currencyCode: str, dateRanges: [map], dimensionFilter: map, dimensions: [map], keepEmptyRows: bool, metricFilter: map, metrics: [map], pivots: [map], property: str, returnPropertyQuota: bool}]}
@returns(200) {kind: str, pivotReports: [map]}

@endpoint POST /v1beta/{property}:batchRunReports
@required {property: str}
@optional {requests: [map{cohortSpec: map, currencyCode: str, dateRanges: [map], dimensionFilter: map, dimensions: [map], keepEmptyRows: bool, limit: str(int64), metricAggregations: [str], metricFilter: map, metrics: [map], offset: str(int64), orderBys: [map], property: str, returnPropertyQuota: bool}]}
@returns(200) {kind: str, reports: [map]}

@endpoint POST /v1beta/{property}:checkCompatibility
@required {property: str}
@optional {compatibilityFilter: str(COMPATIBILITY_UNSPECIFIED/COMPATIBLE/INCOMPATIBLE), dimensionFilter: map{andGroup: map, filter: map, notExpression: map, orGroup: map}, dimensions: [map{dimensionExpression: map, name: str}], metricFilter: map{andGroup: map, filter: map, notExpression: map, orGroup: map}, metrics: [map{expression: str, invisible: bool, name: str}]}
@returns(200) {dimensionCompatibilities: [map], metricCompatibilities: [map]}

@endpoint POST /v1beta/{property}:runPivotReport
@required {property: str}
@optional {cohortSpec: map{cohortReportSettings: map, cohorts: [map], cohortsRange: map}, currencyCode: str, dateRanges: [map{endDate: str, name: str, startDate: str}], dimensionFilter: map{andGroup: map, filter: map, notExpression: map, orGroup: map}, dimensions: [map{dimensionExpression: map, name: str}], keepEmptyRows: bool, metricFilter: map{andGroup: map, filter: map, notExpression: map, orGroup: map}, metrics: [map{expression: str, invisible: bool, name: str}], pivots: [map{fieldNames: [str], limit: str(int64), metricAggregations: [str], offset: str(int64), orderBys: [map]}], property: str, returnPropertyQuota: bool}
@returns(200) {aggregates: [map], dimensionHeaders: [map], kind: str, metadata: map{currencyCode: str, dataLossFromOtherRow: bool, emptyReason: str, schemaRestrictionResponse: map{activeMetricRestrictions: [map]}, subjectToThresholding: bool, timeZone: str}, metricHeaders: [map], pivotHeaders: [map], propertyQuota: map{concurrentRequests: map{consumed: int(int32), remaining: int(int32)}, potentiallyThresholdedRequestsPerHour: map{consumed: int(int32), remaining: int(int32)}, serverErrorsPerProjectPerHour: map{consumed: int(int32), remaining: int(int32)}, tokensPerDay: map{consumed: int(int32), remaining: int(int32)}, tokensPerHour: map{consumed: int(int32), remaining: int(int32)}, tokensPerProjectPerHour: map{consumed: int(int32), remaining: int(int32)}}, rows: [map]}

@endpoint POST /v1beta/{property}:runRealtimeReport
@required {property: str}
@optional {dimensionFilter: map{andGroup: map, filter: map, notExpression: map, orGroup: map}, dimensions: [map{dimensionExpression: map, name: str}], limit: str(int64), metricAggregations: [str], metricFilter: map{andGroup: map, filter: map, notExpression: map, orGroup: map}, metrics: [map{expression: str, invisible: bool, name: str}], minuteRanges: [map{endMinutesAgo: int(int32), name: str, startMinutesAgo: int(int32)}], orderBys: [map{desc: bool, dimension: map, metric: map, pivot: map}], returnPropertyQuota: bool}
@returns(200) {dimensionHeaders: [map], kind: str, maximums: [map], metricHeaders: [map], minimums: [map], propertyQuota: map{concurrentRequests: map{consumed: int(int32), remaining: int(int32)}, potentiallyThresholdedRequestsPerHour: map{consumed: int(int32), remaining: int(int32)}, serverErrorsPerProjectPerHour: map{consumed: int(int32), remaining: int(int32)}, tokensPerDay: map{consumed: int(int32), remaining: int(int32)}, tokensPerHour: map{consumed: int(int32), remaining: int(int32)}, tokensPerProjectPerHour: map{consumed: int(int32), remaining: int(int32)}}, rowCount: int(int32), rows: [map], totals: [map]}

@endpoint POST /v1beta/{property}:runReport
@required {property: str}
@optional {cohortSpec: map{cohortReportSettings: map, cohorts: [map], cohortsRange: map}, currencyCode: str, dateRanges: [map{endDate: str, name: str, startDate: str}], dimensionFilter: map{andGroup: map, filter: map, notExpression: map, orGroup: map}, dimensions: [map{dimensionExpression: map, name: str}], keepEmptyRows: bool, limit: str(int64), metricAggregations: [str], metricFilter: map{andGroup: map, filter: map, notExpression: map, orGroup: map}, metrics: [map{expression: str, invisible: bool, name: str}], offset: str(int64), orderBys: [map{desc: bool, dimension: map, metric: map, pivot: map}], property: str, returnPropertyQuota: bool}
@returns(200) {dimensionHeaders: [map], kind: str, maximums: [map], metadata: map{currencyCode: str, dataLossFromOtherRow: bool, emptyReason: str, schemaRestrictionResponse: map{activeMetricRestrictions: [map]}, subjectToThresholding: bool, timeZone: str}, metricHeaders: [map], minimums: [map], propertyQuota: map{concurrentRequests: map{consumed: int(int32), remaining: int(int32)}, potentiallyThresholdedRequestsPerHour: map{consumed: int(int32), remaining: int(int32)}, serverErrorsPerProjectPerHour: map{consumed: int(int32), remaining: int(int32)}, tokensPerDay: map{consumed: int(int32), remaining: int(int32)}, tokensPerHour: map{consumed: int(int32), remaining: int(int32)}, tokensPerProjectPerHour: map{consumed: int(int32), remaining: int(int32)}}, rowCount: int(int32), rows: [map], totals: [map]}

@end
