Overview

Dareboost provides a base URL to access the API: https://www.dareboost.com/api/0.5/

All API calls begin with this base URL, from which you add the action you want.
Example: https://www.dareboost.com/api/0.5/analysis/launch

Note that the API requires the use of the HTTPS protocol and all the routes are ONLY reachable with the HTTP POST method (no GET, PUT or DELETE). The POST data is defined in the JSON format.

Authentication

Each request must be authenticated for being processed. So you need a token, that you can directly retrieve/generate from your backoffice.

Calls to the API must all specify in their POST data the "token" parameter, with this token value.

Quotas

The Dareboost API is based on a credit system.

Launching an analysis from the API costs you 1 credit. If you want additional metrics like visual metrics (first / last visual change, speedindex, video, etc), it costs you 1 additional credit.

PDF generation costs you 2 credits per request.

Others requests (failed analysis, get configuration, get a report, etc) don't cost anything.

Response code, list of status

When you call the Dareboost API, the response always contains a status code that permits you to check if the request was successfully processed.

All status >= 400 means that the request could not be treated by the server.

  • 200: OK
  • 202: The analysis is currently processing
  • 204: No data available or added (e.g. you request is correct but there is no data corresponding)
  • 206: The request is ok but the result is not complete : the analysis report is not complete (missing some rules or some timings) or all creation / edition have not be done (e.g. for the events)
  • 400: Missing parameters or bad value
  • 401: Authentication required (no token or invalid token)
  • 403: Action forbidden (quotas reached, unauthorized url)
  • 404: Page is unreachable (unknown url / check server response failed)
  • 406: Not a valid json format
  • 408: The analysis has timeout
  • 417: The last analysis of the monitoring results in error
  • 500: Internal server error (unknown error, contact us)
  • 503: The API is temporarily unavailable, try again in a few minutes

Available actions

Get available locations

POST /config

Request format

{
    'token': ''
}

Parameters

NameRequiredTypeDefaultDescription
tokenYesStringNoneuser's token use for authentication

Response format

{
    'status': 200, 
	'message': '',
    'config' :[ 
		{
		    'location':'',
		    'isPrivate': false, 
		    'browsers': [ 
		        {
		            'name': '',
		            'isMobile': false
		        }
		    ]
		}
    ]
}
NameTypeDescription
statusNumberRequest status code (see the list)
messageStringExplanation of the status.
locationStringName of the location eg.: "Paris", "Washington", ...
isPrivateStringThis location is dedicated to you.
browser.nameStringName of the browser, eg.: "Chrome", "Nexus 5", ...
browser.isMobileStringThis is a mobile browser.

Curl example

curl --ssl-reqd -H "Content-Type: application/json" -X POST -d '{"token":"9SD9FDS8FDS8DCX8V8CXV4"}' https://www.dareboost.com/api/0.5/config

Get available browsers for one location

POST /config

Request format

{
    "token": "",
    "location": ""
}

Parameters

NameRequiredTypeDefaultDescription
tokenYesStringNoneuser's token use for authentication
locationYesStringNoneName of the location eg.: "Paris", "Washington", ...

Response format

{
    "status": "",
    "message": "",
    "location": "",
    "browsers": [
        {
            "name": "",
            "isMobile": false
        }
    ]
}
NameTypeDescription
statusNumberRequest status code (see the list)
messageStringExplanation of the status.
locationStringName of the location eg.: "Paris", "Washington", ...
browser.nameStringName of the browser, eg.: "Chrome", "Nexus 5", ...
browser.isMobileStringThis is a mobile browser.

Curl example

curl --ssl-reqd -H "Content-Type: application/json" -X POST -d '{"token":"9SD9FDS8FDS8DCX8V8CXV4", "location": "paris"}' https://www.dareboost.com/api/0.5/config

Generate a PDF

POST /pdf/launch since version 0.3

Request format

{
    "token": "",
    "reportId": "",
    "useDefaultStyle": true,
    "addTableOfContent": false,
    "showOverallMetrics": true,
    "showBestPractices": true,
    "showTitleOnly": true,
    "showIssueAndImprovementsOnly": true
}

Parameters

NameRequiredTypeDefaultDescription
tokenYesStringNoneUser's token use for authentication
reportIdYesStringNoneUnique identifier of the report you want to download
useDefaultStyleNoBooleantrueUse the default style from Dareboost. Set to "false if you want to user your white-label.
addTableOfContentNoBooleanfalseAdd a table of content at the beginning of the PDF. Set to "true" if you want one.
showOverallMetricsNoBooleantrueAdd metrics related to web performance. Set to "false" if you don't want them.
showBestPracticesNoBooleantrueDisplay tips and best practices on the PDF. Set to "false" if you don't want them.
showTitleOnlyNoBooleantrueOnly display titles of tips. Set to "false" if you want the advice too. (Only available if you set showBestPractices to true)
showIssueAndImprovementsOnlyNoBooleantrueOnly display the best practices that can be improved. Set to "false" if you want to display advice with a score of 100/100. (Only available if you set showBestPractices to true)

