Management API

With the Management API, you can easily create and manage your measurements, including setting up measurement campaigns, defining targets and goals, and managing measurement data. You can also access detailed information about each measurement and its associated data, including metrics and performance indicators.

To get started with our Management API, simply visit the link below and explore our visually rendered documentation. You'll find detailed descriptions of each endpoint, as well as examples of how to use them in your own applications. Our documentation makes it easy to get up and running with the Management API in no time.

Explore the Management API

Authentication

All API calls to the Management API require a valid API key. You can create a new API key in the Brand Metrics Web Portal and include it in the Authorization HTTP header of each API request.

Bash:

curl "<https://api.brandmetrics.com/api/v1/measurement>" -H "X-API-KEY: {api_key}"

PowerShell:

Invoke-WebRequest -Uri <https://api.brandmetrics.com/api/v1/measurement> -Method 'GET' -Headers @{'X-API-KEY' = '{api_key}'}

Working with the API

Brand Metrics's OpenAPI 3.0 specification allows you to explore the API e.g. by using Swagger Inspector and then use Swagger Codegen to generate server stubs and client SDKs in various programming languages.

Below is an example on how to connect to the API using Python.

# Import the generated client
import swagger_client

# Set the API key to use
api_key = ""

# configure the client
configuration = swagger_client.Configuration()
configuration.host = '<https://api.brandmetrics.com/measurement>'

# Create an instance of the API
measurement_api = swagger_client.MeasurementApi(
api_client=swagger_client.ApiClient(
    configuration,
    header_name="X-API-KEY",
    header_value=api_key))

# Get all measurement from the api
measurements = measurement_api.api_v1_measurement_all_get()

# print number of active measurements
print("number of active measurements " + str(len(measurements)))