The Subject Access Request API allows you to access and delete all data associated with a specific single user measurement. With this API, you can easily retrieve details about a user, as well as delete all data associated with them.
To get started with our Subject Access Request 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 Subject Access Request API in no time. Explore the Subject Access Report API
All API calls to the Subject Access Request 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/singleusermeasurement>" -H "X-API-KEY: {api_key}"
PowerShell:
Invoke-WebRequest -Uri <https://api.brandmetrics.com/api/v1/singleusermeasurement> -Method 'GET' -Headers @{'X-API-KEY' = '{api_key}'}
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/singleusermeasurement>'
# Create an instance of the API
sar_api = swagger_client.SarApi(
api_client=swagger_client.ApiClient(
configuration,
header_name="X-API-KEY",
header_value=api_key))
# Get all data about a user from the api
data = sar_api.api_v1_report_all_get('123', 'www.contoso.com')
# print user data
print(data)