API-Referenz · Incidents · Timeline
Add comment
Mutation
addCommentToIncidentAdds a comment to the incident timeline and optionally publishes it on linked status pages or broadcast channels. Returns the created event.
addCommentToIncident(
organizationUUID: ID!
incidentId: Int!
publicationSpec: IncidentEventPublicationSpec
commentSpec: CommentSpec!
): IncidentEvent!Argumente
Feld
Typ
Rückgabe
Feld
Typ
Beispiel
mutation AddCommentToIncident($organizationUUID: ID!, $incidentId: Int!, $publicationSpec: IncidentEventPublicationSpec, $commentSpec: CommentSpec!) {
addCommentToIncident(organizationUUID: $organizationUUID, incidentId: $incidentId, publicationSpec: $publicationSpec, commentSpec: $commentSpec) {
id
type
createdAt
clientInstanceId
payload {
__typename
... on IncidentEventPayloadEmpty {
empty
}
... on IncidentEventPayloadComment {
comment
}
... on IncidentEventPayloadRole {
responderAdded
}
... on IncidentEventPayloadFieldUpdated {
field
}
... on IncidentEventPayloadAffectedService {
service {
id
name
description
isDeleted
deletedAt
}
}
... on IncidentEventPayloadAffectedServiceImpactChanged {
service {
id
name
description
isDeleted
deletedAt
}
}
... on IncidentEventPayloadResponder {
responder {
firstname
lastname
avatar
}
}
... on IncidentEventPayloadStatuspage {
statuspage {
id
staticId
name
slug
visibility
authentication
hasPassword
offerSignIn
subdomain
customDomain
domain
canEdit
viewAlertThreshold
createdAt
updatedAt
}
}
... on IncidentEventPayloadStatuspageImpactChanged {
statuspage {
id
staticId
name
slug
visibility
authentication
hasPassword
offerSignIn
subdomain
customDomain
domain
canEdit
viewAlertThreshold
createdAt
updatedAt
}
}
... on IncidentEventPayloadState {
oldState {
id
name
order
icon
color
isDefault
isAcknowledged
isResolved
}
}
... on IncidentEventPayloadPriority {
oldPriority {
id
name
order
color
icon
}
}
... on IncidentEventPayloadRelatedAlert {
alert {
id
state
name
description
referenceId
alertedAt
startedAt
resolvedAt
createdAt
relationGroupId
}
}
... on IncidentEventPayloadTask {
task {
id
taskTemplateId
name
description
status
assigneeId
relatedResourceId
createdAt
updatedAt
}
}
... on IncidentEventPayloadTaskAssigned {
tasksEventId
}
... on IncidentEventPayloadTaskStatus {
newStatus
oldStatus
}
}
actor {
__typename
... on ServiceAccountActor {
name
}
... on OrgMemberActor {
user {
firstname
lastname
avatar
}
}
}
notificationInfo {
state
channels
}
}
}Beispielantwort
{
"data": {
"addCommentToIncident": {
"id": "01JB3X7T9QK2M4N6P8R0S2T4V6",
"type": "Example type",
"createdAt": "2026-01-01T12:00:00Z",
"clientInstanceId": "01JB3X7T9QK2M4N6P8R0S2T4V6",
"payload": {
"__typename": "IncidentEventPayloadEmpty",
"empty": true
},
"actor": {
"__typename": "ServiceAccountActor",
"name": "Example name"
},
"notificationInfo": {
"state": "SENT",
"channels": [
"Example channels"
]
}
}
}
}