This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »



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

OperationDescription

createNote

Creates a note for an incident.

listNotesRetrieves 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.

createNote
<pagerduty.createNote>
    <incidentId>{$ctx:incidentId}</incidentId>
    <requesterId>{$ctx:requesterId}</requesterId>
	<noteContent>{$ctx:noteContent}</noteContent>
</pagerduty.createNote>
Properties
  • incidentId: The unique identifier of the incident.
  • requesterId: The unique identifier of the user who is making the request.
  • noteContent: The content of the note to be added.
Sample request

Following is a sample REST/JSON request that can be handled by the createNote operation.

Sample Request for createNote
{
   "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 listNotes operation retrieves existing notes for the specified incident.

listNotes
<pagerduty.listNotes>
	<incidentId>{$ctx:incidentId}</incidentId>
</pagerduty.listNotes>
Properties
  • incidentId: The unique identifier of the incident.
Sample request

Following is a sample REST/JSON request that can be handled by the listNotes operation.

Sample Request for 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 createNote 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.

Sample Proxy
<?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>                                                                                                                                               
  • No labels