BrowserStack
This integration was created using the custom Ocean integration framework.
Please note that:
- This integration will not be listed in the
Data sourcespage of your Port application, and must be installed manually using the instructions on this page. - This integration will not create components (e.g.
blueprints,mapping, etc.) in your portal automatically, you will need to create them manually using the instructions on this page.
Port's BrowserStack integration allows you to model BrowserStack Automate test data in your software catalog and ingest it using the Ocean Custom Integration framework.
Supported resources
The BrowserStack integration can ingest the following resources into Port:
plan- Account utilization and capacity fromGET /automate/plan.json.project- Automate projects and team groupings fromGET /automate/projects.json.build- Build history and pass/fail trends from builds nested inGET /automate/projects/{project_id}.json.
Entity hierarchy
The integration models this relationship in Port:
Project → Build
The plan resource is account-level utilization data and is not part of this hierarchy.
Prerequisites
To use this integration, you need:
- A BrowserStack account with access to BrowserStack Automate.
- Your BrowserStack username and access key for API authentication.
To find your BrowserStack credentials:
- Log in to BrowserStack.
- Go to Account settings.
- Copy your username and access key.
Installation
The Ocean custom integration can be installed in two ways:
- Hosted by Port — Port manages the infrastructure; configure the connection in the Port UI.
- Self-hosted — Run the integration in your own infrastructure using Helm or Docker.
Choose one of the following options:
- Hosted by Port
- Helm
- Docker
Set up in Port
- Go to the custom data source page and open the Ocean custom integration form.
- In the configuration form, enter the following values:
- Identifier:
browserstack-ocean. - Base URL:
https://api.browserstack.com. - Authentication type:
basic. - Username: your BrowserStack username.
- Password: your BrowserStack access key.
- Identifier:
- Click Save & install.
Prerequisites
-
A Kubernetes cluster - the integration's container chart will be deployed to this cluster.
-
kubectlandhelmmust be installed on your machine. YourkubectlCLI must be connected to the Kubernetes cluster where you plan to install the integration.
Installation
- Add Port's Helm repo and install the Ocean Custom Integration:
Remember to replace the placeholders for YOUR_PORT_CLIENT_ID, YOUR_PORT_CLIENT_SECRET, YOUR_BROWSERSTACK_USERNAME, and YOUR_BROWSERSTACK_ACCESS_KEY.
helm repo add --force-update port-labs https://port-labs.github.io/helm-charts
helm upgrade --install browserstack-ocean port-labs/port-ocean \
--set port.clientId="YOUR_PORT_CLIENT_ID" \
--set port.clientSecret="YOUR_PORT_CLIENT_SECRET" \
--set port.baseUrl="https://api.port.io" \
--set initializePortResources=true \
--set scheduledResyncInterval=60 \
--set integration.identifier="browserstack-ocean" \
--set integration.type="custom" \
--set integration.eventListener.type="POLLING" \
--set integration.config.baseUrl="https://api.browserstack.com" \
--set integration.config.authType="basic" \
--set integration.config.paginationType="none" \
--set integration.secrets.username="YOUR_BROWSERSTACK_USERNAME" \
--set integration.secrets.password="YOUR_BROWSERSTACK_ACCESS_KEY"
The port_region, port.baseUrl, portBaseUrl, port_base_url and OCEAN__PORT__BASE_URL parameters select which Port API instance to use:
- EU (app.port.io) →
https://api.port.io - US (app.us.port.io) →
https://api.us.port.io
Configuration parameters
This table summarizes the available parameters for the installation.
| Parameter | Description | Example | Required |
|---|---|---|---|
port.clientId | Your Port client ID | ✅ | |
port.clientSecret | Your Port client secret | ✅ | |
port.baseUrl | Your Port API URL - https://api.port.io for EU, https://api.us.port.io for US | ✅ | |
integration.config.baseUrl | The base URL of the BrowserStack API. Endpoint paths in your mapping include the /automate prefix. | https://api.browserstack.com | ✅ |
integration.config.authType | The authentication type (use basic for BrowserStack) | basic | ✅ |
integration.secrets.username | Your BrowserStack username | ✅ | |
integration.secrets.password | Your BrowserStack access key | ✅ | |
integration.config.paginationType | Pagination method. Use none for the default mappings on this page. | none | ❌ |
integration.eventListener.type | The event listener type. Read more about event listeners | POLLING | ✅ |
integration.type | The integration type (must be custom for Ocean Custom Integration) | custom | ✅ |
integration.identifier | Unique identifier for the integration instance | browserstack-ocean | ✅ |
scheduledResyncInterval | The number of minutes between each resync. Read more about scheduledResyncInterval | 60 | ❌ |
initializePortResources | When set to true, the integration will create default blueprints and the Port app config mapping | true | ❌ |
sendRawDataExamples | Enable sending raw data examples from the BrowserStack API to Port for testing and managing the integration mapping. Default is true | true | ❌ |
For advanced configuration such as proxies or self-signed certificates, click here.
To run the integration using Docker for a one-time sync:
Remember to replace the placeholders for YOUR_PORT_CLIENT_ID, YOUR_PORT_CLIENT_SECRET, YOUR_BROWSERSTACK_USERNAME, and YOUR_BROWSERSTACK_ACCESS_KEY.
docker run -i --rm --platform=linux/amd64 \
-e OCEAN__EVENT_LISTENER='{"type":"ONCE"}' \
-e OCEAN__INITIALIZE_PORT_RESOURCES=true \
-e OCEAN__SEND_RAW_DATA_EXAMPLES=true \
-e OCEAN__INTEGRATION__CONFIG__BASE_URL="https://api.browserstack.com" \
-e OCEAN__INTEGRATION__CONFIG__AUTH_TYPE="basic" \
-e OCEAN__INTEGRATION__CONFIG__PAGINATION_TYPE="none" \
-e OCEAN__INTEGRATION__SECRETS__USERNAME="YOUR_BROWSERSTACK_USERNAME" \
-e OCEAN__INTEGRATION__SECRETS__PASSWORD="YOUR_BROWSERSTACK_ACCESS_KEY" \
-e OCEAN__PORT__CLIENT_ID="YOUR_PORT_CLIENT_ID" \
-e OCEAN__PORT__CLIENT_SECRET="YOUR_PORT_CLIENT_SECRET" \
-e OCEAN__PORT__BASE_URL="https://api.port.io" \
ghcr.io/port-labs/port-ocean-custom:latest
The port_region, port.baseUrl, portBaseUrl, port_base_url and OCEAN__PORT__BASE_URL parameters select which Port API instance to use:
- EU (app.port.io) →
https://api.port.io - US (app.us.port.io) →
https://api.us.port.io
For advanced configuration such as proxies or self-signed certificates, click here.
Set up data model
Before the integration can sync data, you need to create the required blueprints in Port. These blueprints define the data model for your BrowserStack resources.
To create the blueprints:
-
Go to your Builder page.
-
Click + Blueprint.
-
Click the
{...} Edit JSONbutton in the top right corner of the form. -
Copy and paste each blueprint JSON from the section below.
Create blueprints in orderWe recommend creating blueprints in the order they appear below. Create the Project blueprint before the Build blueprint, since builds reference projects.
Plan blueprint (click to expand)
Account-level Automate utilization and capacity:
{"identifier": "browserstackPlan","title": "BrowserStack Plan","description": "BrowserStack Automate plan utilization and parallel session capacity","schema": {"properties": {"automatePlan": {"type": "string","title": "Automate Plan"},"parallelSessionsRunning": {"type": "number","title": "Parallel Sessions Running"},"parallelSessionsMaxAllowed": {"type": "number","title": "Parallel Sessions Max Allowed"},"teamParallelSessionsMaxAllowed": {"type": "number","title": "Team Parallel Sessions Max Allowed"},"queuedSessions": {"type": "number","title": "Queued Sessions"},"queuedSessionsMaxAllowed": {"type": "number","title": "Queued Sessions Max Allowed"}},"required": []},"mirrorProperties": {},"calculationProperties": {},"aggregationProperties": {},"relations": {}}Project blueprint (click to expand)
Automate projects used to group builds by team or product:
{"identifier": "browserstackProject","title": "BrowserStack Project","icon": "Team","description": "A BrowserStack Automate project","schema": {"properties": {"groupId": {"type": "number","title": "Group ID"},"userId": {"type": "number","title": "User ID"},"subGroupId": {"type": "number","title": "Sub Group ID"},"createdAt": {"type": "string","format": "date-time","title": "Created At"},"updatedAt": {"type": "string","format": "date-time","title": "Updated At"}},"required": []},"mirrorProperties": {},"calculationProperties": {},"aggregationProperties": {},"relations": {}}Build blueprint (click to expand)
Test builds with pass/fail status and a relation to their parent project:
{"identifier": "browserstackBuild","title": "BrowserStack Build","icon": "Pipeline","description": "A BrowserStack Automate test build","schema": {"properties": {"duration": {"type": "number","title": "Duration (seconds)"},"status": {"type": "string","title": "Status","enum": ["running", "done", "timeout", "failed"],"enumColors": {"running": "blue","done": "green","timeout": "orange","failed": "red"}},"buildTag": {"type": "string","title": "Build Tag"},"framework": {"type": "string","title": "Framework"},"createdAt": {"type": "string","format": "date-time","title": "Created At"},"updatedAt": {"type": "string","format": "date-time","title": "Updated At"}},"required": []},"mirrorProperties": {},"calculationProperties": {},"aggregationProperties": {},"relations": {"project": {"title": "Project","target": "browserstackProject","required": false,"many": false}}} -
Click Save after creating each blueprint.
Configuration
After installation, define which endpoints to sync in your integration configuration. Each resource maps an API endpoint to Port entities using JQ expressions to transform the data.
Key mapping components:
kind: The API endpoint path, combined with your base URL to form the full request URL.selector.query: JQ filter to include or exclude entities. Use'true'to sync all.selector.data_path: JQ expression pointing to the array of items in the response.port.entity.mappings: How to map API fields to Port entity properties and relations.
For more details on how the Ocean Custom Integration works, see the How it works section.
The full BrowserStack Automate API reference is available in the BrowserStack docs. Each mapping section below links directly to the relevant endpoint documentation.
BrowserStack API response formats:
With base URL https://api.browserstack.com, each kind includes the /automate path prefix:
kind | Response shape | data_path |
|---|---|---|
/automate/plan.json | Single JSON object | [.] |
/automate/projects.json | Direct array of projects | (omit) |
/automate/projects/{project_id}.json | Project object with a nested builds array | .project.builds[] |
Example project detail response (click to expand)
{
"project": {
"id": 17122553,
"name": "Port Integration",
"builds": [
{
"name": "Build 1",
"hashed_id": "0059939e770b361b836783145d438d05f3594cb1",
"duration": 4,
"status": "done",
"automation_project_id": 17122553,
"framework": "selenium",
"created_at": "2026-06-09T17:54:05.000Z",
"updated_at": "2026-06-09T17:54:11.000Z"
}
]
}
}
We recommend adding mappings in the order shown below. Sync projects first, then builds, so build-to-project relations resolve correctly. Sync the plan resource at any time.
To configure the mappings:
-
Go to your data sources page.
-
Find your BrowserStack integration in the list.
-
Click on the integration to open the mapping editor.
-
Add the resource mapping configurations below.
Plan mapping (click to expand)
API reference:
GET /automate/plan.jsonresources:- kind: /automate/plan.jsonselector:query: 'true'data_path: '[.]'port:entity:mappings:identifier: '"browserstack-automate-plan"'title: .automate_planblueprint: '"browserstackPlan"'properties:automatePlan: .automate_planparallelSessionsRunning: .parallel_sessions_runningparallelSessionsMaxAllowed: .parallel_sessions_max_allowedteamParallelSessionsMaxAllowed: .team_parallel_sessions_max_allowedqueuedSessions: .queued_sessionsqueuedSessionsMaxAllowed: .queued_sessions_max_allowedProjects mapping (click to expand)
API reference:
GET /automate/projects.jsonresources:- kind: /automate/projects.jsonselector:query: 'true'port:entity:mappings:identifier: .id | tostringtitle: .nameblueprint: '"browserstackProject"'properties:groupId: .group_iduserId: .user_idsubGroupId: .sub_group_idcreatedAt: .created_atupdatedAt: .updated_atBuilds mapping (click to expand)
API reference:
GET /automate/projects/{project_id}.jsonThis mapping uses nested endpoints to fetch builds for each project.
resources:- kind: /automate/projects/{projectId}.jsonselector:query: 'true'data_path: .project.builds[]path_parameters:projectId:endpoint: /automate/projects.jsonfield: .[].idfilter: 'true'port:entity:mappings:identifier: .hashed_idtitle: .nameblueprint: '"browserstackBuild"'properties:duration: .durationstatus: .statusbuildTag: .tagsframework: .frameworkcreatedAt: .created_atupdatedAt: .updated_atrelations:project: .__projectId | tostring -
Click Save to apply the mapping.
Customization
If you want to test different API endpoints or explore the BrowserStack API before committing to a configuration, use the interactive builder.
The interactive builder helps you:
- Test your BrowserStack API endpoints with live data.
- Automatically detect the data structure and field types.
- Generate blueprints and resource mappings tailored to your preferences.
- Get installation commands with your configuration pre-filled.
Additional resources
- BrowserStack Automate API reference - full reference for all available endpoints and response schemas.
- BrowserStack plan API - details on utilization and capacity fields.
- BrowserStack project API - details on project list and project detail endpoints.
- BrowserStack build API - details on build list, status values, and pagination parameters.
- Ocean Custom Integration overview - learn how the Ocean Custom Integration framework works.
- Ocean Custom Integration configuration - advanced mapping options, nested endpoints, and pagination configuration.