Response format

{
    "status": 200,
    "message": ""
}
NameTypeDescription
statusNumberRequest status code (see the list)
messageStringExplanation of the status.

Curl example

curl --ssl-reqd -H "Content-Type: application/json" -X POST -d '{"token":"9SD9FDS8FDS8DCX8V8CXV4", "reportId": "9SD9FDS8FDS8DCX8V8CXV4"}' https://www.dareboost.com/api/0.5/pdf/launch

Note

Generating a PDF can take some times, we recommend you to wait at least 20 seconds after the launch before trying to get the PDF.
Moreover, note that you can only generate one PDF simultaneously.

Get the PDF

POST /pdf/get since version 0.3

Request format

{
    "token": ""
}

Parameters

NameRequiredTypeDefaultDescription
tokenYesStringNoneUser's token use for authentication

Response format

{
    "status": 200,
    "message": "",
    "pdfUrl": ""
}
NameTypeDescription
statusNumberRequest status code (see the list)
messageStringExplanation of the status.
pdfUrlStringLink to download the PDF

Curl example

curl --ssl-reqd -H "Content-Type: application/json" -X POST -d '{"token":"9SD9FDS8FDS8DCX8V8CXV4"}' https://www.dareboost.com/api/0.5/pdf/get

Note

Once the download link obtained, simply download the target to get your PDF, for example with your browser or with wget.

Analyse a page

POST /analysis/launch

Request format

{
    "token": "",
    "url": "",
    "lang": "en",
    "location": "",
    "browser": {
        "name": ""
    },
    "mobileAnalysis": false,
    "isPrivate": false,
    "visualMetrics": false,
    "adblock": false,
    "disableH2": false,
    "bandwidth": {
        "upstream": 0,
        "downstream": 0
    },
    "latency": 0,
    "screen": {
        "height": 0,
        "width": 0
    },
    "basicAuth": {
        "user": "",
        "password": ""
    },
    "postData": [
        {
            "name": "",
            "value": ""
        }
    ],
    "headers": [
        {
            "name": "",
            "value": ""
        }
    ],
    "disableAnimation": {
        "script": false,
        "css": false
    },
    "cookie": [
        {
            "name": "",
            "value": "",
            "domain": "",
            "path": ""
        }
    ],
    "blacklist": [],
    "whitelist": [],
    "dnsMapping": [
        {
            "origin": "",
            "destination": ""
        }
    ]
}

Parameters

