Add a scorecard to a group
POST/v1/scorecard-groups/:scorecard_group_identifier/scorecards/:scorecard_identifier
Adds an existing scorecard to a scorecard group. Validates that levels match the group, syncs additional scorecard properties and relations from existing related scorecards, and sets relations.group. Scorecards already in another group are rejected unless overrideGroup=true, which moves the scorecard and deletes the previous group if it becomes empty.
Port syncs the group's shared scorecardProperties and scorecardRelations from existing related scorecards onto the added scorecard.
This is a closed beta feature.
Request
Parameters (JSON)
{
"parameters": [
{
"schema": {
"type": "boolean"
},
"in": "query",
"name": "overrideGroup",
"required": false,
"description": "When `true`, allows moving a scorecard that is already in another group. Defaults to `false`, which rejects grouped scorecards."
},
{
"schema": {
"type": "string",
"minLength": 1
},
"in": "path",
"name": "scorecard_group_identifier",
"required": true,
"description": "The identifier of the scorecard group."
},
{
"schema": {
"type": "string",
"maxLength": 100,
"pattern": "^(?!\\.{1,2}$)[\\p{L}0-9@_.+:\\\\/='-]+$"
},
"in": "path",
"name": "scorecard_identifier",
"required": true,
"description": "The identifier of the scorecard to add to the group."
}
]
}Request body schema (JSON)
{
"title": "Body"
}Responses
- 401
- 404
- 413
- 422
Default Response
A resource with the provided identifier was not found
Request body is too large (limit is 1MiB)
The json provided does not match the route's schema
Responses (JSON)
{
"responses": {
"401": {
"description": "Default Response",
"content": {
"application/json": {
"schema": {
"properties": {
"ok": {
"const": false
},
"error": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"ok",
"error"
],
"additionalProperties": false
}
}
}
},
"404": {
"description": "A resource with the provided identifier was not found",
"content": {
"application/json": {
"schema": {
"properties": {
"ok": {
"const": false
},
"error": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"ok",
"error",
"message"
],
"additionalProperties": false,
"description": "A resource with the provided identifier was not found"
}
}
}
},
"413": {
"description": "Request body is too large (limit is 1MiB)",
"content": {
"application/json": {
"schema": {
"properties": {
"ok": {
"const": false
},
"error": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"ok",
"error"
],
"additionalProperties": false,
"description": "Request body is too large (limit is 1MiB)"
}
}
}
},
"422": {
"description": "The json provided does not match the route's schema",
"content": {
"application/json": {
"schema": {
"properties": {
"ok": {
"const": false
},
"error": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"ok",
"error",
"message"
],
"additionalProperties": false,
"description": "The json provided does not match the route's schema"
}
}
}
}
}
}