List browser deprecations and interventions
const url = 'https://api.us.headerhawk.com/v1/browser-changes?reportType=deprecation&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/browser-changes?reportType=deprecation&limit=50' \ --header 'Authorization: Bearer <token>'The deprecated APIs your pages use and the interventions browsers made on them, one entry per API, type and source file, ordered by the date the browser expects to remove the API (soonest first, then those with no date), then by volume; with the totals and the volume per browser. Reads reported data, so it spends the tenant’s budget too.
Both types are sampled, so every estimated count stands for the
reports sampling left out; sampled says whether any was.
Window: at most 31 days, the last 31 by default; longer is 400.
Each page reads every deprecation and intervention in the window
twice, once for the totals. Measured worst case: 38 ms for 14,660
reports (5 MB) in 90 days.
At most the first 10,000 entries of a query can be paged through.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Only this site’s reports. Another tenant’s site, or none, is 404.
Only deprecations, or only interventions. Defaults to both.
Only reports received at or after this instant. Defaults to the start
of your retention window, or where the operation bounds its window, to
that many days before to. Earlier than your retention reaches is
400.
Only reports received before this instant. Defaults to now.
How many items a page holds.
The previous page’s nextCursor. Omit it for the first page.
Responses
Section titled “Responses”A page of entries, and the totals
object
object
deprecation or intervention. An open enum.
The browser’s identifier for the API.
The script that used it, without its query; null when the browser did not say.
The browser’s own explanation.
When the browser expects to remove the API; null when it has not said.
Distinct pages, without their query, that used it.
Up to three of those pages, the most frequent first.
Across every entry in the window, not only this page’s.
object
Distinct APIs.
How many of them have an anticipated removal date.
The estimated reports per browser across the window, largest first.
object
The browser family; empty when the user agent could not be read.
Example
{ "data": [ { "reportType": "deprecation" } ]}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.
rate_limit_unavailable or upstream_unavailable: HeaderHawk could
not serve this now. Nothing is wrong with the request; try again after
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.