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
updated_atstring (date-time)The time at which the note was last updated
userobject(opaque JSON object)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectidList existing notes for the specified incident.<br /><br />An incident represents a problem or an issue that needs to be addressed and resolved.<br /><br />For more information see the [API Concepts Document](https:​//developer.pagerduty.com/api-reference/a47605517c19a-api-concepts#incidents)<br /><br />Scoped OAuth requires: incidents.read<br />
createinsertid, noteFromCreate a new note for the specified incident.<br /><br />An incident represents a problem or an issue that needs to be addressed and resolved.<br /><br />A maximum of 2000 notes can be added to an incident.<br /><br />For more information see the [API Concepts Document](https:​//developer.pagerduty.com/api-reference/a47605517c19a-api-concepts#incidents)<br /><br />Scoped OAuth requires: incidents.write<br />
updateupdateid, note_id, noteFromUpdate an existing note for the specified incident.<br /><br />An incident represents a problem or an issue that needs to be addressed and resolved.<br /><br />For more information see the [API Concepts Document](https:​//developer.pagerduty.com/api-reference/a47605517c19a-api-concepts#incidents)<br /><br />Scoped OAuth requires: incidents.write<br />
deletedeleteid, note_idDelete an existing note for the specified incident.<br /><br />An incident represents a problem or an issue that needs to be addressed and resolved.<br /><br />For more information see the [API Concepts Document](https:​//developer.pagerduty.com/api-reference/a47605517c19a-api-concepts#incidents)<br /><br />Scoped OAuth requires: incidents.write<br />

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
idstringThe ID of the resource.
note_idstringThe id of the note.
Fromstring (email)The email address of a valid user associated with the account making the request.

SELECT examples

List existing notes for the specified incident.<br /><br />An incident represents a problem or an issue that needs to be addressed and resolved.<br /><br />For more information see the [API Concepts Document](https:​//developer.pagerduty.com/api-reference/a47605517c19a-api-concepts#incidents)<br /><br />Scoped OAuth requires: incidents.read<br />

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

INSERT examples

Create a new note for the specified incident.<br /><br />An incident represents a problem or an issue that needs to be addressed and resolved.<br /><br />A maximum of 2000 notes can be added to an incident.<br /><br />For more information see the [API Concepts Document](https:​//developer.pagerduty.com/api-reference/a47605517c19a-api-concepts#incidents)<br /><br />Scoped OAuth requires: incidents.write<br />

INSERT INTO pagerduty.incidents.notes (
note,
id,
"From"
)
SELECT
'{{ note }}' /* required */,
'{{ id }}',
'{{ From }}'
RETURNING
note
;

UPDATE examples

Update an existing note for the specified incident.<br /><br />An incident represents a problem or an issue that needs to be addressed and resolved.<br /><br />For more information see the [API Concepts Document](https:​//developer.pagerduty.com/api-reference/a47605517c19a-api-concepts#incidents)<br /><br />Scoped OAuth requires: incidents.write<br />

UPDATE pagerduty.incidents.notes
SET
note = '{{ note }}'
WHERE
id = '{{ id }}' --required
AND note_id = '{{ note_id }}' --required
AND note = '{{ note }}' --required
AND From = '{{ From}}'
RETURNING
note;

DELETE examples

Delete an existing note for the specified incident.<br /><br />An incident represents a problem or an issue that needs to be addressed and resolved.<br /><br />For more information see the [API Concepts Document](https:​//developer.pagerduty.com/api-reference/a47605517c19a-api-concepts#incidents)<br /><br />Scoped OAuth requires: incidents.write<br />

DELETE FROM pagerduty.incidents.notes
WHERE id = '{{ id }}' --required
AND note_id = '{{ note_id }}' --required
;