Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
import requests
import json
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
# Your PagerDuty API key. A read-only key will work for this.
api_key = 'ENTER_YOUR_API_KEY'
@lfepp
lfepp / import_users.rb
Last active October 9, 2018 16:30
A simple Ruby script to import users into PagerDuty from a CSV file
#!/usr/bin/env ruby
require 'rubygems'
require 'faraday'
require 'json'
require 'csv'
require 'optparse'
class PagerDutyAgent
attr_reader :token