Modify Incident Comment¶
POST /api/v1/incidents/comment/{comment_uuid}/modify
Overview¶
Modify an incident comment that you created.
Before Calling and Usage Steps¶
The current key requires incidents.incidentsReplyManage and applies only to the current workspace. For the path comment_uuid, obtain content.data[].uuid from Comment List; only the original creating principal can modify it. Another key is rejected even if it has the same role. Rotating the same key retains the resource UUID. comment is always required; if extend is omitted, it is retained; if present, it is replaced as a whole. When legacy extra.creator/managerInfos exists, it is retained under compatibility rules; the author cannot be tampered with through display fields. Modification currently does not deliver emails for newly added @ members; do not assume notification just because the members field was saved successfully.
Attachment UUIDs are obtained through upload in this module. This binding appends/rebinds; omitting it or passing [] does not unbind. Existing attachments must be handled separately with Delete Attachment. Comments/attachments/notifications are submitted in steps; on 500/timeout, the comment or attachment may still have been saved; first read back with pagination and verify against the body, creating principal, and time to avoid duplicate comments and notifications. Comment creation has no idempotency key; repeated modification submissions also update the time. The response includes a summary of current attachments; creatorInfo/updatorInfo are not returned and need to be supplemented from the comment list.
Route Parameters¶
| Parameter | Type | Required | Description |
|---|---|---|---|
| comment_uuid | string | Y | UUID of a single comment, not the incident UUID. Allow null: False Example: inccmt_exampleHow to obtain or provide: Get content.data[].uuid from Comment List. |
Request Headers¶
| Parameter | Type | Required | Description |
|---|---|---|---|
| DF-API-KEY | string | Y | OpenAPI authentication credential for the workspace. Example: <DF-API-KEY>How to obtain or provide: Obtain an OpenAPI key with this operation permission from API Key Management in the target workspace. |
Body Request Parameters¶
| Parameter | Type | Required | Description |
|---|---|---|---|
| attachmentUUIDs[*] | string | A single attachment UUID string. Example: att_exampleHow to obtain or provide: First use Upload Attachment to obtain content.attachmentUuid, and confirm attachment ownership. |
|
| extend.members | array | Optional array of account mentions. When creating a comment, account emails with type=@ and a uuid are filtered and deduplicated; account lookup is not constrained again by workspace, so the caller must use verified current workspace members. Notification delivery is not guaranteed. Modification calculates candidates but currently does not deliver corresponding email notifications. Example: [{"type": "@", "uuid": "acnt_example", "exists": true}]How to obtain or provide: Obtain the account UUID from the current workspace member list, then construct it according to editor mentions. |
|
| extend.members[*] | object | A mention object; an arbitrary email address cannot replace uuid. Example: {"type": "@", "uuid": "acnt_example", "exists": true}How to obtain or provide: Same source as members. |
|
| extend.members[*].type | string | Only @ enters the additional email candidates; other types do not. Example: @How to obtain or provide: Editor account mention marker. |
|
| extend.members[*].uuid | string | UUID of a non-deleted account; if there is no corresponding account, it does not enter the email candidates. Example: acnt_exampleHow to obtain or provide: Account UUID from the current workspace Member List. |
|
| extend.members[*].exists | boolean | Optional compatibility flag; current notification logic does not rely on it for existence determination. Example: trueHow to obtain or provide: Filled in by the caller's editor according to member existence status. |
|
| extend.linkList | array | Array of display links; the target is not accessed/validated by this API. Example: [{"name": "Troubleshooting Guide", "link": "https://example.com/runbook"}]How to obtain or provide: Fill in related document links. |
|
| extend.linkList[*] | object | A link object. Example: {"name": "Troubleshooting Guide", "link": "https://example.com/runbook"}How to obtain or provide: Same source as linkList. |
|
| extend.linkList[*].name | string | String display name. Example: Troubleshooting GuideHow to obtain or provide: Fill in the link display name. |
|
| extend.linkList[*].link | string | URL string. Example: https://example.com/runbookHow to obtain or provide: Fill in an address accessible to the customer. |
|
| extend.manager | array | Array of legacy external assignee email addresses; used only for compatibility retention of legacy managerInfos and does not replace the incident assignee configuration. Example: ["xxx@truewatch.com"]How to obtain or provide: Read the existing extend.manager of the legacy comment before modification. |
|
| extend.manager[*] | string | A single legacy email address. Example: xxx@truewatch.comHow to obtain or provide: Existing manager array. |
|
| extend.extra | object | Optional object; if a legacy creator exists, the legacy value is copied to avoid rewriting. Do not put passwords/tokens in this public extension. Example: {}How to obtain or provide: Existing extra auxiliary data of the legacy comment. |
|
| extend.extra.creator | object | Legacy auxiliary identity; on modification, an existing legacy creator takes precedence, and the actual comment-creating key identity cannot be rewritten. Example: {}How to obtain or provide: Legacy extra.creator data. |
|
| extend.extra.managerInfos | object | Mapping from email addresses to identity objects; when no valid new mapping is provided, only legacy entries that still appear in the manager array are retained. Example: {}How to obtain or provide: Legacy extra.managerInfos mapping. |
|
| comment | string | Y | Required string; the current declaration does not enforce non-empty. Provide meaningful content; do not use an empty string in place of deletion. Allow null: False Example: Database connection issue confirmed; handling in progress.How to obtain or provide: Filled in by the current handler with incident progress. |
| extend | json | Must be a JSON object. On creation, omission means {}; on modification, omission retains it, and when present it is replaced as a whole ({} clears it, but legacy extra.creator/managerInfos are retained for compatibility). A root parameter of null/array/string is rejected first by the public route with 406. Undeclared substructures such as internal members:null, non-object members, or extra:null may cause 500; fill in according to the subfield structure in this document. Allow null: False Example: {"members": [{"type": "@", "uuid": "acnt_example", "exists": true}], "linkList": [{"name": "Troubleshooting Guide", "link": "https://example.com/runbook"}]}How to obtain or provide: Constructed by the caller's editor; retain mentions and links that need to be displayed. |
|
| attachmentUUIDs | array | Omit to not bind; when present, each is appended/rebound to the comment; [] does not clear existing attachments. Invalid/deleted UUIDs may cause 500; binding commits internally, and subsequent failures may still have been saved. Use only legitimate attachments you have verified; do not borrow attachments from other resources. Allow null: False Example: ["att_example"]How to obtain or provide: First use Upload Attachment to obtain content.attachmentUuid, and confirm attachment ownership. |
Additional Parameter Notes¶
Upload attachments first via attachmentUpload in this module, then pass content.attachmentUuid into attachmentUUIDs. extend.members mentions accounts by account UUID; adding a comment dispatches notifications, while modifying a comment currently does not resend those mention notifications.
Request Example¶
curl --request POST 'https://openapi.truewatch.com/api/v1/incidents/comment/inccmt_example/modify' \
-H 'DF-API-KEY: <DF-API-KEY>' \
-H 'Content-Type: application/json' \
--data-raw '{"comment":"Database connection issue confirmed; handling in progress."}'
Response¶
HTTP 200, application/json. The example below shows the main fields that can be read directly.
| Field | Type | Description |
|---|---|---|
| content.id | integer or null | Database row ID; use uuid for business identification; may be null in a snapshot before submission. |
| content.uuid | string | UUID of this resource. |
| content.status | integer | Database status, 0 active / 3 deleted; different from the incident business status incidentsStatus. |
| content.creator | string | Creating principal; for an API key, generally wsak_ resource UUID. |
| content.updator | string | Most recent updating principal; may be empty if not updated. |
| content.createAt | integer | Unix seconds creation time. |
| content.updateAt | integer | Unix seconds last update time. |
| content.deleteAt | integer | Unix seconds deletion time; -1 if not deleted. |
| content.incidentsUUID | string | UUID of the incident it belongs to. |
| content.workspaceUUID | string | Workspace it belongs to. |
| content.comment | string | Comment body, which may include system-generated operation notes; do not treat the body as a structured operation record. |
| content.extend | object or JSON | Stored extension; system comments may contain operator/operator_info/operate_type/before/after, etc. |
| content.extend.members | array<object> |
@ member input records, used as additional email notification candidates when creating a comment; does not indicate delivery. |
| content.extend.members[].type | string | @ indicates an account mention; other values do not enter this email candidate set. |
| content.extend.members[].uuid | string | Account UUID. |
| content.extend.members[].exists | boolean | Client editor state; server-side notification filtering does not depend on this value. |
| content.extend.linkList | array<object> |
Business link display data. |
| content.extend.linkList[].name | string | Link display name. |
| content.extend.linkList[].link | string | Link URL. |
| content.extend.manager | array<string> |
Array of legacy external assignee email addresses; used for filtering when retaining legacy extra.managerInfos on modification; not equivalent to the incident assigner. |
| content.extend.manager[] | string | A legacy assignee email address. |
| content.extend.extra | object | External identity auxiliary data; modification may retain the original creator and managerInfos still in manager. |
| content.extend.extra.creator | JSON | Auxiliary identity data of the original creator; if a legacy value exists, modification cannot use this to rewrite the creator. |
| content.extend.extra.managerInfos | object | Dynamic mapping from legacy assignee email addresses to identity data. |
| content.extend.extra.managerInfos.email | JSON | Original identity data corresponding to the email address. |
| content.extend.operator | string | Original operator principal identifier for system operation comments. |
| content.extend.operator_info | object | Principal summary attached to system operation comments. |
| content.extend.operate_type | string | Operation type attached to system operation comments. |
| content.extend.before | JSON | Old value of the system operation; varies by action. |
| content.extend.after | JSON | New value of the system operation; varies by action. |
| content.extend.custom field | JSON | Other extension key-value pairs saved by the caller/system; this API does not guarantee a fixed structure. |
| content.extend.operator_info.uuid | string | Principal UUID; may be empty or a system identifier for system reply principals. |
| content.extend.operator_info.status | integer | Principal status. |
| content.extend.operator_info.wsAccountStatus | integer | Workspace member status; for a key, this is the key status, not the incident status. |
| content.extend.operator_info.username | string | Login name/key name/system name. |
| content.extend.operator_info.name | string | Display name; system AI display names use the site configuration. |
| content.extend.operator_info.iconUrl | string | Avatar URL; may be omitted in system summaries. |
| content.extend.operator_info.email | string | Contact email; in a key summary this may be the key UUID, not a deliverable email address. |
| content.extend.operator_info.mobile | string | Contact mobile number; may be empty. |
| content.extend.operator_info.countryCode | string | Country code; may be omitted in system summaries. |
| content.extend.operator_info.acntWsNickname | string | Workspace nickname; may be omitted in system summaries. |
| content.attachments | array<object> |
Summary of associated attachments; [] if none. |
| content.attachments[].uuid | string | Attachment UUID; download via the downloadAttachment API in this module. |
| content.attachments[].fileName | string | Original file name. |
| content.attachments[].fileSuffix | string | File extension without the dot; file content/direct link is not returned. |
| content.declaration | object or null | Workspace public declaration attached to non-empty content; may be null or an empty object when not configured; not added for an empty content object. |
{
"code": 200,
"content": {
"id": 123,
"uuid": "inccmt_example",
"status": 0,
"creator": "wsak_example",
"updator": "wsak_example",
"createAt": 1785427200,
"updateAt": 1785427260,
"deleteAt": -1,
"incidentsUUID": "incident_example",
"workspaceUUID": "wksp_example",
"comment": "Database connection issue confirmed; handling in progress.",
"extend": {},
"attachments": [],
"declaration": {}
},
"errorCode": "",
"message": "",
"success": true,
"traceId": "TRACE-EXAMPLE"
}
Error Response¶
For authentication, rate limiting, and common request errors, see Common Error Definitions.
| HTTP Status | errorCode | Trigger Condition | Message or Response Description | Handling |
|---|---|---|---|---|
| 406 | ft.ParameterValidationFailed | Request field is missing, or the field value violates the declared validation conditions | Parameter parsing failed | Check the parameter location, field name, type, and value. |
| 400 | ft.RequestJsonFormatError | Invalid request JSON syntax | Request JSON format error | Fix the JSON according to content.reason, line, and column. |
| 400 | ft.JsonFormatError | JSON top level is not an object | Some JSON file format error | Submit an object. |
| 404 | ft.ObjectNotExists | The active comment was not found in the current workspace | Specified object does not exist | Re-obtain the uuid from this workspace's comment list. |
| 400 | ft.IssueReplyNotModify | The current key resource UUID does not match the original comment creator | You are not the creator of this reply and are not allowed to edit | Use the original creating key; do not bypass permissions by modifying the author through extend. |
| 500 | ft.InternalServerError | Database, cache/queue, invalid attachment, unexpanded subfield type/legacy abnormal structure, or unhandled downstream exception | Internal error | Read-only requests can be retried with backoff; for write requests, first read the current incident/comment state and notification records, as the request may already have been committed, to avoid duplicate creation or duplicate notifications. |