List a monitored page's scans
const url = 'https://api.us.headerhawk.com/v1/sites/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/pages/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/scans?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/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/scans?limit=50' \ --header 'Authorization: Bearer <token>'A monitored page’s scheduled scans, newest first, with the page’s
latest complete scan beside them: its current state, however many
failed scans followed it. A scan here carries its headers and what
changed since the last one; GET a single scan for its full graded
result.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The site’s id.
The monitored page’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 scans
object
object
The URL fetched, as the page named it when it was scanned.
complete, or failed with a failureReason. An open enum.
As on LatestPageScan.
The scan rubric’s version: a grade is compared only with one given under the same rubric.
The letter grade HeaderHawk’s scan rubric gave the page’s headers:
A+, A, B, C, D or F. Null for a failed scan.
The score behind the grade, 0 to 100; null for a failed scan.
Where the fetch ended after redirects.
The watched security headers in comparable form, each null when the
page did not send it; null for a failed scan. A policy’s directives
are sorted with every nonce replaced by 'nonce-*'; other values are
lowercased with whitespace collapsed. A header sent more than once is
its lines, sorted, joined with a newline.
object
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.
The page’s latest complete scan, its current state, however many failed scans followed it. Absent until it has had one.
object
The URL fetched, as the page named it when it was scanned.
complete, or failed with a failureReason. An open enum.
As on LatestPageScan.
The scan rubric’s version: a grade is compared only with one given under the same rubric.
The letter grade HeaderHawk’s scan rubric gave the page’s headers:
A+, A, B, C, D or F. Null for a failed scan.
The score behind the grade, 0 to 100; null for a failed scan.
Where the fetch ended after redirects.
The watched security headers in comparable form, each null when the
page did not send it; null for a failed scan. A policy’s directives
are sorted with every nonce replaced by 'nonce-*'; other values are
lowercased with whitespace collapsed. A header sent more than once is
its lines, sorted, joined with a newline.
object
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": [ { "status": "complete", "changes": { "headers": [ { "header": "content-security-policy", "change": "added" } ] } } ], "latestComplete": { "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.