To create a Lighthouse Task object or change an object that already exists, use the descriptions of the object fields provided in this article. Any non-required keys you don’t specify will be set to default or remain unchanged (in case of update), so you can specify or update just a subset of the object’s data.

Sample JSON Object
{
    "Url": "http://dotcom-monitor.com",
    "User": "",
    "Password": "",
    "CheckCertificate": "NO",
    "Metric": "Performance\\Overall Score",
    "LowerMetricThreshold": 0,
    "UpperMetricThreshold": 0,
    "AlertOnError": false,
    "DNSResolveMode": "TTL Cached",
    "DNSserverIP": "",
    "CustomDNSHosts": null,
    "Device_Id": 114744,
    "Id": 439958,
    "Task_Type_Id": 29,
    "Name": "http://dotcom-monitor.com"
}

Fields Description

Field Type Required/Optional Description
URL

string

required

Specifies a destination address. The URL must starts with HTTP:// or HTTPS:// .

Example:
"Url""http://msn.com"
User

string

optional

This field contains a username for HTTP basic access authentication.

Example:
"UserName""username"
Password

string

optional

This field contains a password for HTTP basic access authentication.

Example:
"UserPass""password"
CheckCertificate

boolean

required

When enabled – certificates issues will be revealed.

Example:
"CheckCertificate"false
Metric

string

required

The web page audit metric.

POSSIBLE VALUES:

  • Performance\\Overall Score
  • Accessibility\\Overall Score
  • Best Practices\\Overall Score
  • SEO\\Overall Score
  • Performance\\First Contentful Paint
  • Performance\\Speed Index
  • Performance\\Time to Interactive
  • Performance\\First Meaningful Paint
  • Performance\\First CPU Idle
  • Performance\Max Potential First Input Delay
Example:
"Metric""SEO\\Overall Score"
LowerMetricThreshold

int32

optional

The lower limit for a selected metric.
UpperMetricThreshold

int32

optional

The upper limit for a selected metric.
AlertOnError

boolean

optional

Send alerts based on the threshold that was set.

Example:

"AlertOnError"false
DNSResolveMode string optional POSSIBLE VALUES:

  • Device Cached
  • Non Cached
  • TTL Cached
  • External DNS Server

For detailed explanation, see the DNS Mode Option article.

DNSserverIP string optional The field for a custom DNS server IP address. For detailed explanation, see the DNS Mode Option article.
Device_Id

int32

required

READ ONLY Field. The unique device id.

Example:
"Device_Id": 8692
Id

int32

required

*Only for edit operations

READ ONLY Field. The unique task id. Do not use for create operations.

Example:
"Id": 18016
Task_Type_Id

int32

required

The type of the task.

Example:
"Task_Type_Id": 29
Name

string

optional

The name of the task.

Example:
"Name""Lighthouse task"