Apply Integration Settings Across Teams
Learn how to programmatically create, update, and override team integration settings and filters using the Harness AIDI REST API.
Apply integration settings across teams
You can use the Harness AIDI API to apply a consistent configuration across multiple teams, typically during onboarding or when introducing a new integration. When configuring teams in Harness AIDI, each team can have:
Integrations (e.g., Jira, GitHub, Bitbucket, Harness CI/CD)
Integration filters (e.g., Jira project keys, issue types, statuses, pipeline filters)
Filters depend on integrations; you must configure integrations before applying filters. The integrationId used in filters must already exist on the target team's integrations.
Prerequisites
Before you begin, you need:
An AIDI API key with admin permissions
Your account's base URL. All API URIs are relative to the AIDI service endpoint for your region:
Prod 1:
https://app.harness.io/prod1/sei/api/Prod 2:
https://app.harness.io/gratis/sei/api/EU:
https://accounts.eu.harness.io/sei/api/
An Org Tree ID containing the target teams
Integration IDs for the integrations you want to assign
Best practices
Order matters: Always update integrations first, then filters.
Filter behavior: The PUT endpoint for
integration_filtersmerges values rather than fully replacing them. If you need to remove a filter value, set the filter with only the desired values.Rate limiting: Add a short delay between API calls to avoid overwhelming the server.
Validation: After updating, spot-check a few teams in the Harness AIDI UI to confirm settings are correct.
Leaf teams only: Only leaf teams (teams without children) need individual filter configuration. Parent teams inherit from their children for reporting.
Step 1: Get all teams in an Org Tree
Retrieve all teams in your org tree:
This returns a nested tree structure with each team's refId, name, leaf status, and children. You need to recursively traverse the children array to collect all leaf team refId values.
Example response structure:
Step 2: Export reference integrations and filters
Select a reference team that already has the correct configuration. Its settings will be used as the source of truth.
Ensure the reference team includes all integrations that should exist on target teams. Missing integrations will not be created automatically.
Step 3: Update integrations for a single team
Apply integrations to each team before applying filters. Filters depend on integration IDs that must already exist on the target team.
Example integrations payload
Update a single team
Step 4: Apply integrations across all teams
Step 5: Bulk update filters
Filters control how each integration is scoped (for example, Jira projects, issue types, statuses, or pipeline configurations).
Example filters payload
Filter field reference
integrationId
ID of the integration this filter applies to
filterKey
Filter dimension: PROJECT, ISSUE_TYPE, STATUS, PIPELINE_STATUS, REPO_ID
questionId
Unique identifier for the filter question (use the value from the reference team)
operator
Filter operator, typically equals
applicableMetrics
Which metrics this filter applies to: LTTC, MTTR, DF, CFR, BA, SPRINT_INSIGHTS, WORK_COMPLETED, PR_VELOCITY
values
Array of values to filter on
isCustom
Whether this is a custom field filter
additionalInfo
Metadata such as {"defines": ["feature_types"]} for work type classification
Update a single team
Bulk update all teams
Step 6: Verify updates
After applying updates, verify that integrations and filters are correctly configured for a sample of teams.
API Reference
List teams in org tree
GET
/v2/org-trees/{orgTreeId}/teams
Get team integrations
GET
/v2/teams/{teamRefId}/integrations
Update team integrations
PUT
/v2/teams/{teamRefId}/integrations
Get team integration filters
GET
/v2/teams/{teamRefId}/integration_filters
Update team integration filters
PUT
/v2/teams/{teamRefId}/integration_filters
Full script (bash)
A complete script that copies integrations and filters from a source team to all leaf teams in a target org tree:
Common errors
401/403
Unauthorized
Verify your API key and that it has admin permissions
404
Not found
Confirm the team refId or org tree ID exists
500
Internal server error
Check that integrationId values in filters exist on the team's integrations; ensure you're using the correct endpoint path
Last updated
Was this helpful?