PagerDuty
PagerDuty is an incident management platform that helps teams respond to and resolve critical incidents in real-time. It provides on-call scheduling, alerting, escalation management, and analytics to ensure the right people are notified at the right time when incidents occur. Teams use PagerDuty to manage their incident response workflow, coordinate on-call rotations, and improve their overall incident resolution times.
Authentication Types
PagerDuty supports 2 authentication methods:
-
OAuth 2.0 - Secure, app-based authentication with granular permission control.
- Pros: Most secure, per-user tracking, granular scope control, production-ready, better audit trail
- Cons: Requires admin privileges to set up, more complex initial setup (~5-10 min)
- Best for: Production deployments, multi-user scenarios, compliance requirements, marketplace integrations
-
API Key - Simple, personal API token for quick integration.
- Pros: Very simple setup, works immediately, no app registration needed
- Cons: Single shared credential, full account access, less granular permissions, weaker audit trail
- Best for: Personal use, testing, quick prototypes, single-user scenarios, development environments
Setting up OAuth 2.0
OAuth 2.0 is the recommended authentication method for production use. You'll need administrator privileges in your PagerDuty account.
1. Access App Registration
-
Log in to your PagerDuty account as an administrator
-
Navigate to Integrations in the top navigation bar
-
Under Developer Tools column, click App Registration
Only account administrators and owners can create OAuth applications. If you don't see the App Registration option, contact your PagerDuty administrator.
2. Register a New App
-
Click Register an App or Create New App
-
Select OAuth 2.0 as the app type
-
Fill in the app details:
- App Name: Give it a descriptive name (e.g., "Webrix AI Integration")
- Brief Description: Describe what the app does
- Category: Select "Incident Management" or "Developer Tools"
- Redirect URL: Copy the OAuth redirect URL from Webrix and paste it here
-
Click Save or Next
3. Configure OAuth Scopes
-
On the Scopes or Permissions page, select the scopes your integration needs:
Recommended minimum scopes for basic functionality:
incidents.read- View incidentsincidents.write- Acknowledge and resolve incidentsservices.read- View servicesusers.read- View usersoncalls.read- View on-call schedulesschedules.read- View schedules
Additional scopes for advanced features:
services.write- Modify service configurationsschedules.write- Create schedule overridesescalation_policies.read- View escalation policiesteams.read- View teamsanalytics.read- Access incident analyticspriorities.read- View incident prioritiesabilities.read- Discover account features
-
Click Save
4. Get Client Credentials
-
After saving, you'll see the Client ID displayed
-
Click Show or Generate Client Secret to reveal the Client Secret
-
Copy both the Client ID and Client Secret
Keep your Client Secret secure! It's shown only once. Never share it publicly or commit it to version control. If you lose it, you'll need to regenerate it, which will break existing connections.
5. Configure in Webrix
-
In Webrix, navigate to Integrations → Add Integration → Built-in
-
Select PagerDuty and click Use
-
Under Authentication Type, select OAuth
-
Paste your Client ID in the Client ID field
-
Paste your Client Secret in the Client Secret field
-
Review and select the Scopes you granted in PagerDuty (they should match)
-
Click Save Changes
6. Test the Connection
-
After saving, click Connect to initiate the OAuth flow
-
You'll be redirected to PagerDuty to authorize the app
-
Review the permissions requested and click Authorize or Allow
-
You'll be redirected back to Webrix with a successful connection
-
The integration is now ready to use
Setting up API Key
API Key authentication provides quick setup but uses a shared credential with full account access. Requires account administrator privileges.
1. Generate an API Key
-
Log in to your PagerDuty account as an administrator
-
Navigate to Configuration → API Access in the menu
(Alternative path: Click your profile icon → API Access Keys)
-
Click Create New API Key
-
Fill in the details:
- Description: Give it a descriptive name (e.g., "Webrix Integration")
- Read Only: Leave unchecked (we need write access for incident management)
-
Click Create Key
-
IMPORTANT: Copy the API key value immediately - it will only be shown once
API Keys have full administrative access to your PagerDuty account. Store them securely, rotate them regularly (every 90 days recommended), and never commit them to source control or share them publicly.
2. Configure in Webrix
-
In Webrix, navigate to Integrations → Add Integration → Built-in
-
Select PagerDuty and click Use
-
Under Authentication Type, select API Key
-
Paste your API Key in the token field
-
Click Save Changes
3. Test the Connection
-
After saving, click Connect to test the connection
-
If successful, you'll see a confirmation message
-
The integration is now ready to use
Available Operations
The PagerDuty connector provides 23 tools organized into 6 categories:
Incidents Management (7 tools)
Core incident response operations:
- List Incidents - Query incidents with flexible filters (status, urgency, date range, service, team, user)
- Get Incident - Retrieve detailed incident information including timeline
- Create Incident - Manually create a new incident for a service
- Update Incident - Modify incident properties (title, urgency, priority, status, escalation)
- Acknowledge Incident - Acknowledge one or more incidents (bulk operation supported)
- Resolve Incident - Resolve one or more incidents (bulk operation supported)
- List Incident Alerts - Get all alerts associated with an incident
Services (3 tools)
Service catalog and configuration:
- List Services - Browse services with filters (team, query, include escalation policies)
- Get Service - Retrieve detailed service configuration
- Update Service - Modify service settings (name, description, escalation policy, timeouts)
On-Calls & Schedules (4 tools)
Managing who's on-call:
- List On-Calls - Get current on-call users (filter by schedule, escalation policy, user, time)
- List Schedules - Browse all on-call schedules
- Get Schedule - Retrieve schedule details with coverage for a date range
- Create Schedule Override - Create temporary schedule overrides for shift swaps or time off
Users & Teams (4 tools)
User and team management:
- List Users - Browse users with filters (team, query, include contact methods)
- Get User - Retrieve user details including contact methods and notification rules
- List Teams - Browse all teams
- Get Team - Retrieve team details
Escalation Policies (2 tools)
Escalation configuration:
- List Escalation Policies - Browse escalation policies (filter by team, user, query)
- Get Escalation Policy - Retrieve policy details with all escalation rules and levels
Analytics & Abilities (3 tools)
Reporting and feature discovery:
- Get Abilities - List enabled features for the account
- Get Analytics Metrics - Retrieve incident analytics (MTTA, MTTR, incident counts, trends)
- List Priorities - Get configured incident priorities (P1, P2, P3, etc.)
Common Use Cases
Incident Response Workflow
List Incidents (filter: status=triggered)
→ Get Incident (review details)
→ Acknowledge Incident
→ (investigate and fix)
→ Resolve Incident
Check Current On-Call
List On-Calls (filter by schedule/escalation policy)
→ Get User (get contact details for on-call person)
Service Health Check
List Services
→ Get Service (check configuration)
→ List Incidents (filter by service)
→ Get Analytics Metrics (check MTTA/MTTR for service)
Schedule Management
List Schedules
→ Get Schedule (view coverage for date range)
→ Create Schedule Override (handle time off or shift swap)
Incident Analysis
List Incidents (filter by date range)
→ Get Incident (examine details)
→ List Incident Alerts (see all triggering alerts)
→ Get Analytics Metrics (measure response times)
User Management
List Users
→ Get User (review notification rules)
→ List On-Calls (check user's on-call schedule)
Troubleshooting
"Invalid API key" or "Access denied" error
Cause: The API key is incorrect, expired, has been revoked, or lacks necessary permissions.
Solution:
- Verify you copied the complete API key value (they're quite long)
- Check that the API key hasn't been deactivated in PagerDuty Configuration → API Access
- Ensure the API key is not "Read Only" (we need write access for incident operations)
- Generate a new API key and update Webrix
- Test the connection after updating
"Insufficient permissions" error (OAuth)
Cause: The OAuth application doesn't have the required scopes granted for the operation.
Solution:
- Go to your OAuth app in PagerDuty App Registration
- Review the granted scopes - ensure they match what's needed for your operations
- Add any missing scopes (e.g.,
incidents.writefor acknowledging incidents) - Save the changes in PagerDuty
- Reconnect in Webrix to get a new token with updated scopes
- The error should include which scope is missing - use that to identify what to add
"From header required" error
Cause: Operations that modify incident state (acknowledge, resolve, create, update) require a From header with the email of the user performing the action for audit purposes.
Solution:
- When using tools like Acknowledge Incident, Resolve Incident, Create Incident, or Update Incident, ensure you provide the
from_emailparameter - The email must belong to a valid PagerDuty user in your account
- This is required by PagerDuty's API for audit trail purposes
- Example:
from_email: "[email protected]"
Rate limit errors (429 status)
Cause: PagerDuty enforces rate limits of 960 requests per minute per API key or OAuth token.
Solution:
- Implement exponential backoff in your retry logic
- Wait a minute before retrying after hitting the limit
- Use bulk operations where possible (e.g., acknowledge/resolve multiple incidents at once)
- Reduce the frequency of API calls in your workflows
- Consider caching results that don't change frequently (schedules, services, escalation policies)
- Contact PagerDuty support if you consistently hit limits and need an increase
"Incident not found" or "Service not found" error
Cause: The resource ID doesn't exist, has been deleted, or you don't have permission to access it.
Solution:
- Verify the ID is correct - use List operations to find valid IDs
- Check that the resource hasn't been deleted
- Ensure your OAuth scopes or API key has access to the resource
- For team-scoped resources, verify your user has access to the relevant team
- Try using List Incidents or List Services to confirm the resource exists
Schedule gaps or incorrect on-call assignments
Cause: Schedule configuration issues, missing layers, or incorrect timezone handling.
Solution:
- Use Get Schedule to review schedule layers and coverage
- Check the
time_zoneparameter - ensure it matches your expectations - Verify schedule layers don't have gaps in coverage
- Check for conflicting overrides that might affect coverage
- Review schedule restrictions (daily/weekly time restrictions)
- Ensure users in the schedule are active and have valid contact methods
OAuth redirect URI mismatch error
Cause: The redirect URL in your PagerDuty app doesn't match the one being used during the OAuth flow.
Solution:
- Copy the exact redirect URI from Webrix
- Go to your PagerDuty app in App Registration
- Ensure the redirect URI is added exactly as shown (including https:// and any trailing slashes)
- Save the changes and try connecting again
- If the issue persists, try removing and re-adding the redirect URI
Cannot create incidents - "Service not found" error
Cause: The service ID is invalid or your account doesn't have access to the service.
Solution:
- Use List Services to get valid service IDs
- Ensure the service hasn't been deleted
- Verify your OAuth scopes include
services.read - Check that your user has access to the team that owns the service
- Copy the service ID from the List Services response (usually starts with "P")
Best Practices
Authentication
- Use OAuth for production - OAuth provides better security, audit trails, and per-user tracking
- Grant minimal scopes - Only request the OAuth scopes you actually need (principle of least privilege)
- Rotate API keys regularly - If using API keys, rotate them every 90 days
- Store credentials securely - Never commit credentials to version control or share them publicly
- Monitor for unauthorized access - Regularly review API access in PagerDuty's audit logs
Incident Management
- Use bulk operations - Acknowledge or resolve multiple incidents at once using arrays of IDs
- Always provide from_email - Include the user's email for proper audit trails
- Filter incidents effectively - Use status, urgency, and date filters to find relevant incidents quickly
- Check incident alerts - Use List Incident Alerts to understand root causes
- Set appropriate priorities - Use List Priorities to find valid priority IDs, then assign them consistently
On-Call Management
- Plan overrides in advance - Create schedule overrides early for known time off or shift swaps
- Verify schedule coverage - Use Get Schedule with date ranges to ensure no gaps
- Check timezone handling - Always specify time_zone parameter to avoid confusion
- Document on-call procedures - Keep escalation policies and schedules well-documented
- Test escalations - Periodically verify escalation policies work as expected
Performance & Reliability
- Implement retry logic - Use exponential backoff for failed requests
- Handle rate limits - Monitor for 429 errors and implement proper backoff
- Cache stable data - Cache services, escalation policies, schedules that don't change often
- Use pagination - Don't try to fetch all records at once; use limit and offset
- Monitor integration health - Set up alerts for integration failures
Analytics & Reporting
- Track MTTA and MTTR - Regularly review incident response metrics
- Segment by service/team - Use filters to compare performance across services
- Set baselines and SLOs - Establish target response times and measure against them
- Review trends - Use aggregate_unit (day/week/month) to identify patterns
- Act on insights - Use analytics to identify areas for improvement in your incident response
Service Configuration
- Configure acknowledgement timeouts - Set reasonable timeouts to re-notify if incidents aren't acknowledged
- Set auto-resolve timeouts carefully - Only use auto-resolve when appropriate for your services
- Map services to teams - Assign services to teams for better organization and filtering
- Review escalation policies - Ensure escalation policies match your on-call rotations
- Test service integrations - Verify monitoring tools can create incidents successfully
Security Considerations
- Incident operations are destructive - Acknowledging, resolving, and creating incidents affect production systems
- API keys have full account access - Treat them as highly sensitive credentials
- OAuth scopes should follow least privilege - Only grant the minimum scopes needed
- Audit trails are important - The
from_emailparameter enables proper audit logging - Rate limits protect the platform - Don't attempt to circumvent rate limits
- Regular access reviews - Periodically audit who has API access and OAuth connections
- Incident data is sensitive - May contain details about outages, customer impact, and system vulnerabilities
Rate Limits
PagerDuty enforces the following rate limits:
- 960 requests per minute per API key or OAuth token
- Rate limit headers are included in responses:
X-Rate-Limit-Limit- Your rate limit ceilingX-Rate-Limit-Remaining- Requests remaining in current periodX-Rate-Limit-Reset- Time when the rate limit resets (Unix timestamp)
When you exceed the rate limit, you'll receive a 429 status code. Implement exponential backoff and respect the rate limit headers to avoid disruptions.
API Version
The PagerDuty connector uses REST API v2, indicated by the header:
Accept: application/vnd.pagerduty+json;version=2
This header is automatically included in all requests. The API version is stable and widely supported.