LiveConnect allows you to validate the analytics and other tagging in your iOS or Android app. You can read about how to upload HAR files to LiveConnect manually, and this guide will show you how to automate it with the ObservePoint API.
Note: You might not have access to LiveConnect with HAR File Upload. Reach out to your Customer Success Manager or Account Executive to verify if you have access.
HAR files can be exported from various devices and applications. The easiest way is through the browser, as described here for websites and here for mobile apps. You can also export them through Charles Proxy and some device farm tools including, but not limited to SauceLabs, BrowserStack, and BitBar.
You will need:
LiveConnect with HAR Upload enabled on your ObservePoint account
The path on your computer where your HAR file is saved
Make a GET
call to https://api.observepoint.com/v2/manual-journeys
to return a list of all the devices for your account, and more importantly to obtain the id
of the device.
[
{
...
"id": 123,
...
}
]
Using your API key, do a GET request to this URL:
GET https://api.observepoint.com/v2/users/current
That will respond with JSON that contains your user ID, which you will need in step 2.
{
...
"id": 123,
..
}
Processing HAR files is a three-step process. Your code should execute these 3 steps every time you have HAR file(s) you are ready to process.
This is not the same as your ObservePoint API key. These credentials allow you to upload HAR files to a file store, where ObservePoint will then process them.
Note: These credentials expire after ~15 minutes, so your code should fetch new credentials every time you do a HAR upload.
Make a request to GET https://api.observepoint.com/v2/manual-journeys/{manualJourneyId}/har-runs/s3-post-policy
This will respond with the credentials:
{
"objectKeyPrefix": "uploaded\_files/users/123/",
"uploadUrl": "https://prod-customer-uploads-bucket.s3.amazonaws.com/",
"formData": {
"X-Amz-Algorithm": "AWS4-HMAC-SHA256",
"tagging": "<Tagging>...</Tagging>",
"Policy": "eyA...fQ==",
"X-Amz-Signature": "5a3...c85",
"acl": "private",
"X-Amz-Date": "20250011T000000Z",
"X-Amz-Credential": "AKIA...est"
}
}
You will need the following from the above response for next steps:
objectKeyPrefix
uploadUrl
formData
Make a request to POST https://api.observepoint.com/v2/manual-journeys/{deviceID}/har-runs
for each desired HAR file upload.
with the following request header:
Content-Type: multipart/form-data
and the following variables in the request's form-encoded payload (learn how to send a form-encoded request payload)
Tip: Every programming language can send form-encoded POST requests. You can find instructions on how to do this in your language of choice online (how to do this in Python).
X-Amz-Algorithm
=AWS4-HMAC-SHA256
tagging
={formData.tagging}
policy
={formData.policy}
acl
=private
X-Amz-Date
={formData.X-Amz-Date}
key
=uploaded_files/users/{userId}/{a name for your test}
Tip: You can use the HAR file name, but make it unique from previous HAR uploads. You might consider using a UUID to ensure uniqueness.
Important: Your code will need to use this name in step 3, so store it in a variable (or an array if you have multiple HAR files)
X-Amz-Credential
={formData.X-Amz-Credential}
file
=@c:\Users\{path to har file}\your-har-file.json
Important: The
@
symbol is requiredImportant: Replace the text to the right of
@
with the path to the HAR file on your computer)
Now that you've uploaded your HAR file(s), you can request ObservePoint to start processing the HAR file(s) by sending a request to:
POST https://api.observepoint.com/v2/manual-journeys/{deviceID}/har-runs
with the following header:
Content-Type: application/json
and the following request payload in JSON:
{
"journeyRunName": "{a name for your test, which appears in the UI}",
"harFiles": [
{
"s3Key": "uploaded\_files/users/{your user ID}/{the name}",
"name": "{name of your HAR file}"
},
...
// more HAR files here if you have more than one
]
}
It is recommended to apply Data Validation Rules manually using the ObservePoint user interface as they will automatically apply for all subsequent runs.