Launch an URL benchmark

Pre-resquisites :

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 :