Overview
The following operations allow you to work with notes. Click an operation name to see details on how to use it.
For a sample proxy service that illustrates how to work with notes, see Sample configuration.
Operation | Description |
---|---|
Creates a note for an incident. | |
listNotes | Retrieves the notes for an incident. |
Operation details
This section provides further details on the operations related to notes.
Creating a note for an incident
The createNote
operation creates a note (add a note) for an incident.
<pagerduty.createNote> <incidentId>{$ctx:incidentId}</incidentId> <requesterId>{$ctx:requesterId}</requesterId> <noteContent>{$ctx:noteContent}</noteContent> </pagerduty.createNote>
Properties
The unique identifier of the incident.incidentId:
The unique identifier of the user who is making the request.requesterId:
The content of the note to be added.noteContent:
Sample request
Following is a sample REST/JSON request that can be handled by the createNote
operation.
{ "apiUrl" : "https://virasoft.pagerduty.com", "apiToken" : "uAB6yAsCkWxPqdCbuJqd", "incidentId" : "PE9A8MU", "requesterId" : "PD83TQS", "noteContent" : "Simple Note" }
Related PagerDuty documentation
https://developer.pagerduty.com/documentation/rest/incidents/notes/create
Retrieving the notes for an incident
The
operation retrieves existing notes for the specified incident.listNotes
<pagerduty.listNotes> <incidentId>{$ctx:incidentId}</incidentId> </pagerduty.listNotes>
Properties
The unique identifier of the incident.incidentId:
Sample request
Following is a sample REST/JSON request that can be handled by the
operation.listNotes
{ "apiUrl" : "https://virasoft.pagerduty.com", "apiToken" : "uAB6yAsCkWxPqdCbuJqd", "incidentId" : "6" }
Related PagerDuty documentation
https://developer.pagerduty.com/documentation/rest/incidents/notes/list
Sample configuration
Following is a sample proxy service that illustrates how to connect to PagerDuty with the init
operation and use the
operation. The sample request for this proxy can be found in the createNote sample request. You can use this sample as a template for using other operations in this category.createNote
<?xml version="1.0" encoding="UTF-8"?> <proxy xmlns="http://ws.apache.org/ns/synapse" name="pagerduty_createNote" transports="https,http" statistics="disable" trace="disable" startOnLoad="true"> <target> <inSequence onError="faultHandlerSeq"> <property name="apiUrl" expression="json-eval($.apiUrl)"/> <property name="apiToken" expression="json-eval($.apiToken)"/> <property name="incidentId" expression="json-eval($.incidentId)"/> <property name="requesterId" expression="json-eval($.requesterId)"/> <property name="noteContent" expression="json-eval($.noteContent)"/> <pagerduty.init> <apiUrl>{$ctx:apiUrl}</apiUrl> <apiToken>{$ctx:apiToken}</apiToken> </pagerduty.init> <pagerduty.createNote> <incidentId>{$ctx:incidentId}</incidentId> <requesterId>{$ctx:requesterId}</requesterId> <noteContent>{$ctx:noteContent}</noteContent> </pagerduty.createNote> <respond/> </inSequence> <outSequence> <send/> </outSequence> </target> <description/> </proxy>