notes
Creates, updates, deletes, gets or lists a notes resource.
Overview
| Name | notes |
| Type | Resource |
| Id | pagerduty.incidents.notes |
Fields
The following fields are returned by SELECT queries:
- list
An array of notes.
| Name | Datatype | Description |
|---|---|---|
id | string | |
channel | object | The means by which this Note was created. Has different formats depending on type. |
content | string | The note content |
created_at | string (date-time) | The time at which the note was submitted |
updated_at | string (date-time) | The time at which the note was last updated |
user | object | (opaque JSON object) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | id | 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 /> | |
create | insert | id, note | From | 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 /> |
update | update | id, note_id, note | From | 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 /> |
delete | delete | id, note_id | 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 /> |
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.
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the resource. |
note_id | string | The id of the note. |
From | string (email) | The email address of a valid user associated with the account making the request. |
SELECT examples
- list
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
- Manifest
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
;
# Description fields are for documentation purposes
- name: notes
props:
- name: id
value: "{{ id }}"
description: Required parameter for the notes resource.
- name: note
value:
content: "{{ content }}"
- name: From
value: "{{ From }}"
description: The email address of a valid user associated with the account making the request.
description: The email address of a valid user associated with the account making the request.
UPDATE examples
- update
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
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
;