Skip to main content

Update

Run a project update.

Request

GET or POST https://api.wattspeed.com/v1/update

Headers
Authorization  string required

Your API token.

Parameters
url  string required

The project's URL - should be URL encoded.


device  string 

⚠️ If not set, update will be performed on all devices.
Allowed values: mobile, desktop.


mode  string 

Allowed values: sync, async.

sync - wait for the update to finish; (default)

async - run the update in the background.

Example request

GET

https://api.wattspeed.com/v1/projects?url=https://wattspeed.com

POST

{
"url": "https://wattspeed.com"
}

Responses

Synchronous

{
"desktop": {
"s_carolina": {
"lighthouse": {
...LIGHTHOUSE_OBJECT,
"crux": {
"url": {
...CRUX_URL_OBJECT
},
"origin": {
...CRUX_ORIGIN_OBJECT
}
},
"date": "2022-08-01T00:37:21", // The UTC date and time for when the audit was generated
"elementCount": 221 // The total number of HTML elements
},
"median": 1,
"locations": [
"s_carolina"
],
"defaultLocation": "s_carolina"
}
},
"mobile": {
"london": {
"lighthouse": {
...LIGHTHOUSE_OBJECT,
"crux": {
"url": {
...CRUX_URL_OBJECT
},
"origin": {
...CRUX_ORIGIN_OBJECT
}
},
"date": "2022-08-01T00:37:21", // The UTC date and time for when the audit was generated
"elementCount": 221 // The total number of HTML elements
},
"median": 1,
"locations": [
"london"
],
"defaultLocation": "london"
}
}
}

Asynchronous

{
"ok": 1
}

More information on the actual properties of the lighthouse object can be found here. The CrUX object contains the CWV data for both URL and origin (if exists). The properties of the CrUX URL and origin objects can be found here.