Skip to content

Latest commit

 

History

History
97 lines (74 loc) · 4.25 KB

File metadata and controls

97 lines (74 loc) · 4.25 KB
title Reporting
icon chart-line
iconType light
description Track API usage and performance.

import { companyName, apiEndpoint } from '/snippets/whitelabel/config.mdx'; import { Reference } from '/snippets/whitelabel/reference.mdx'; import { Throttling } from '/snippets/whitelabel/throttling.mdx'; import Authentication from '/snippets/whitelabel/authentication.mdx'; import Dates from '/snippets/whitelabel/usage/dates.mdx'; import Datetimes from '/snippets/whitelabel/usage/datetimes.mdx'; import Emails from '/snippets/whitelabel/usage/emails.mdx'; import Service from '/snippets/whitelabel/usage/service.mdx'; import Services from '/snippets/whitelabel/usage/services.mdx'; import Hour from '/snippets/whitelabel/usage/hour.mdx';

Service usage

{companyName}'s reporting service buckets and updates consumption, success, and latency metrics at intervals of 1 hour. The service has a RESTful interface that accepts GET requests at https://‍{apiEndpoint}/usage.

Report parameters

You should specify an ISO date or time range to generate a report:

The API will return a JSON array:

[{
  "email": "user@example.com",
  "from": "2025-12-25T00:00:00+00:00",
  "to": "2025-12-25T15:00:00+00:00",
  "service": "browser",
  "result": "success",
  "calls": 17208,
  "meanSecs": 6.78
}, {
  "email": "user@example.com",
  "from": "2025-12-25T01:00:00+00:00",
  "to": "2025-12-25T15:00:00+00:00",
  "service": "browser",
  "result": "failure",
  "calls": 18,
  "meanSecs": 60.22
}]

Your report can optionally be filtered by one or more services:

You can also disaggregate the metrics:

These are the request keys and values:

Key Required Value
from The ISO datetime to select data starting from, inclusively
to The ISO datetime to select data up to, inclusively
email [Whitelabelers only] The (case-insensitive) email address of the user to select data for; multiple email addresses can be provided by repeating the key; data for all email addresses is included by default
service The service to select data for, search or browser; multiple services can be provided by repeating the key; data for all services is included by default
by The time unit to group the data by, hour, day (planned), or total; total is the default unit

These are the response keys and values:

Key Value
email The email address of the user whose data is selected
from The ISO datetime of the first datapoint
to The ISO datetime of the last datapoint
service The service included in the data, search or browser
result The type of result included in the data, success or failure
calls The number of API calls of the service and result type
meanSecs The average number of elapsed seconds of the API calls

Additional examples