Manage scorecard groups
Scorecard groups are protected by the SCORECARD_GROUPS organization feature flag and are not available in all Port organizations. If you need access, contact your Port account team.
A scorecard group lets you manage scorecards across multiple blueprints as a single unit. When you create a group, Port creates one related scorecard per blueprint and links them together.
Why use scorecard groups
Some standards apply to more than one entity type. "Production readiness" may be a question you ask about services, repositories, and infrastructure resources alike. "Ownership hygiene" may be something you want to track across most of your catalog.
Without groups, each blueprint needs its own scorecard. In practice that means:
- The same rule is written and maintained several times, and the copies drift apart as standards evolve.
- There is no single answer to "how are we doing on production readiness", only a score per blueprint.
- Rolling out a change to a standard is a manual, repetitive task across every scorecard.
Scorecard groups let you define a standard once and apply it everywhere it belongs:
- Define once, apply everywhere. Write the rules and levels a single time. Port creates and maintains a related scorecard for each blueprint in the group.
- Keep scores comparable. Levels stay consistent across all members, so
Goldmeans the same thing whether you are looking at a service or a repository. - Adapt without forking the standard. Use per-blueprint filters to scope which entities are evaluated, or per-blueprint rules when the check itself differs by entity type.
- Report on the standard as one unit. A group aggregates results across its members, giving platform and leadership a single view of adoption instead of a score per blueprint.
- Manage standards as code. The Terraform resource lets standards go through the same review and rollout process as the rest of your infrastructure.
You can also bring existing scorecards into a group rather than rebuilding them, as long as their levels match the group's levels.
Common use cases
| Scenario | How a group helps |
|---|---|
| Production readiness across services, repositories, and infrastructure | One set of rules and levels, with filters that limit each blueprint to production entities. |
| Security or compliance baselines (for example SOC 2 controls) | A single standard evaluated across every entity type in scope, with one aggregated compliance view. |
| Ownership and metadata hygiene | The same "has an owner", "has a Slack channel" checks applied catalog-wide. |
| Maturity models where checks differ by entity type | Per-blueprint rules under one group title and one shared set of levels. |
If a standard applies to a single blueprint, a standalone scorecard is still the simpler choice.
Enable scorecard groups
Before you create or change scorecard groups, enable them for your organization. This operation is idempotent and can only be performed by an admin.
Enabling scorecard groups cannot be undone. The call creates the _scorecard_group blueprint, adds the group relation on _scorecard, and enables groups for the organization. There is no endpoint to disable them.
Make a POST request to https://api.port.io/v1/scorecards/enable-groups.
Enable scorecard groups example (click to expand)
curl -X POST 'https://api.port.io/v1/scorecards/enable-groups' \
-H 'Authorization: Bearer <ACCESS_TOKEN>'
Configuration modes
A scorecard group can be configured in one of two modes. The blueprints/rules/filters fields and the scorecards map are mutually exclusive - provide exactly one shape in each request.
Shared rules mode
Set blueprints, rules, and optionally filters to apply the same rules to multiple blueprints. Use filters when you need different entity filters per blueprint while keeping the same rules.
Per-blueprint mode
Set scorecards to define different rules and filters for each blueprint. Use this when blueprints need distinct rule sets under the same group title and levels.
Properties and relations
Scorecard groups support separate property and relation payloads for the group entity and for every related scorecard:
| Field | Applies to | Blueprint |
|---|---|---|
groupProperties | The scorecard group entity | _scorecard_group |
scorecardProperties | Every related scorecard in the group | _scorecard |
groupRelations | The scorecard group entity | _scorecard_group |
scorecardRelations | Every related scorecard in the group | _scorecard |
Define the property and relation schema on those system blueprints first, then pass values keyed by those identifiers. Relation values can be a string, an array of strings, or null to clear a relation. On PUT, omitting a relation key also clears it.
The group relation on scorecards is managed by Port. Do not set it in scorecardRelations.
To learn more about extending scorecard blueprints, see extend the default scorecards.
Related scorecard identifiers
When Port creates related scorecards for a group, each scorecard identifier follows this pattern:
{blueprint_identifier}_{group_identifier}
For example, a group with identifier production-readiness on the microservice and team blueprints creates scorecards with identifiers microservice_production-readiness and team_production-readiness.
Manage scorecard groups
Port offers the following ways to create, edit, and delete scorecard groups:
- API
- Terraform
Remember that an access token is necessary in order to make API requests. If you need to generate a new token, refer to getting an API token.
Create scorecard groups
Make a POST request to https://api.port.io/v1/scorecard-groups. See the create a scorecard group API reference.Shared rules mode example (click to expand)
Per-blueprint mode example (click to expand)
Get scorecard groups
- To list all scorecard groups, make a
GETrequest tohttps://api.port.io/v1/scorecard-groups. See the get all scorecard groups API reference. - To get a single scorecard group, make a
GETrequest tohttps://api.port.io/v1/scorecard-groups/{scorecard_group_identifier}. See the get a scorecard group API reference.
When all related scorecards share identical rules, the response uses the shared-rules shape (blueprints, rules, and optional filters). When member rules differ, the response uses the per-blueprint shape (scorecards map).
Update scorecard groups
Make a PUT request to https://api.port.io/v1/scorecard-groups/{scorecard_group_identifier}. See the change a scorecard group API reference.
The request body must include the full desired group definition. Port creates, updates, or deletes related scorecards as needed. The body identifier must match the path identifier.
Shrinking a group to a single blueprint keeps the group. To remove a group entirely, use the delete endpoint.
Delete scorecard groups
Deleting a scorecard group also deletes all of its related scorecards, including their rules and results. This action cannot be undone.
Make a DELETE request to https://api.port.io/v1/scorecard-groups/{scorecard_group_identifier}. See the delete a scorecard group API reference.
Add an existing scorecard to a group
Make a POST request to https://api.port.io/v1/scorecard-groups/{scorecard_group_identifier}/scorecards/{scorecard_identifier}. See the add a scorecard to a group API reference.
Port validates that the scorecard's levels match the group. If the scorecard is already in another group, the request is rejected unless you pass overrideGroup=true, which moves the scorecard and deletes the previous group if it becomes empty.
A group can have at most one related scorecard per blueprint.
Remove a scorecard from a group
Make a DELETE request to https://api.port.io/v1/scorecard-groups/{scorecard_group_identifier}/scorecards/{scorecard_identifier}. See the remove a scorecard from a group API reference.
If the removed scorecard was the last member, Port deletes the group entity and the scorecard remains as a standalone scorecard.
Use the port_scorecard_group resource from the Terraform provider to manage scorecard groups.
The port_scorecard_group resource is in beta. Set the environment variable PORT_BETA_FEATURES_ENABLED=true before running Terraform, or the resource is not available.
In Terraform, the same fields use snake_case: group_properties, scorecard_properties, group_relations, and scorecard_relations. Pass property and relation values as jsonencode({...}) strings. Define the schema on the _scorecard and _scorecard_group system blueprints first (for example with port_system_blueprint), then use depends_on so the group is created only after that schema exists.
Create scorecard groupsShared rules mode example (click to expand)
Per-blueprint mode example (click to expand)
Update scorecard groups
Update the port_scorecard_group resource definition and run terraform apply.
Delete scorecard groups
Deleting a scorecard group also deletes all of its related scorecards. This action cannot be undone.
Run terraform destroy -target=port_scorecard_group.<resource_id>, or remove the resource from your .tf file and run terraform apply.
Q&A
Use the add a scorecard to a group endpoint. The scorecard's levels must match the group's levels. If the scorecard is already in another group, pass overrideGroup=true to move it. Port syncs additional scorecard properties and relations from existing group members when you join.
Yes. Use the remove a scorecard from a group endpoint to remove a related scorecard from the group. The scorecard becomes standalone and keeps its rules and results.
If it was the last member, Port also deletes the group entity.
No. In per-blueprint mode, each blueprint can have its own rules and filters under the same group title and levels. In shared rules mode, all members share the same rules, but you can still set different filters per blueprint.
When member rules differ, API responses return the per-blueprint scorecards shape instead of blueprints + rules.
Yes. Pass scorecardProperties and scorecardRelations when creating or updating a scorecard group to set values on every related scorecard. Pass groupProperties and groupRelations to set values on the scorecard group entity itself.
Property and relation keys must match custom fields you added to the _scorecard and _scorecard_group blueprints. The group relation on scorecards is managed by Port and cannot be set in scorecardRelations. To learn more, see extend the default scorecards.
Yes. Every scorecard in a group must use the same level definitions. Port rejects a join request when levels do not match (scorecard_group_levels_mismatch).
No. A group can have at most one related scorecard per blueprint. Port rejects duplicate blueprint identifiers within a group.
No. You cannot set relations.group on a scorecard entity directly. Group membership must be managed through the scorecard group API (POST or DELETE on the group scorecard endpoints). You can clear an existing group relation by patching relations.group to null, but assigning a group that way is blocked.
The delete a scorecard group endpoint deletes the group and all of its related scorecards, including their rules and results. This cannot be undone.
No. The change a scorecard group endpoint replaces the full group definition. Port creates, updates, or deletes related scorecards to match the request. The body identifier must match the path identifier.
No. The blueprints/rules/filters fields and the scorecards map are mutually exclusive. Provide exactly one configuration shape per create or update request.
Yes. An admin must call POST /v1/scorecards/enable-groups first. Until scorecard groups are enabled, create, update, and delete operations on groups return 403 (scorecard_groups_disabled). Enabling is idempotent.
Enabling scorecard groups cannot be undone. The call creates the _scorecard_group blueprint, adds the group relation on _scorecard, and enables groups for the organization. There is no endpoint to disable them.
API reference
Scorecard groups are managed by the following endpoints:
- Create a scorecard group and related scorecards
- Get all scorecard groups and related scorecards
- Get a scorecard group and related scorecards
- Change a scorecard group and related scorecards
- Delete a scorecard group and related scorecards
- Add a scorecard to a group
- Remove a scorecard from a group
Next steps
- Learn how to manage individual scorecards in Port.
- Explore scorecard use cases you can implement in your environment.