Monitoring endpoints

POST /v1/speed-analysis/monitoring/list

Returns the list of monitorings.

Parameters

  • name   string  

    String pattern to filter your monitorings and return only those that contain the pattern in their name

  • url   string  

    String pattern to filter your monitorings and return only those that contain the pattern in their URL

Request example

Terminal window
curl --location --request GET '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 report

POST /v1/speed-analysis/monitoring/last-report

Returns the last report of a monitoring.

Parameters

  • monitoringId   number   Required

    Unique identifier of a monitoring.

  • metricsOnly   boolean  

    Set to true to only generate a summary report, excluding advice, categories, and detected technologies (default: false).

  • getUniqueIDsForTips   boolean  

    Set to true to get an ID for each element of report.tips (default: false).

Request example

Terminal window
curl --location --request GET '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,
"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
}
],
"technos": [
{
"name": "",
"version": ""
}
]
}
},
"success": true
}

POST /v1/speed-analysis/monitoring/reports

Returns the monitoring reports.

Parameters

  • monitoringId   number   Required

    Unique identifier of a monitoring.

  • limit   number  

    Limits the number of reports to return (default: 30). Set to 0 to get all monitoring reports.

  • lastDays   number  

    Retrieve reports from the last X days, where X is the value of this parameter.

  • dateFrom   ISO 8601 date string  

    Retrieve 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).

  • dateTo   ISO 8601 date string  

    Retrieve 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).

  • error   boolean  

    By default, all results are returned. Set to false to retrieve only executions without error. Set to true to retrieve only executions with error.

Request example

Terminal window
curl --location --request GET '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
}
]
},
"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
}
]
}
]
},
"success": true
}