NameRequiredTypeDefaultDescription
tokenYesStringNoneuser's token use for authentication
urlYesStringNoneURL to analyze
langNoString"en"lang of the analysis ("en" or "fr")
locationNoStringrandomthe location to be use. See Get available locations to retrieve available locations.
browser.nameNoString"Chrome"the browser to be use. See Get available browsers to retrieve available browser for a locations.
mobileAnalysisNoBooleanfalseset to true if you want your page to be analyzed in a mobile context. This parameter is override if you define a "browser"
isPrivateNoBooleanfalseSet to true to restrict access to this report to you and accounts linked to yours
visualMetricsNoBooleanfalseSet to true if you want to have visual metrics ( start render, last visual change, speedindex). Be careful activate this option will cost you more than one credit.
adblockNoBooleanfalseSet to true to enable adblock plugin for your analyse (not available with Firefox browser)
disableH2NoBooleanfalseSet to true to disable HTTP/2 support on the browser
downstreamNoNumberbrowser default valuedownstream bandwidth max limitation
upstreamNoNumberbrowser default valueupstream bandwidth max limitation
latencyNoNumberbrowser default valueminimum network latency
heightNoNumberbrowser default valueheight of the screen
widthNoNumberbrowser default valuewidth of the screen
userNoStringNonebasic authentication user
passwordNoStringNonebasic authentication password
postDataNoListNonelist of data send with the first request
headersNoListNonelist of HTTP headers added on all HTTP request
disableAnimation.scriptNoBooleanfalseSet to true if you want to stop animation using setTimeout() or setInterval() functions (after onload event).
disableAnimation.cssNoBooleanfalseSet to true if you want to disable CSS animation, transition and transform properties (after onload event).
cookieNoListNonelist of cookies added on HTTP request (depend on domain and path)
blacklistNoListNonelist of regexp to block matching request
whitelistNoListNonelist of regexp to allow only matching request
dnsMappingNoListNoneAllow to map a hostname to another one, or directly to an IP address
(e.g. origin:"*.google-analytics.com", destination:"blackhole.com" or origin:"my-cdn.my-website.com", destination:"132.45.65.251"

Aditionnal information on advanced settings

Settings Unit Minimum Maximum forbidden characters
upstream / downstreamkbps50--
latencyms05000-
widthpixel1501920-
heightpixel1503000-
headers---=,;:space\t\r\n\v\f
blacklist---must not blacklist the url of the analysed page
whitelist---must allow the url of the analysed page

Response format

{
    "status": "",
    "message": "",
    "reportId": ""
}
NameTypeDescription
statusNumberRequest status code (see the list)
messageStringExplanation of the status.
reportIdStringthe unique identifier of your analyze report. You will need it to retrieve your result

Curl example

Launch an analysis to http://example.org with default option: curl --ssl-reqd -H "Content-Type: application/json" -X POST -d '{"token":"9SD9FDS8FDS8DCX8V8CXV4", "url":"http://example.org"}' https://www.dareboost.com/api/0.5/analysis/launch Launch an analysis to http://example.org with some option: curl --ssl-reqd -H "Content-Type: application/json" -X POST -d '{ "token":"9SD9FDS8FDS8DCX8V8CXV4", "url":"http://example.org", "bandwidth": { "upstream":3072, "downstream":10240 }, "latency":40, "headers":[{"name":"User-Agent", "value":"Dareboost"}]}' https://www.dareboost.com/api/0.5/analysis/launch

Note

The analysis is not instantaneous and can take some times, we recommend you to wait at least 5 seconds after the launch before trying to get the report.

Retrieve analysis result

POST /analysis/report

Request format

{
    "token": "",
    "reportId": "",
    "metricsOnly": false
}

Parameters

NameRequiredTypeDefaultDescription
tokenYesStringNoneuser's token use for authentication
reportIdYesStringNoneunique identifiant of the report, obtained when launch an analysis from the API.
metricsOnlyNoBooleanFalseSet to true to get a report summary only, lighter (excluding advice, categories and detected technologies).

Response format

{
    "status": 200,
    "message": "",
    "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,
            "screen": {
                "height": 0,
                "width": 0
            },
            "basicAuth": {
                "user": "",
                "password": ""
            },
            "postData": [
                {
                    "key": "",
                    "value": ""
                }
            ],
            "header": [
                {
                    "key": "",
                    "value": ""
                }
            ],
            "blacklist": [],
            "whiteList": [],
            "dnsMapping": [
                {
                    "origin": "",
                    "destination": ""
                }
            ]
        },
        "summary": {
            "loadTime": 0,
            "score": 0,
            "requestsCount": 0,
            "weight": 0
        },
        "categories": [
            {
                "name": ""
            }
        ],
        "tips": [
            {
                "advice": "",
                "category": "",
                "score": -1,
                "name": "",
                "priority": 0
            }
        ],
        "timings": {
            "firstByte": 0,
            "firstPaint": 0,
            "domInteractive": 0,
            "loadEvent": 0,
            "startRender": 0,
            "speedIndex": 0,
            "visuallyComplete": 0,
            "oldVisuallyComplete": 0
        },
        "resourceByType": [
            {
                "type": "",
                "bodyWeight": 0,
                "headerWeight": 0,
                "requestCount": 0
            }
        ],
        "technos": [
            {
                "name": "",
                "version": ""
            }
        ]
    }
}
Object
NameTypeDescription
statusNumberRequest status code (see the list)
messageStringExplanation of the status
missingArrayList of APIs in error during the analyze. Values: rules or performance_timings
report.publicReportUrlStringThe report URL on dareboost.com
report.harFileUrlStringURL to download the HAR file
report.dateNumberThe timestamp (in ms) when the audit has been done
report.urlStringThe analyzed URL
report.langStringThe lang used for the analysis
report.config.locationStringThe location used for the analysis
report.config.browserObjectDescribes the browser used for the analysis
report.config.isMobileBooleanis the analysis mobile or not?
report.config.bandwidthObjectDescribes the bandwidth used
report.config.latencyNumberDescribes the latency used
report.config.isPrivateBooleanIs the report access restricted to your account?
report.config.screenObjectThe browser height and width
report.config.basicAuthObject.htaccess authentication information
report.config.postDataObjectPOST data configured via the advanced settings
report.config.headerObjectHTTP headers configured via the advanced settings
report.config.blacklistListRequests blacklisted
report.config.whiteListListRequests whitelisted
report.summary.loadtimeNumberTime needed for the page to be fully loaded in ms
report.summary.scoreNumberDareboost score between 0 and 100
report.summary.requestCountNumberTotal number of resources fetch by the browser to display the page
report.summary.weightNumberTotal amount of data, in Bytes, fetch by the browser to display the page
report.categoriesObjectEach score by category
report.tipsAll tips
report.timingsObjectTimings information details in ms. They are set to -1 if the information is not available.
report.timings.visuallyCompleteObjectLast visual change (in ms).
report.timings.oldVisuallyCompleteObjectShould only be used to compare with result retrieved in version 0.3 or older (see release notes).
report.resourceByTypeObjectSize and number of requests for each type of resources (HTML, CSS, JS, etc) in bytes
report.technosObjectTechnologies detected on the page

