Improvement
Last week we released a set of updates for our public API to give you even more access to your data.
You can now access all alerts through the new /v1/check-alerts API endpoint. Use it to generate custom reports on how many outages you had, or integrate into a custom dashboard.
For Browser checks, you now have full access to trace summary data (like web vitals and error counts) and assets like screenshots. Next to this, you have access to the full job log for both API and Browser check types.
Here is an abbreviated, Browser check example fetched from the /v1/check-results/{checkId}/{checkResultId} endpoint.
Notice…
- The
assets
property. It's an array with links to assets stored on S3. - The
browserCheckResult.pages
property holds the web vitals collected per page visited in your script - The
jobLog
property which holds the log as a structured array.
{
"id": "28b4d8f7-xxxx",
"hasErrors": false,
"hasFailures": false,
"runLocation": "us-east-1",
"startedAt": "2022-02-08T10:00:56.058Z",
"stoppedAt": "2022-02-08T10:00:58.032Z",
"responseTime": 1974,
"apiCheckResult": null,
"browserCheckResult": {
"type": "PLAYWRIGHT",
"pages": [
{
"url": "https://www.checklyhq.com/",
"webVitals": {
"CLS": {
"score": "GOOD",
"value": 0
},
"FCP": {
"score": "GOOD",
"value": 354.5
},
"LCP": {
"score": "GOOD",
"value": 436.5
},
"TBT": {
"score": "GOOD",
"value": 67
},
"TTFB": {
"score": "GOOD",
"value": 92.20000000018626
}
}
}
],
"errors": [],
"endTime": 1644314458031,
"startTime": 1644314456059,
"traceSummary": {
"consoleErrors": 0,
"networkErrors": 0,
"documentErrors": 0,
"userScriptErrors": 0
},
"runtimeVersion": "2021.10",
"jobLog": [
{
"time": 1644314456057,
"msg": "Starting job",
"level": "DEBUG"
},
{
"time": 1644314456057,
"msg": "Compiling environment variables",
"level": "DEBUG"
},
{
"time": 1644314456058,
"msg": "Creating runtime using version 2021.10",
"level": "DEBUG"
},
{
"time": 1644314456059,
"msg": "Running script",
"level": "DEBUG"
},
{
"time": 1644314458032,
"msg": "Run finished",
"level": "DEBUG"
},
{
"time": 1644314458235,
"msg": "Uploading screenshots",
"level": "DEBUG"
},
{
"time": 1644314458235,
"msg": "Job finished successfully",
"level": "DEBUG"
},
{
"time": 1644314458235,
"msg": "Uploading log file",
"level": "DEBUG"
}
],
"jobAssets": [
"https://s3.us-east-1.amazonaws.com/fn-screenshots-us-east-1-prod/b7bf6461-73df-xxxx/f951a5d4-xxxxx_1644314454020_us-east-1_screenshot.jpg"
]
},
"checkId": "f951a5d4-xxxx",
"created_at": "2022-02-08T10:00:58.664Z",
"name": "https://checklyhq.com",
"checkRunId": 1644314454020,
"attempts": 1,
"isDegraded": false,
"overMaxResponseTime": false
}