{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"type":"markdown"},"seo":{"title":"ObservePoint Grid API Example: Console Log Inventory from Recent Pages","description":"List all console logs from the most recent page scans.","keywords":["ObservePoint API","ObservePoint Grid API","Grid API","console logs","browser logs","inventory","recent pages"]},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"example-console-log-inventory-from-recent-pages","__idx":0},"children":["Example: Console Log Inventory from Recent Pages"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This example returns an inventory of browser console logs observed on the most recent page scans throughout your account."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The relative date filter restricts to page visits started in the last 30 days."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["LOG_LEVEL"]}," and some other attributes are numeric enums. You can either call ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /v3/reports/grid/browser-logs/schema"]}," or use the generic schema endpoint referenced here: ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/openapi/grid-api.openapi#tag/grid-api/operation/getGridSchema"},"children":["Grid schema"]},"."]}]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Console log data can be very large and can produce millions of rows. Large unfiltered queries may time out. We strongly recommend applying filters to limit to a reasonable time window and to the most recent page scans and audit runs, as shown below."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"grid-api-request","__idx":1},"children":["Grid API Request"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","data-title":"POST to https://api.observepoint.com/v3/reports/grid/browser-logs","header":{"title":"POST to https://api.observepoint.com/v3/reports/grid/browser-logs","controls":{"copy":{}}},"source":"{\n  \"columns\": [\n    { \"columnId\": \"FINAL_PAGE_URL\" },                   // The page URL where the log occurred.\n    { \"columnId\": \"PAGE_TITLE\" },                       // The title of the page.\n    { \"columnId\": \"LOG_LEVEL\" },                        // Numeric enum for the log level. See Enum Reference below.\n    { \"columnId\": \"LOG_TIME\" },                         // ISO 8601 timestamp when the log was captured.\n    { \"columnId\": \"LOG_MESSAGE\" },                      // The console log message text.\n    { \"columnId\": \"LOG_OCCURRENCES\" },                  // Number of times this exact log was observed on the page visit.\n    { \"columnId\": \"RELATED_TAG\" },                      // If applicable: [Tag Name, Tag Id]. May be null.\n    { \"columnId\": \"SOURCE_JAVASCRIPT_URL\" },            // The script URL that emitted the log, when available.\n    { \"columnId\": \"SOURCE_JAVASCRIPT_LINE_NUMBER\" },    // Source line number if captured.\n    { \"columnId\": \"SOURCE_JAVASCRIPT_COLUMN_NUMBER\" }   // Source column number if captured.\n  ],\n  \"filters\": {\n    \"conditionMatchMode\": \"all\",\n    \"conditions\": [\n      // Ensures only the latest scan per page.\n      {\n        \"args\": [1],\n        \"negated\": false,\n        \"operator\": \"integer_in\",\n        \"filteredColumn\": { \"columnId\": \"IS_MOST_RECENT_PAGE_SCAN\" }\n      },\n      // Limits results to the latest run per property.\n      {\n        \"args\": [1],\n        \"negated\": false,\n        \"operator\": \"integer_in\",\n        \"filteredColumn\": { \"columnId\": \"IS_MOST_RECENT_RUN\" }\n      },\n      {\n        \"startDuration\": 30,\n        \"startUnit\": \"day\",\n        \"negated\": false,\n        \"operator\": \"date_time_relative\",\n        \"filteredColumn\": { \"columnId\": \"ABSOLUTE_PAGE_VISIT_START_TIME\" }\n      }\n    ],\n    \"allAccounts\": false\n  },\n  \"sortBy\": [],\n  \"page\": 0,\n  \"size\": 10000\n}\n","lang":"javascript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"example-response-json","__idx":2},"children":["Example Response JSON"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","data-title":"Console Log Grid API Response JSON","header":{"title":"Console Log Grid API Response JSON","controls":{"copy":{}}},"source":"// Notes:\n//  Each row is a single console log observation from a most recent page scan\n//  LOG_LEVEL is a numeric enum. Example mapping is listed below in the Enum Reference section\n{\n  \"metadata\": {\n    \"pagination\": {\n      \"totalCount\": 10000,\n      \"totalPageCount\": 1,\n      \"pageSize\": 10000,\n      \"currentPageSize\": 10000,\n      \"currentPageNumber\": 0\n    },\n    \"headers\": [\n      { \"column\": { \"columnId\": \"FINAL_PAGE_URL\" } },\n      { \"column\": { \"columnId\": \"PAGE_TITLE\" } },\n      { \"column\": { \"columnId\": \"LOG_LEVEL\" } },\n      { \"column\": { \"columnId\": \"LOG_TIME\" } },\n      { \"column\": { \"columnId\": \"LOG_MESSAGE\" } },\n      { \"column\": { \"columnId\": \"LOG_OCCURRENCES\" } },\n      { \"column\": { \"columnId\": \"RELATED_TAG\" } },\n      { \"column\": { \"columnId\": \"SOURCE_JAVASCRIPT_URL\" } },\n      { \"column\": { \"columnId\": \"SOURCE_JAVASCRIPT_LINE_NUMBER\" } },\n      { \"column\": { \"columnId\": \"SOURCE_JAVASCRIPT_COLUMN_NUMBER\" } }\n    ]\n  },\n  \"rows\": [\n    [\n      \"https://example.com\",\n      \"Example Page Title\",\n      2, // Warning\n      \"2025-01-01T00:00:00.000+00:00\",\n      \"[Adobe Analytics] - Adobe Analytics Warning\",\n      1,\n      [\"Adobe Analytics\", 1],\n      \"https://example.com/b/ss/report-suite-prod/1/JS-2.23.0-LEWM/s123456789\",\n      0,\n      349973\n    ],\n    [\n      \"https://example.com\",\n      \"Example Page Title\",\n      1, // Error\n      \"2025-01-01T00:00:00.000+00:00\",\n      \"[Adobe Launch] - Adobe Launch Error\",\n      1,\n      [\"Adobe Launch\", 556],\n      \"https://assets.adobedtm.com/0abc123ABC/0abc123ABC/launch-0abc123ABC.min.js\",\n      0,\n      9846\n    ],\n    [\n      \"https://example.com\",\n      \"Example Page Title\",\n      3,  // Info\n      \"2025-01-01T00:00:00.000+00:00\",\n      \"PRINT CONSOLE LOG\",\n      2,\n      null,\n      \"https://www.examplecdn.net/example/js/example.27.0M.js\",\n      10,\n      1008\n    ]\n    // ... more rows omitted for brevity\n  ]\n}\n","lang":"javascript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"enum-reference","__idx":3},"children":["Enum Reference"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["LOG_LEVEL"]}," values returned by the API map to the following labels. To fetch the current set directly from the API, call ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /v3/reports/grid/browser-logs/schema"]}," and inspect ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["enumValues"]}," for the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["LOG_LEVEL"]}," column."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"enumValues\": [\n    { \"id\": 1, \"name\": \"Error\" },\n    { \"id\": 2, \"name\": \"Warning\" },\n    { \"id\": 3, \"name\": \"Info\" },\n    { \"id\": 4, \"name\": \"Debug\" }\n  ]\n}\n","lang":"json"},"children":[]}]},"headings":[{"value":"Example: Console Log Inventory from Recent Pages","id":"example-console-log-inventory-from-recent-pages","depth":1},{"value":"Grid API Request","id":"grid-api-request","depth":1},{"value":"Example Response JSON","id":"example-response-json","depth":1},{"value":"Enum Reference","id":"enum-reference","depth":1}],"frontmatter":{"seo":{"title":"ObservePoint Grid API Example: Console Log Inventory from Recent Pages","description":"List all console logs from the most recent page scans.","keywords":["ObservePoint API","ObservePoint Grid API","Grid API","console logs","browser logs","inventory","recent pages"]}},"lastModified":"2026-08-26T02:38:32.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/sections/grid-api-examples/all-console-logs","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}