Curl example

curl --ssl-reqd -H "Content-Type: application/json" -X POST -d '{"token":"9SD9FDS8FDS8DCX8V8CXV4", "reportId": "54084e3ce4b0f241b256c51a"}' https://www.dareboost.com/api/0.5/analysis/report

Note

When you want to retrieve the result of a previously launched analysis, it is very likely that the analysis is not complete yet. That means Dareboost will answer with a 202 status code (see the list of return status code).
In this case it is strongly advised to wait one second between each attempt of report retrieval.

Retrieve HAR from an analysis

POST /analysis/har

Request format

{
    "token": "",
    "reportId": ""
}

Parameters

NameRequiredTypeDefaultDescription
tokenYesStringNoneuser's token use for authentication
reportIdYesStringNoneunique identifiant of the report, obtained when launch an analysis from the API.

Response format

{
    "status": "",
    "message": "",
    "har": {}
}
NameTypeDescription
statusNumberRequest status code (see the list)
messageStringExplanation of the status
harObjectThe har data, more information on the format here

Curl example

curl --ssl-reqd -H "Content-Type: application/json" -X POST -d '{"token":"9SD9FDS8FDS8DCX8V8CXV4", "reportId": "54084e3ce4b0f241b256c51a"}' https://www.dareboost.com/api/0.5/analysis/har

Get the list of monitorings

POST /monitoring/list

Request format

{
    "token": "",
    "name": "",
    "url": ""
}

Parameters

NameRequiredTypeDefaultDescription
tokenYesStringNoneuser's token use for authentication
nameNoStringNonea string pattern to filter your monitoring and return only those that contain the pattern in their name
urlNoStringNonea string pattern to filter your monitoring and return only those that contains the pattern in their url

Response format

{
    "status": 200,
    "message": "",
    "monitorings": [
        {
            "id": 0,
            "url": "",
            "name": "",
            "state": "OK",
            "errorMessage": "",
            "lastExecution": 0,
            "enabled": true
        }
    ]
}
NameTypeDescription
statusNumberRequest status code (see the list)
messageStringExplanation of the status
monitoringsListList of object, one object per monitoring
idStringunique identifier of the monitoring, use to request data specific to this monitoring
urlStringUrl of the monitored page
nameNumberThe name you give to your monitoring
stateStringCurrent state of the monitoring: "ok", "error".
errorMessageStringerror explanation or ""
lastExecutionNumberTimestamp (in ms) representing the last execution of the monitoring
enabledBooleanIf the monitoring is active or not

Curl example

curl --ssl-reqd -H "Content-Type: application/json" -X POST -d '{"token":"9SD9FDS8FDS8DCX8V8CXV4", "url":"dareboost"}' https://www.dareboost.com/api/0.5/monitoring/list

Get the last report of the monitoring

POST /monitoring/last-report

Request format

{
    "token": "",
    "monitoringId": 0
}

Parameters

NameRequiredTypeDefaultDescription
tokenYesStringNoneuser's token use for authentication
monitoringIdYesNumberNonethe id of the monitoring

Response format

{
    "status": 200,
    "message": "",
    "lastExecution": 0,
    "alerts": [
        {
            "type": "",
            "threshold": 0,
            "value": 0
        }
    ],
    "missing": [],
    "report": {}
}
NameTypeDescription
statusNumberRequest status code (see the list)
messageStringExplanation of the status
lastExecutionNumberTimestamp (in ms) representing the last execution of the monitoring
alertsListList of object, one object per monitoring
typeStringYour alert type, eg.: "Note", "Loadtime", "First byte", ...
thresholdNumberthe threshold which determine if you are alerted or not
valueNumberThe value of the corresponding metrics
reportStringsee Get analysis result for report object explanation

Curl example

curl --ssl-reqd -H "Content-Type: application/json" -X POST -d '{"token":"9SD9FDS8FDS8DCX8V8CXV4", "monitoringId": 42}' https://www.dareboost.com/api/0.5/monitoring/last-report

Get the reports of the monitoring

POST /monitoring/reports

