Skip to content

List the reports behind an issue

GET
/v1/sites/{siteId}/issues/{issueId}/reports
curl --request GET \
--url 'https://api.us.headerhawk.com/v1/sites/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/issues/example/reports?reportType=csp-violation&limit=50' \
--header 'Authorization: Bearer <token>'

The reports an issue groups, newest first. reportType is the issue’s own, as the issue list returned it: an issue is identified by its id and its type together. Reads reported data, so it spends the tenant’s budget too.

A report’s fields are written by whichever browser loaded your page, so treat them as untrusted text.

siteId
required
string format: uuid

The site’s id.

issueId
required
string
>= 1 characters <= 128 characters

The issue’s id.

reportType
required

What kind of report an issue groups. An open enum.

string
Allowed values: csp-violation integrity-violation coep coop permissions-policy-violation document-policy-violation connection-allowlist

The issue’s reportType.

limit
integer
default: 50 >= 1 <= 200

How many items a page holds.

cursor
string
>= 1 characters <= 1024 characters

The previous page’s nextCursor. Omit it for the first page.

A page of the issue’s reports

Media typeapplication/json
object
data
required
Array<object>

One report a browser sent. Every field after documentUrl is null where the report’s type does not carry it. Written by the browser that loaded your page: treat it as untrusted text.

object
id
required
string
siteId
required
string format: uuid
reportType
required

Every type of report HeaderHawk stores and lists. The issue types (IssueReportType) and deprecation, intervention, network-error and crash. An open enum.

string
Allowed values: csp-violation integrity-violation coep coop permissions-policy-violation document-policy-violation connection-allowlist deprecation intervention network-error crash
receivedAt
required
string format: date-time
documentUrl
required

The page the browser was on.

string
disposition
required

enforce or report, where the type has one.

string
nullable
effectiveDirective
required
string
nullable
blockedUrl
required
string
nullable
sourceFile
required
string
nullable
lineNumber
required
integer
nullable
columnNumber
required
integer
nullable
sample
required
string
nullable
feature
required

The policy-controlled feature, where the type names one.

string
nullable
message
required
string
nullable
nextCursor
required
string
nullable
Example
{
"data": [
{
"reportType": "csp-violation"
}
]
}
RateLimit-Limit
integer

The budget nearest to running out, per minute.

RateLimit-Remaining
integer

What is left of that budget this minute.

RateLimit-Reset
integer

Seconds until that budget starts again.

A parameter was refused, or one the operation does not take was sent. The message names it.

Media typeapplication/json
object
error
required
object
code
required

What went wrong. An open enum: treat a code you do not know by its HTTP status.

string
Allowed values: bad_request validation_error invalid_api_key plan_upgrade_required forbidden not_found rate_limited rate_limit_unavailable upstream_unavailable internal_error
message
required

For people. Branch on code.

string
requestId
required

Quote it when you write to us about this request.

string
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.

Media typeapplication/json
object
error
required
object
code
required

What went wrong. An open enum: treat a code you do not know by its HTTP status.

string
Allowed values: bad_request validation_error invalid_api_key plan_upgrade_required forbidden not_found rate_limited rate_limit_unavailable upstream_unavailable internal_error
message
required

For people. Branch on code.

string
requestId
required

Quote it when you write to us about this request.

string
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.

Media typeapplication/json
object
error
required
object
code
required

What went wrong. An open enum: treat a code you do not know by its HTTP status.

string
Allowed values: bad_request validation_error invalid_api_key plan_upgrade_required forbidden not_found rate_limited rate_limit_unavailable upstream_unavailable internal_error
message
required

For people. Branch on code.

string
requestId
required

Quote it when you write to us about this request.

string
Example
{
"error": {
"code": "bad_request"
}
}

No such resource in your tenant.

Media typeapplication/json
object
error
required
object
code
required

What went wrong. An open enum: treat a code you do not know by its HTTP status.

string
Allowed values: bad_request validation_error invalid_api_key plan_upgrade_required forbidden not_found rate_limited rate_limit_unavailable upstream_unavailable internal_error
message
required

For people. Branch on code.

string
requestId
required

Quote it when you write to us about this request.

string
Example
{
"error": {
"code": "bad_request"
}
}

rate_limited: over a budget. Wait Retry-After seconds.

Media typeapplication/json
object
error
required
object
code
required

What went wrong. An open enum: treat a code you do not know by its HTTP status.

string
Allowed values: bad_request validation_error invalid_api_key plan_upgrade_required forbidden not_found rate_limited rate_limit_unavailable upstream_unavailable internal_error
message
required

For people. Branch on code.

string
requestId
required

Quote it when you write to us about this request.

string
Example
{
"error": {
"code": "bad_request"
}
}
Retry-After
integer

Seconds to wait before trying again.

rate_limit_unavailable or upstream_unavailable: HeaderHawk could not serve this now. Nothing is wrong with the request; try again after Retry-After seconds.

Media typeapplication/json
object
error
required
object
code
required

What went wrong. An open enum: treat a code you do not know by its HTTP status.

string
Allowed values: bad_request validation_error invalid_api_key plan_upgrade_required forbidden not_found rate_limited rate_limit_unavailable upstream_unavailable internal_error
message
required

For people. Branch on code.

string
requestId
required

Quote it when you write to us about this request.

string
Example
{
"error": {
"code": "bad_request"
}
}
Retry-After
integer

Seconds to wait before trying again.