Skip to main content

notes

Creates, updates, deletes, gets or lists a notes resource.

Overview

Namenotes
TypeResource
Idpagerduty.incidents.notes

Fields

The following fields are returned by SELECT queries:

An array of notes.

NameDatatypeDescription
idstring
channelobjectThe means by which this Note was created. Has different formats depending on type.
contentstringThe note content
created_atstring (date-time)The time at which the note was submitted
userobjectThe user who created a Note. If a service created this Note the user.type will be "bot_user_reference" and user.summary will list the name of the service rather than the user.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_incident_notesselectidAccept, Content-TypeList existing notes for the specified incident.

An incident represents a problem or an issue that needs to be addressed and resolved.

For more information see the API Concepts Document

Scoped OAuth requires: incidents.read
create_incident_noteinsertid, From, data__noteAccept, Content-TypeCreate a new note for the specified incident.

An incident represents a problem or an issue that needs to be addressed and resolved.

A maximum of 2000 notes can be added to an incident.

For more information see the API Concepts Document

Scoped OAuth requires: incidents.write
_list_incident_notesexecidAccept, Content-TypeList existing notes for the specified incident.

An incident represents a problem or an issue that needs to be addressed and resolved.

For more information see the API Concepts Document

Scoped OAuth requires: incidents.read

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
Fromstring (email)The email address of a valid user associated with the account making the request.
idstringThe ID of the resource.
AcceptstringThe Accept header is used as a versioning header.
Content-Typestring

SELECT examples

List existing notes for the specified incident.

An incident represents a problem or an issue that needs to be addressed and resolved.

For more information see the API Concepts Document

Scoped OAuth requires: incidents.read

SELECT
id,
channel,
content,
created_at,
user
FROM pagerduty.incidents.notes
WHERE id = '{{ id }}' -- required
AND Accept = '{{ Accept }}'
AND Content-Type = '{{ Content-Type }}'
;

INSERT examples

Create a new note for the specified incident.

An incident represents a problem or an issue that needs to be addressed and resolved.

A maximum of 2000 notes can be added to an incident.

For more information see the API Concepts Document

Scoped OAuth requires: incidents.write

INSERT INTO pagerduty.incidents.notes (
data__note,
id,
From,
Accept,
Content-Type
)
SELECT
'{{ note }}' /* required */,
'{{ id }}',
'{{ From }}',
'{{ Accept }}',
'{{ Content-Type }}'
RETURNING
note
;

Lifecycle Methods

List existing notes for the specified incident.

An incident represents a problem or an issue that needs to be addressed and resolved.

For more information see the API Concepts Document

Scoped OAuth requires: incidents.read

EXEC pagerduty.incidents.notes._list_incident_notes 
@id='{{ id }}' --required,
@Accept='{{ Accept }}',
@Content-Type='{{ Content-Type }}'
;