Request format

{
    "token": "",
    "monitoringId": 0,
    "limit": 30,
    "lastDays": 0,
    "dateFrom": "2016-03-11T00:00:00.000+0100",
    "dateTo": "2016-03-11T23:59:59.000+0100",
    "error": false
}

Parameters

NameRequiredTypeDefaultDescription
tokenYesStringNoneuser's token use for authentication
monitoringIdYesNumberNonethe id of the monitoring
limitNoNumber30limit the number of reports to return (0 = no limit)
lastDaysNoNumberNoneGet report from the lasts X days; X being the value you give to this parameter.
dateFromNoStringNoneRetrieve audit executed after this date; standard formats based on ISO8601, which is yyyy-MM-ddTHH:mm:ssZZ, e.g. 2016-03-11T00:00:00.000+0100
dateToNoStringNoneRetrieve audit executed before this date; standard formats based on ISO8601, which is yyyy-MM-ddTHH:mm:ssZZ, e.g. 2016-03-11T00:00:00.000+0100
errorNoBooleanNoneBy default (no parameter), all results are returned. Specify "false" to retrieve only executions without error. Specify "true" to retrieve only executions with error.

Response format

{
    "status": 200,
    "message": "",
    "statistics": {
        "averageScore": 0,
        "averageWeight": 0,
        "averageRequests": 0,
        "averageLoadTime": 0,
        "averageTimings": {
            "firstByte": 0,
            "domInteractive": 0,
            "loadEvent": 0,
            "startRender": 0,
            "speedIndex": 0,
            "visuallyComplete": 0
        }
    },
    "monitoringData": [
        {
            "state": "OK",
            "errorMessage": "",
            "id": 0,
            "date": 0,
            "score": 0,
            "weight": 0,
            "requests": 0,
            "loadTime": 0,
            "unreachableRequests": 0,
            "timings": {
                "firstByte": 0,
                "domInteractive": 0,
                "loadEventEnd": 0,
                "startRender": 0,
                "speedIndex": 0,
                "visuallyComplete": 0
            }
        }
    ]
}
NameTypeDescription
statusNumberRequest status code (see the list)
messageStringExplanation of the status
averageScoreNumberAverage Dareboost score between 0.0 and 100.0
averageWeightNumberAverage amount of data, in Bytes, fetch by the browser to display the page
averageRequestsNumberAverage number of resources fetch by the browser to display the page
averageTimingsNumberAverage timings; in ms from the initiation of the user navigation.
stateStringCurrent state of the monitoring: "ok", "error".
errorMessageStringerror explanation or ""
idStringunique id for this report (required to get full report results)
dateNumberTimestamp (in ms) representing the date this report was generating
scoreNumberDareboost score between 0 and 100
weightNumberTotal amount of data, in Bytes, fetch by the browser to display the page
requestsNumberTotal number of resources fetch by the browser to display the page
unreachableRequestsNumberTotal number of resources the browser was not able to retrieve
timingsNumberIn ms, time from the initiation of the user navigation. They are set to -1 if the information is not available.

Curl example

curl --ssl-reqd -H "Content-Type: application/json" -X POST -d '{"token":"9SD9FDS8FDS8DCX8V8CXV4", "monitoringId": 42}' https://www.dareboost.com/api/0.5/monitoring/reports

Get the list of your scenarios (transactional analysis)

POST /scenario/list since version 0.2

Request format

{
    "token": "",
    "name": ""
}

Parameters

NameRequiredTypeDefaultDescription
tokenYesStringNoneuser's token use for authentication
nameNoStringNonea string pattern to filter your scenarios and return only those that contain the pattern in their name

Response format

{
    "status": 200,
    "message": "ok",
    "scenarios": [
        {
            "id": 1,
            "name": ""
        }
    ]
}
NameTypeDescription
statusNumberRequest status code (see the list)
messageStringExplanation of the status
scenariosListList of object, one object per scenarios
idNumberunique identifier of the scenario, useful to request its execution
nameNumberThe name of the scenario

Curl example

curl --ssl-reqd -H "Content-Type: application/json" -X POST -d '{"token":"9SD9FDS8FDS8DCX8V8CXV4", "name":"dareboost"}' https://www.dareboost.com/api/0.5/scenario/list

Execute one of your scenario

POST /scenario/launch since version 0.2

Request format

{
    "token": "",
    "scenarioId": ""
}

Parameters

NameRequiredTypeDefaultDescription
tokenYesStringNoneuser's token use for authentication
scenarioIdYesNumberNonethe unique identifier of the scenario you want to execute

Response format

