List a site's monitored pages
const url = 'https://api.us.headerhawk.com/v1/sites/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/pages?limit=50';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.us.headerhawk.com/v1/sites/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/pages?limit=50' \ --header 'Authorization: Bearer <token>'The pages you marked on the site, payment pages and others, in the order the site lists them, each with its latest scheduled scan. Every plan can read them, including one that no longer scans them.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The site’s id.
Query Parameters
Section titled “Query Parameters”How many items a page holds.
The previous page’s nextCursor. Omit it for the first page.
Responses
Section titled “Responses”A page of monitored pages
object
object
payment: a page with a payment form or a payment provider’s iframe,
the pages PCI DSS 6.4.3 and 11.6.1 are about. other: a page worth
scanning that is not one, such as a login page. An open enum.
scheme://host/path: which reports and scripts belong to the
page. In the path * matches within one segment and **, as
the whole last segment, any remainder. Query strings and
fragments are never part of a page.
The one URL the scheduled scans fetch; always set on a payment page.
The page’s latest scheduled scan; null until it has had one.
object
complete, or failed with a failureReason. An open enum.
The letter grade HeaderHawk’s scan rubric gave the page’s headers:
A+, A, B, C, D or F. Null for a failed scan.
Why the scan failed, or null for a complete scan: bot_challenge,
access_denied, server_error, timeout, tls_failure,
connection_failed, too_many_redirects, not_html, or
not_allowed when the page or a redirect led off the site’s hosts
or to an address scans do not connect to. A string, so a new
reason does not break a client.
Failures in a row, this one included; 0 for a complete scan.
What differs from the page’s last complete scan.
object
One watched header that differs from the last complete scan.
object
The header’s name, lowercase. An open enum.
An open enum.
The last complete scan’s grade, when this one is lower under the same rubric; otherwise null.
The rubric changed since the last complete scan, so the grade was not compared.
Example
{ "data": [ { "kind": "payment", "latestScan": { "status": "complete", "changes": { "headers": [ { "header": "content-security-policy", "change": "added" } ] } } } ]}Headers
Section titled “Headers”The budget nearest to running out, per minute.
What is left of that budget this minute.
Seconds until that budget starts again.
A parameter was refused, or one the operation does not take was sent. The message names it.
object
object
What went wrong. An open enum: treat a code you do not know by its HTTP status.
For people. Branch on code.
Quote it when you write to us about this request.
Example
{ "error": { "code": "bad_request" }}invalid_api_key: no key, or one that is malformed, unknown, revoked
or expired. One answer for all of them.
object
object
What went wrong. An open enum: treat a code you do not know by its HTTP status.
For people. Branch on code.
Quote it when you write to us about this request.
Example
{ "error": { "code": "bad_request" }}plan_upgrade_required: the tenant’s plan does not include API access
(the key works again when it does), or does not include what this
operation reads.
object
object
What went wrong. An open enum: treat a code you do not know by its HTTP status.
For people. Branch on code.
Quote it when you write to us about this request.
Example
{ "error": { "code": "bad_request" }}No such resource in your tenant.
object
object
What went wrong. An open enum: treat a code you do not know by its HTTP status.
For people. Branch on code.
Quote it when you write to us about this request.
Example
{ "error": { "code": "bad_request" }}rate_limited: over a budget. Wait Retry-After seconds.
object
object
What went wrong. An open enum: treat a code you do not know by its HTTP status.
For people. Branch on code.
Quote it when you write to us about this request.
Example
{ "error": { "code": "bad_request" }}Headers
Section titled “Headers”Seconds to wait before trying again.