Skip to main content

How to get report stat rows with all metrics

The rowsWithAllMetrics field in the ReportStat object is designed to simplify data retrieval in GraphQL queries. It allows users to fetch all available metrics for each row within a report, without specifying each metric individually. This feature is particularly useful in scenarios where comprehensive data analysis is required, and all metrics are of interest.

Operation: query GetAllMetrics($input: GetReportStatInput!, $after: String) { getReportStat(input: $input) { reportTemplate { name code } rowsWithAllMetrics(first: 10, after: $after, reportType: Basic) { totalCount pageInfo { hasNextPage endCursor } nodes } } }Variables: { "input": { "crawlId": "TjAwNUNyYXdsMTc5MDQ3NQ", "reportTemplateCode": "all_pages", "segmentId": null }, "after": null }Response Example: { "data": { "getReportStat": { "reportTemplate": { "name": "All Pages", "code": "all_pages" }, "rowsWithAllMetrics": { "totalCount": 75, "pageInfo": { "hasNextPage": true, "endCursor": "MTA" }, "nodes": [ { "adultRating": false, "amphtml": false, "amphtmlReciprocate": false, "amphtmlValid": false, "bodyTagsInHeadCount": 0, "breadcrumbSchemaCount": 0, "canonicalLinksInCount": 0, "canonicalizedPage": false, "contentHtmlRatio": "0.11", "contentSize": 3925, "crawlDatetime": "2023-12-08T13:03:35.151Z", "css": false, // .... }, // ... ] } } } }
GetAllMetricsTry in Explorer
GraphQL
query GetAllMetrics($input: GetReportStatInput!, $after: String) {
getReportStat(input: $input) {
reportTemplate {
name
code
}
rowsWithAllMetrics(first: 10, after: $after, reportType: Basic) {
totalCount
pageInfo {
hasNextPage
endCursor
}
nodes
}
}
}