{
    "status": 200,
    "message": "ok",
    "scenarioResultId": ""
}
NameTypeDescription
statusNumberRequest status code (see the list)
messageStringExplanation of the status
scenarioResultIdNumberunique identifier of the future scenario result

Curl example

curl --ssl-reqd -H "Content-Type: application/json" -X POST -d '{"token":"9SD9FDS8FDS8DCX8V8CXV4", "scenarioId":6}' https://www.dareboost.com/api/0.5/scenario/launch

Report of a scenario

POST /scenario/report since version 0.3

Request format

{
    "token": "",
    "scenarioResultId": ""
}

Parameters

NameRequiredTypeDefaultDescription
tokenYesStringNoneuser's token use for authentication
scenarioResultIdYesNumberNoneUnique identifier of the result of a scenario

Response format

{
    "status": 200,
    "message": "",
    "scenarioReport": {
        "resultId": 0,
        "date": 0,
        "viewOnTheWeb": "https://www.dareboost.com/scenario/report/[resultId]",
        "summary": {
            "fail": 0,
            "unavailableResource": 0,
            "browserError": 0,
            "sum": {
                "domInteractive": 0,
                "loadEvent": 0,
                "weight": 0,
                "speedIndex": 0,
                "firstByte": 0,
                "request": 0,
                "visuallyComplete": 0,
                "oldVisuallyComplete": 0,
                "startRender": 0,
                "firstPaint": 0,
                "loadTime": 0
            },
            "average": {
                "domInteractive": 0,
                "loadEvent": 0,
                "weight": 0,
                "speedIndex": 0,
                "firstByte": 0,
                "request": 0,
                "firstPaint": 0,
                "startRender": 0,
                "visuallyComplete": 0,
                "oldVisuallyComplete": 0,
                "loadTime": 0
            }
        },
        "steps": [
            {
                "stepId": 0,
                "stepResultId": "",
                "name": "",
                "description": "",
                "fail": 0,
                "unavailableResource": 0,
                "browserError": 0,
                "timings": {
                    "firstByte": 0,
                    "firstPaint": 0,
                    "domInteractive": 0,
                    "loadEvent": 0,
                    "startRender": 0,
                    "speedIndex": 0,
                    "visuallyComplete": 0,
                    "oldVisuallyComplete": 0
                },
                "weight": 0,
                "requestsCount": 0,
                "loadTime": 0
            }
        ]
    }
}
NameTypeDescription
statusNumberRequest status code (see the list)
messageStringExplanation of the status
scenarioReport.scenarioIdNumberUnique identifier of the scenario
scenarioReport.nameStringThe name of the scenario
scenarioReport.resultIdNumberUnique identifier of scenario result
scenarioReport.dateNumberTimestamp (in ms) representing the date this report was generating
scenarioReport.viewOnTheWebStringThe report URL on dareboost.com
scenarioReport.summary.failNumberThe number of action that have failed
scenarioReport.summary.unavailableResourceNumberTotal number of resources the browser was not able to retrieve
scenarioReport.summary.browserErrorNumberTotal number of browser log found
scenarioReport.summary.sumObjectTotal number of several metrics like timings
scenarioReport.summary.averageObjectAverage number of several metrics like timings
scenarioReport.stepsObjectList of the steps of the scenario

Curl example

curl --ssl-reqd -H "Content-Type: application/json" -X POST -d '{"token":"9SD9FDS8FDS8DCX8V8CXV4", "scenarioResultId": "576148371b920e7580f66cf7"}' https://www.dareboost.com/api/0.5/scenario/report

Note

The execution of a scenario is not instantaneous and can take some times, we recommend you to wait at least 5 seconds after the launch before trying to get the result.

Reports of a scenario

POST /scenario/reports since version 0.3

Request format

{
    "token": "",
    "scenarioId": "",
    "limit": 30,
    "lastDays": 0,
    "dateFrom": "2016-03-11T00:00:00.000+0100",
    "dateTo": "2016-03-11T23:59:59.000+0100",
    "error": false
}

Parameters

NameRequiredTypeDefaultDescription
tokenYesStringNoneuser's token use for authentication
scenarioIdYesNumberNonethe unique identifier of the scenario you want to execute
limitNoNumber30limit the number of scenario reports to return (0 = no limit)
lastDaysNoNumberNoneGet report from the lasts X days; X being the value you give to this parameter.
dateFromNoStringNoneRetrieve scenario results executed after this date; standard formats based on ISO8601, which is yyyy-MM-ddTHH:mm:ssZZ, e.g. 2016-03-11T00:00:00.000+0100
dateToNoStringNoneRetrieve scenario results executed before this date; standard formats based on ISO8601, which is yyyy-MM-ddTHH:mm:ssZZ, e.g. 2016-03-11T00:00:00.000+0100
errorNoBooleanNoneBy default (no parameter), all results are returned. Specify "false" to retrieve only executions without error (status OK or CHECK_FAILED). Specify "true" to retrieve only executions with error (status different from OK and CHECK_FAILED).

