Create Comment
Request
POST
https://appsec.sourcecraft.tech/v1/activities/comment
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
{
"defectGroupUuid": "0199140f-4343-7c06-a7e3-b835c305b629",
"defectGroupPublicId": 42,
"content": "This looks like a false positive"
}
|
Name |
Description |
|
content |
Type: string Comment content (max 1023 characters) Max length: Pattern: Example: |
|
defectGroupPublicId |
Type: integer | null Public id (#N) of the defect group. Exactly one of defectGroupUuid or defectGroupPublicId must be provided. |
|
defectGroupUuid |
Type: string | null UUID of the defect group with you would like to add comment to. Exactly one of defectGroupUuid or defectGroupPublicId must be provided. Example: |
Responses
200 OK
OK
Body
application/json
{
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"id": 0,
"activityComment": {
"uuid": null,
"id": 0,
"content": "example"
},
"type": "ACTIVITY_TYPE_UNSPECIFIED",
"title": "example",
"createdAt": 0,
"dueDate": 0,
"createdByUserId": "example",
"createdByUserPublicId": "example",
"assignedToUserId": "example",
"newStatus": "OPEN",
"entityTags": [
{
"name": "example",
"description": "example"
}
],
"attachments": [
{
"id": "example"
}
],
"isDeleted": true,
"deleted": true,
"previousStatus": null
}
|
Name |
Description |
|
activityComment |
Any of 2 types
Example
|
|
assignedToUserId |
Type: string Example: |
|
attachments |
Type: AttachmentDto[] Example
|
|
createdAt |
Type: integer |
|
createdByUserId |
Type: string Example: |
|
createdByUserPublicId |
Type: string Example: |
|
deleted |
Type: boolean |
|
dueDate |
Type: integer |
|
entityTags |
Type: TagDto[] Example
|
|
id |
Type: integer | null |
|
isDeleted |
Type: boolean |
|
newStatus |
Type: DefectGroupStatus Enum: |
|
previousStatus |
Type: DefectGroupStatus Enum: |
|
title |
Type: string Example: |
|
type |
Type: ActivityType Enum: |
|
uuid |
Any of 2 types
Example: |
UUID
Type: string<uuid>
Pattern: [a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
Example: 123e4567-e89b-12d3-a456-426614174000
ActivityComment
|
Name |
Description |
|
content |
Type: string Example: |
|
id |
Type: integer | null |
|
uuid |
Any of 2 types
Example: |
Example
{
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"id": 0,
"content": "example"
}
ActivityType
Type: string
Enum: ACTIVITY_TYPE_UNSPECIFIED, CREATED, ASSIGNED, REASSIGNED, STATUS_CHANGED, COMMENT_ADDED, PRIORITY_ADDED, PRIORITY_CHANGED, DUE_DATE_ADDED, DUE_DATE_CHANGED, DUE_DATE_BREACHED, TAGS_ADDED, TAGS_CHANGED, RELATED_ISSUES_CHANGED, AI_SUGGESTION_ADDED, RELATED_ISSUES_REMOVED, AI_FIX_STARTED, AI_FIX_PR_LINKED, AI_STATUS_CHANGED, UNRECOGNIZED
DefectGroupStatus
Type: string
Enum: OPEN, RESOLVED_FIXED, RESOLVED_FP, RESOLVED_PROJECT_NOT_AFFECTED, RESOLVED_TOLERABLE, RESOLVED_DUPLICATE, TRIAGE_IN_PROGRESS, TRIAGED_TP, FIX_IN_PROGRESS, RESOLVED_AUTOFIXED, UNRECOGNIZED
TagDto
|
Name |
Description |
|
description |
Type: string Example: |
|
name |
Type: string Example: |
Example
{
"name": "example",
"description": "example"
}
AttachmentDto
|
Name |
Description |
|
id |
Type: string Example: |
Example
{
"id": "example"
}
400 Bad Request
Bad Request