Skip to main content

How to use the Analytics API

The Analytics API provides access to your EWA analytics data. Once installed, you can query data from both the Clean and Core layers (Consepts) using the GraphQL endpoint, replacing direct database connections in your existing data integration workflows

General information

Installation and access

First you must install both the Analytics API Service and the Analytics Data Processing Service according to the installation guides. The API will then be available in your environment and you are responsible for hosting. The API URL is therefore defined by you during installation.

Authentication

The API is authenticated using an API key. This key is set and managed by you according to the installation guide. The API key must be included in the request header for all API calls. See Your first query for a practical examples.

  • Header name: BLIKSUND-X-API-KEY (or as configured in your .env file)
  • Header value: Your configured API key

Data structure and schemas

The data structure in the API for the Clean and Core layers mirrors what is stored in the Analytics database. Everything is documented under Analytics Data Processing. This means:

  • Table names and column names are identical to your Analytics database
  • Relationships between tables remain the same

Getting started

1. Verify your installation and access

After installation, verify that the API is running by opening a browser and navigating to: http://your-server:port/clean/graphql. Replace your-server and port with your actual server address and configured port. If the installation was successful, you should see the GraphQL interface (interactive GraphQL explorer).

alt text

2. Explore the GraphQL interface

The GraphQL interface provides an interactive way to explore and test your API queries.

Key features:

  • Query editor (left panel): Write your GraphQL queries here
  • Results panel (right panel): View query results
  • Documentation explorer: Click "Docs" to browse all available tables and fields
  • Query history: Access previously run queries

3. Your first query

Try this simple query to confirm everything is working:

query MyQuery {
records {
id
status
en_GB
model_version
created_at
updated_at
deleted_at
}
}

This query returns all available types in your schema. You should see a list including your available tables.

alt text

3. Integration with code

This documentation provides examples on how to interact with the API using Python or PowerBI: Examples

Troubleshooting

Connection refused

  • Verify the API service is running (check Windows Services)
  • Confirm the correct server URL and port
  • Check firewall settings

Authentication failed

  • Verify your API key is correct
  • Ensure the API key header name matches your configuration
  • Check that the API key is included in every request

Empty or unexpected results

  • Use GraphiQL to test your query interactively (GraphQL Interface)
  • Check the Documentation explorer for correct field names
  • Verify your filter conditions are correct

Performance issues

  • Use filtering for large datasets. Date filters is often a good option
  • Request only the fields you need. An advantage with GraphQL is that you do not have to select the whole object, it can be adjusted based on your needs

Additional resources