Response format

{
    "status": 200,
    "message": "OK",
    "scenario": {
        "id": 0,
        "name": "",
        "reports": [
            {
                "resultId": 0,
                "date": 0,
                "viewOnTheWeb": "https://www.dareboost.com/scenario/report/[resultId]",
                "summary": {
                    "fail": 0,
                    "unavailableResource": 0,
                    "browserError": 0,
                    "sum": {
                        "domInteractive": 0,
                        "loadEvent": 0,
                        "weight": 0,
                        "speedIndex": 0,
                        "firstByte": 0,
                        "request": 0,
                        "visuallyComplete": 0,
                        "oldVisuallyComplete": 0,
                        "startRender": 0,
                        "firstPaint": 0,
                        "loadTime": 0
                    },
                    "average": {
                        "domInteractive": 0,
                        "loadEvent": 0,
                        "weight": 0,
                        "speedIndex": 0,
                        "firstByte": 0,
                        "request": 0,
                        "firstPaint": 0,
                        "startRender": 0,
                        "visuallyComplete": 0,
                        "oldVisuallyComplete": 0,
                        "loadTime": 0
                    }
                },
                "steps": [
                    {
                        "stepId": 0,
                        "stepResultId": "",
                        "name": "",
                        "description": "",
                        "fail": 0,
                        "unavailableResource": 0,
                        "browserError": 0,
                        "timings": {
                            "firstByte": 0,
                            "firstPaint": 0,
                            "domInteractive": 0,
                            "loadEvent": 0,
                            "startRender": 0,
                            "speedIndex": 0,
                            "visuallyComplete": 0,
                            "oldVisuallyComplete": 0
                        },
                        "weight": 0,
                        "requestsCount": 0,
                        "loadTime": 0
                    }
                ]
            }
        ]
    }
}
NameTypeDescription
statusNumberRequest status code (see the list)
messageStringExplanation of the status
scenario.idNumberunique identifier of the scenario
scenario.nameStringThe name of the scenario linked to this results
scenario.reportsObjectThe list of result for this scenario, see "Report of a scenario" for more details

Curl example

curl --ssl-reqd -H "Content-Type: application/json" -X POST -d '{"token":"9SD9FDS8FDS8DCX8V8CXV4", "scenarioId": "1"}' https://www.dareboost.com/api/0.5/scenario/reports

Step report of a scenario

POST /scenario/step/report since version 0.3

Request format

{
    "token": "",
    "stepId": ""
}

Parameters

NameRequiredTypeDefaultDescription
tokenYesStringNoneuser's token use for authentication
stepIdYesStringNoneunique identifier of the step result of a scenario

Response format

{
    "status": 200,
    "message": "OK",
    "step": {
        "id": "",
        "previousStepId": "",
        "nextStepId": "",
        "stepResultId": 0,
        "date": 0,
        "timings": {
            "firstByte": 0,
            "firstPaint": 0,
            "domInteractive": 0,
            "loadEvent": 0,
            "startRender": 0,
            "speedIndex": 0,
            "visuallyComplete": 0,
            "oldVisuallyComplete": 0
        },
        "browserError": "[]",
        "unavailableResource": "{}",
        "actionsResult": [
            {
                "id": 0,
                "time": 0,
                "status": "",
                "message": ""
            }
        ]
    }
}
NameTypeDescription
statusNumberRequest status code (see the list)
messageStringExplanation of the status
step.idNumberUnique identifier of the result of this step
step.previousStepIdStringUnique identifier of the next previous of the scenario
step.nextStepIdStringUnique identifier of the next step of the scenario
step.stepResultIdStringUnique identifier of the step definition of this result step
step.dateNumberTimestamp (in ms) representing the date this report was generating, get from the (get scenario report)
step.timingsObjectTimings information details in ms. They are set to -1 if the information is not available.
step.timings.visuallyCompleteObjectLast visual change (in ms).
step.timings.oldVisuallyCompleteObject100% of the final result is displayed for the first time (in ms). This key will be removed in future releases, you should prefer "visuallyComplete".
step.browserErrorObjectList of browser logs found
step.unavailableResourceObjectMap of resources that the browser was not able to retrieve, with the key corresponding to the url and the value corresponding to the HTTP code
step.actionsResult.idNumberUnique identifier of the action
step.actionsResult.timeNumberExecution time of this action
step.actionsResult.statusStringKeyword to define the result of the action
step.actionsResult.messageStringExplanation of the action status

Curl example

