The key making this request, and its tenant
const url = 'https://api.us.headerhawk.com/v1/me';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/me \ --header 'Authorization: Bearer <token>'The one call that always works with a valid key: check a key, see which tenant it belongs to and when it expires, and read the budgets it is spending. It does not read reported data, so it spends only the key’s own budget.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”The key and its tenant
object
object
A HeaderHawk plan. An open enum.
How many days of reports HeaderHawk keeps for you.
object
The 8 characters after hh_live_, as Settings lists the key.
object
object
Requests in each window.
object
Requests in each window.
Example
{ "tenant": { "plan": "free" }}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" }}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.