Add Batch Defect Groups Links
Request
POST
https://appsec.sourcecraft.tech/v1/defect-groups/links/batch
Query parameters
|
Name |
Description |
|
gitRepo |
Type: string Repository identifier. Accepts either internal repository ID (e.g., 88769874964302633) or public UUID (e.g., 0199140f-4343-7c06-a7e3-b835c305b629). These values can be obtained from the getRepo API (fields: id and uuid). Pattern: Example: |
Body
application/json
{
"updates": [
{
"defectGroupUuid": "0199140f-4343-7c06-a7e3-b835c305b629",
"links": [
{
"type": "SOURCECRAFT_PR",
"identifier": "42"
}
]
}
]
}
|
Name |
Description |
|
updates |
Type: DefectGroupLinksUpdate[] Min items: Example
|
LinkType
Type: string
Enum: EXTERNAL_URL, SOURCECRAFT_ISSUE, SOURCECRAFT_PR, YA_TRACKER
LinkToAdd
|
Name |
Description |
|
identifier |
Type: string Platform ID of the issue or pull request (a number or a UUID), or the HTTPS URL for URL-typed links Pattern: Example: |
|
type |
Type: string Link type. SOURCECRAFT_ISSUE and SOURCECRAFT_PR carry a platform identifier, EXTERNAL_URL and YA_TRACKER carry an HTTPS URL. Enum: |
Example
{
"type": "SOURCECRAFT_PR",
"identifier": "42"
}
DefectGroupLinksUpdate
|
Name |
Description |
|
defectGroupUuid |
Type: string UUID of the defect group to attach the links to Pattern: Example: |
|
links |
Type: LinkToAdd[] Min items: Example
|
Example
{
"defectGroupUuid": "0199140f-4343-7c06-a7e3-b835c305b629",
"links": [
{
"type": "SOURCECRAFT_PR",
"identifier": "42"
}
]
}
Responses
200 OK
OK
Body
application/json
{
"inserted": 0
}
|
Name |
Description |
|
inserted |
Type: integer Links actually inserted; already existing ones and links for defect groups missing from this repository are skipped |
400 Bad Request
Bad Request