Corsair
PluginsPagerDuty

PagerDuty API Endpoints

Complete reference for all PagerDuty API endpoints

The PagerDuty plugin provides access to PagerDuty's incident management API through a typed interface.

New to Corsair? Learn about core concepts like API access, authentication, and error handling.

Full Implementation: For the complete, up-to-date list, see the PagerDuty plugin source code.

Incidents

create

incidents.create

Create a new incident.

const incident = await corsair.pagerduty.api.incidents.create({
    title: "Production database is down", 
    serviceId: "SERVICE123",
    urgency: "high",
    from: "engineer@example.com",
});

Parameters:

NameTypeRequiredDescription
titlestringYesIncident title
serviceIdstringYesService ID to create incident against
urgencystringNohigh or low
fromstringYesEmail of the user creating the incident
bodyobjectNoIncident body with details

get

incidents.get

Get a single incident by ID.

const incident = await corsair.pagerduty.api.incidents.get({
    id: "INC123", 
});

Parameters:

NameTypeRequiredDescription
idstringYesIncident ID

list

incidents.list

List incidents with optional filters.

const incidents = await corsair.pagerduty.api.incidents.list({
    statuses: ["triggered", "acknowledged"], 
    limit: 25,
});

Parameters:

NameTypeRequiredDescription
statusesstring[]NoFilter by status (triggered, acknowledged, resolved)
service_idsstring[]NoFilter by service IDs
urgenciesstring[]NoFilter by urgency (high, low)
limitnumberNoMax results to return
offsetnumberNoPagination offset

update

incidents.update

Update an incident (acknowledge, resolve, reassign).

await corsair.pagerduty.api.incidents.update({
    id: "INC123",
    status: "resolved", 
    resolution: "Fixed the database connection issue",
    from: "engineer@example.com",
});

Parameters:

NameTypeRequiredDescription
idstringYesIncident ID
statusstringNoNew status (acknowledged, resolved)
resolutionstringNoResolution message
fromstringYesEmail of the user making the update
assignmentsarrayNoNew assignments

Incident Notes

create

incidentNotes.create

Add a note to an incident.

await corsair.pagerduty.api.incidentNotes.create({
    incidentId: "INC123", 
    content: "Identified root cause: connection pool exhaustion",
    from: "engineer@example.com",
});

Parameters:

NameTypeRequiredDescription
incidentIdstringYesIncident ID
contentstringYesNote text
fromstringYesEmail of the note author

list

incidentNotes.list

List notes for an incident.

const notes = await corsair.pagerduty.api.incidentNotes.list({
    incidentId: "INC123", 
});

Parameters:

NameTypeRequiredDescription
incidentIdstringYesIncident ID

Log Entries

get

logEntries.get

Get a single log entry by ID.

const entry = await corsair.pagerduty.api.logEntries.get({
    id: "LOG123", 
});

Parameters:

NameTypeRequiredDescription
idstringYesLog entry ID

list

logEntries.list

List log entries.

const entries = await corsair.pagerduty.api.logEntries.list({
    is_overview: true,
    limit: 25,
});

Parameters:

NameTypeRequiredDescription
is_overviewbooleanNoReturn only overview entries
limitnumberNoMax results
offsetnumberNoPagination offset

Users

get

users.get

Get a user by ID.

const user = await corsair.pagerduty.api.users.get({
    id: "USER123", 
});

Parameters:

NameTypeRequiredDescription
idstringYesUser ID