Monitoring endpoints
Use these endpoints to manage Speed Analysis Lab monitorings.
Get the list of monitorings
Section titled Get the list of monitoringsPOST /v1/speed-analysis/monitoring/list
Returns the list of monitorings.
Parameters
namestringString pattern to filter your monitorings and return only those that contain the pattern in their name
urlstringString pattern to filter your monitorings and return only those that contain the pattern in their URL
Request example
curl --location --request POST 'https://api.contentsquare.com/v1/speed-analysis/monitoring/list' \--header 'Authorization: Bearer <your_access_token>'--data '{ "name": "", "url": ""}'Response example
{ "payload": { "monitorings": [ { "id": 0, "url": "", "name": "", "state": "OK", "errorMessage": "", "lastExecution": 0, "enabled": true, "frequency": 1440, "lang": "en", "config": { "location": "", "browser": { "name": "", "version": "" }, "isMobile": false, "bandwidth": { "upstream": 0, "downstream": 0 }, "latency": 0, "isPrivate": false, "screen": { "height": 0, "width": 0 }, "basicAuth": { "user": "", "password": "" }, "postData": [ { "key": "", "value": "" } ], "header": [ { "key": "", "value": "" } ], "blacklist": [], "whiteList": [], "dnsMapping": [ { "origin": "", "destination": "" } ], "cookies": [], "repeatedView": false, "hhtp2Disabled": false, "animationsStopped": {} } } ] }, "success": true}Get the monitoring last report
Section titled Get the monitoring last reportPOST /v1/speed-analysis/monitoring/last-report
Returns the last report of a monitoring.
Parameters
monitoringIdnumber RequiredUnique identifier of a monitoring.
metricsOnlybooleanSet to true to only generate a summary report, excluding advice, categories, and detected technologies (default:
false).getUniqueIDsForTipsbooleanSet to true to get an ID for each element of
report.tips(default:false).
Request example
curl --location --request POST 'https://api.contentsquare.com/v1/speed-analysis/monitoring/last-report' \--header 'Authorization: Bearer <your_access_token>'--data '{ "monitoringId": 0, "metricsOnly": false, "getUniqueIDsForTips": false}'Response example
{ "payload": { "lastExecution": 0, "alerts": [ { "type": "", "threshold": 0, "value": 0 } ], "missing": [], "report": { "publicReportUrl": "https://www.dareboost.com/[lang]/report/[reportId]", "harFileUrl": "https://www.dareboost.com/download/harFile/[reportId]", "date": 0, "url": "", "lang": "", "config": { "location": "", "browser": { "name": "", "version": "" }, "isMobile": false, "bandwidth": { "upstream": 0, "downstream": 0 }, "latency": 0, "isPrivate": false, "adblock": false, "screen": { "height": 0, "width": 0 }, "basicAuth": { "user": "", "password": "" }, "postData": [ { "key": "", "value": "" } ], "header": [ { "key": "", "value": "" } ], "blacklist": [], "whiteList": [], "dnsMapping": [ { "origin": "", "destination": "" } ], "cookies": [], "repeatedView": false, "hhtp2Disabled": false, "animationsStopped": {} }, "summary": { "loadTime": 0, "score": 0, "requestsCount": 0, "weight": 0 }, "categories": [ { "name": "", "mark": 0 } ], "tips": [ { "advice": "", "category": "", "score": -1, "value": 0.0, "name": "", "priority": 0 } ], "timings": { "navigationStart": 0, "firstByte": 0, "firstPaint": 0, "domInteractive": 0, "loadEvent": 0, "startRender": 0, "speedIndex": 0, "visuallyComplete": 0, "oldVisuallyComplete": 0, "loadEventStart": 0, "lastByte": 0, "domLoading": 0, "domContentLoadedEventStart": 0, "domContentLoadedEventEnd": 0, "domComplete": 0, "firstContentfulPaint": 0, "firstConsistentlyInteractive": 0, "largestContentfulPaint": 0, "totalBlockingTime": 0, "maxPotentialFirstInputDelay": 0, "totalLongTasks": 0, "lastLongTask": 0, "nbLongTasks": 0, "cumulativeLayoutShift": 0 }, "resourceByType": [ { "type": "", "bodyWeight": 0, "headerWeight": 0, "requestCount": 0 } ], "customTimings": [ { "type": "", "name": "", "startTime": 0, "duration": 0 } ], "scores": { "performance": 0.0, "bestPractices": 0.0, "seo": 0.0, "accessibility": 0.0 }, "technos": [ { "name": "", "version": "" } ] } }, "success": true}Get the monitoring reports
Section titled Get the monitoring reportsPOST /v1/speed-analysis/monitoring/reports
Returns the monitoring reports.
Parameters
monitoringIdnumber RequiredUnique identifier of a monitoring.
limitnumberLimits the number of reports to return (default:
30). Set to0to get all monitoring reports.lastDaysnumberRetrieve reports from the last X days, where X is the value of this parameter.
dateFromISO 8601 date stringRetrieve audit executed after this date. Must be a date before
dateTo.ISO format in UTC (for example "2021-08-13T12:32:40.000Z") or with a time zone offset ("2021-08-13T12:32:40+02:00" or "2021-08-13T12:32:40%2B+02:00" when encoded in the URL).
dateToISO 8601 date stringRetrieve audit executed before this date. Must be a date after
dateFrom.ISO format in UTC (for example "2021-08-13T12:32:40.000Z") or with a time zone offset ("2021-08-13T12:32:40+02:00" or "2021-08-13T12:32:40%2B+02:00" when encoded in the URL).
errorbooleanBy default, all results are returned. Set to
falseto retrieve only executions without error. Set totrueto retrieve only executions with error.
Request example
curl --location --request POST 'https://api.contentsquare.com/v1/speed-analysis/monitoring/reports' \--header 'Authorization: Bearer <your_access_token>'--data '{ "monitoringId": 0, "limit": 30, "lastDays": 0, "dateFrom": "2016-03-11T00:00:00.000+0100", "dateTo": "2016-03-11T23:59:59.000+0100", "error": false}'Response example
{ "payload": { "statistics": { "averageScore": 0, "averageWeight": 0, "averageRequests": 0, "averageLoadTime": 0, "averageTimings": { "navigationStart": 0, "firstByte": 0, "firstPaint": 0, "domInteractive": 0, "loadEvent": 0, "startRender": 0, "speedIndex": 0, "visuallyComplete": 0, "oldVisuallyComplete": 0, "loadEventStart": 0, "lastByte": 0, "domLoading": 0, "domContentLoadedEventStart": 0, "domContentLoadedEventEnd": 0, "domComplete": 0, "firstContentfulPaint": 0, "firstConsistentlyInteractive": 0, "largestContentfulPaint": 0, "totalBlockingTime": 0, "maxPotentialFirstInputDelay": 0, "totalLongTasks": 0, "lastLongTask": 0, "nbLongTasks": 0, "cumulativeLayoutShift": 0 }, "averageCustomTimings": [ { "type": "", "name": "", "startTime": 0, "duration": 0 } ], "averageScores": { "performance": 0.0, "bestPractices": 0.0, "seo": 0.0, "accessibility": 0.0 } }, "monitoringData": [ { "state": "OK", "errorMessage": "", "id": 0, "date": 0, "score": 0, "weight": 0, "requests": 0, "loadTime": 0, "unreachableRequests": 0, "timings": { "navigationStart": 0, "firstByte": 0, "firstPaint": 0, "domInteractive": 0, "loadEvent": 0, "startRender": 0, "speedIndex": 0, "visuallyComplete": 0, "oldVisuallyComplete": 0, "loadEventStart": 0, "lastByte": 0, "domLoading": 0, "domContentLoadedEventStart": 0, "domContentLoadedEventEnd": 0, "domComplete": 0, "firstContentfulPaint": 0, "firstConsistentlyInteractive": 0, "largestContentfulPaint": 0, "totalBlockingTime": 0, "maxPotentialFirstInputDelay": 0, "totalLongTasks": 0, "lastLongTask": 0, "nbLongTasks": 0, "cumulativeLayoutShift": 0 }, "customTimings": [ { "type": "mark", "name": "bootstrap_start", "startTime": 3510, "duration": 0 } ], "scores": { "performance": 0.0, "bestPractices": 0.0, "seo": 0.0, "accessibility": 0.0 } } ] }, "success": true}