curl --ssl-reqd -H "Content-Type: application/json" -X POST -d '{"token":"9SD9FDS8FDS8DCX8V8CXV4", "stepId": "576148ed1b920e7580f66cfe"}' https://www.dareboost.com/api/0.5/scenario/step/report

Retrieve HAR from an analysis

POST/api/0.5/scenario/report/har

Request format

{
    "token": "",
    "scenarioStepResultId": ""
}

Parameters

NameRequiredTypeDefaultDescription
tokenYesStringNoneuser's token use for authentication
scenarioStepResultIdYesStringNoneunique identifiant of the scenario step result, obtained when launch a scenario execution.

Response format

{
    "status": "",
    "message": "",
    "har": {}
}
NameTypeDescription
statusNumberRequest status code (see the list)
messageStringExplanation of the status
harObjectThe har data, more information on the format here

Curl example

curl --ssl-reqd -H "Content-Type: application/json" -X POST -d '{"token":"9SD9FDS8FDS8DCX8V8CXV4", "scenarioStepResultId": "54084e3ce4b0f241b256c51a"}' https://www.dareboost.com/api/0.5/scenario/report/har

Get a list of your events

POST/event/list

Request format

{
    "token": "",
    "key": "",
    "dateFrom": "",
    "monitoringId": "",
    "scenarioId": ""
}

Parameters

NameRequiredTypeDefaultDescription
tokenYesStringNoneUser's token use for authentication
keyNoStringNoneThe event's key
dateFromNoDateNoneGet events which start after begin; standard formats based on ISO8601, which is yyyy-MM-ddTHH:mm:ssZZ, e.g. 2016-03-11T00:00:00.000+0100
monitoringIdNoStringNoneGet events related to the monitoring identify by monitoringId.
scenarioIdNoStringNoneGet events related to the scenario identify by scenarioId.

Response format

{
    "status": "",
    "message": "",
    "events": [
        {
            "key": "",
            "text": "",
            "date": "2016-10-07T12:00:00.000+02:00"
        }
    ]
}
NameTypeDescription
statusNumberRequest status code (see the list)
messageStringExplanation of the status
eventsArrayAn array containing all the events fulfilling all of the request's filters
keyArrayThe event's key
textArrayThe events text
dateArrayThe event's date; standard formats based on ISO8601, which is yyyy-MM-ddTHH:mm:ssZZ, e.g. 2016-03-11T00:00:00.000+0100

Curl example

curl --ssl-reqd -H "Content-Type: application/json" -X POST -d '{"token":"9SD9FDS8FDS8DCX8V8CXV4", "key": "release 09/16"}' https://www.dareboost.com/api/0.5/event/list

Create a new event

POST/event/create

Request format

{
    "token": "",
    "key": "",
    "text": "",
    "date": "2016-10-07T06:00:00.000+02:00",
    "monitorings": [],
    "scenarios": []
}

Parameters

NameRequiredTypeDefaultDescription
tokenYesStringNoneUser's token use for authentication
keyYesStringNoneThe event's key
textYesStringNoneThe events text
dateYesStringNoneThe event's date; standard formats based on ISO8601, which is yyyy-MM-ddTHH:mm:ssZZ, e.g. 2016-03-11T00:00:00.000+0100
monitoringsNoArrayNoneA list of monitoring ids that you can retrieve with Get the list of monitorings.
scenariosNoArrayNoneA list of scenarios ids that you can retrieve with Get the list of your scenarios.

Response format

{
    "status": 200,
    "message": "OK",
    "key": ""
}
NameTypeDescription
statusNumberRequest status code (see the list)
messageStringExplanation of the status
keyStringThe key of the event you just created.

Curl example

curl --ssl-reqd -H "Content-Type: application/json" -X POST -d '{"token":"574edfe40cf27f447f1c0512", "monitorings":[4437], "scenarios": [6,3], "key":"release 10/08/16", "text": "relase october 8 description", "date": "2016-10-07T06:00:00.000+02:00"}' https://www.dareboost.com/api/0.5/event/create

Delete an event

POST/event/delete

Request format

{
    "token": "",
    "key": ""
}

Parameters

NameRequiredTypeDefaultDescription
tokenYesStringNoneUser's token use for authentication
keyYesStringNoneThe event's key

Response format

{
    "status": 200,
    "message": "OK",
    "key": ""
}
NameTypeDescription
statusNumberRequest status code (see the list)
messageStringExplanation of the status
keyStringThe key of the event you just deleted.

Curl example

curl --ssl-reqd -H "Content-Type: application/json" -X POST -d '{"token":"574edfe40cf27f447f1c0512", "key": "release 10/08/16"}' https://www.dareboost.com/api/0.5/event/delete