DocumentationStatisticsOverview

Statistics

The Statistics API gives you read-only usage counts for your company’s Doc Gen account. Other Doc Gen applications record an event each time something happens, and the API returns those events as counts per hour.

Statistics has no screens of its own. You call it from a script or a reporting tool, for example Power BI or Prometheus.

You can use it to:

  • See how often Doc Gen is used and how that changes over time
  • Break the counts down by template, source, distribution, environment and area
  • Feed a dashboard or a monitoring system

What you get back

Each row is a count of events for one hour and one combination of event, system, template, source, distribution, environment, area and event detail. See Data Models for every field.

You only ever see your own company’s data. The call must be made by a client or user that is tied to a company, see Authentication.

Events are stored only while your company has a valid Statistics licence. The data is aggregated by hour and arrives through a queue, so it is not a live feed. See How the Data Is Collected.

Quick start

Pick your environment and the hosts on the pages update to match.

  1. Request a token from https://identity-v2.metaforce.net/connect/token. See Authentication.
  2. Call https://api.statistics-v2.metaforce.net/analytics with a startDate, a toDate and Authorization: Bearer <access_token>.
  3. Read data, and request the next pageNumber until you reach totalPages. See API Endpoints.

In this section