Greenspector Documentation has been moved.
Please go to
https://greenspectorstudio.atlassian.net/l/cp/TDhqYDSu
Launch an URL benchmark
Pre-resquisites :
Access to the API (Greenspector account)
Private token (On http://app.greenspector.com/ , click on your username then Preferences)
URL of the website to benchmark
Swagger de l’API : https://app.greenspector.com/api/ui/#
Create an application
Target URL : https://app.greenspector.com
URI : /api/applications
Method : POST
Headers :
Content-Type: "application/json"
Private-Token: user’s private token
Body :
{
"name":"My App",
"description":"Description"
}
Create a job request
Target URL : https://app.greenspector.com
URI : /api/testbench/jobs
Method : POST
Headers :
Content-Type: "application/json"
Private-Token: user’s private token
Body :
{
"application": "My app",
"version": "My version (string)",
"job": {
"mode": "url",
"url": "https://greenspector.com/fr/accueil/",
"scenario": "avance",
"iterations": 1,
"cache": false,
"browser": "chrome",
"networkMode": "WIFI"
},
"environment": {
"platform": "mobile",
"os": "android",
"version": "8",
"device": "Samsung - Galaxy S7"
}
}
Example :
{
"application": "My app",
"version": "1.0.0",
"job": {
"mode": "url",
"url": "https://greenspector.com/fr/accueil/",
"scenario": "avance",
"iterations": 1,
"cache": false,
"browser": "chrome",
"networkMode": "WIFI"
},
"environment": {
"platform": "mobile",
"os": "android",
"version": "8",
"device": "Samsung - Galaxy S7"
}
}
Response :
Supervise job state
Target URL : https://app.greenspector.com
URI : /api/testbench/jobs/:jobId
Method : GET
Headers :
Private-Token: user’s private token
Response :
Retrieve the job’s report :
Target URL : https://app.greenspector.com
URI : /api/audits/:auditId/report
Method : GET
Headers :
Private-Token: user’s private token
Response :