PagerDuty Command Line Interface
$ npm install -g pagerduty-cli
$ pd COMMAND
running command...
$ pd (-v|--version|version)
pagerduty-cli/0.0.32 darwin-x64 node-v14.11.0
$ pd --help [COMMAND]
USAGE
$ pd COMMAND
...
pd auth:get
pd auth:set
pd auth:web
pd help [COMMAND]
pd incident:ack
pd incident:list
pd incident:notes
pd incident:open
pd incident:priority
pd incident:resolve
pd rest:delete
pd rest:fetch
pd rest:get
pd rest:post
pd rest:put
pd schedule:list
pd service:disable
pd service:enable
pd service:list
pd service:set
pd update [CHANNEL]
pd user:list
pd user:set
Get PagerDuty Auth token
USAGE
$ pd auth:get
OPTIONS
-h, --help show CLI help
See code: src/commands/auth/get.ts
Set PagerDuty Auth token
USAGE
$ pd auth:set
OPTIONS
-t, --token=token A PagerDuty API token
See code: src/commands/auth/set.ts
Authenticate with PagerDuty in the browser
USAGE
$ pd auth:web
OPTIONS
-h, --help show CLI help
See code: src/commands/auth/web.ts
display help for pd
USAGE
$ pd help [COMMAND]
ARGUMENTS
COMMAND command to show help for
OPTIONS
--all see all commands in CLI
See code: @oclif/plugin-help
Acknowledge PagerDuty Incidents
USAGE
$ pd incident:ack
OPTIONS
-h, --help show CLI help
-i, --ids=ids Incident ID's to acknowledge. Specify multiple times for multiple incidents.
-m, --me Acknowledge all incidents assigned to me
-p, --pipe Read incident ID's from stdin.
See code: src/commands/incident/ack.ts
List PagerDuty Incidents
USAGE
$ pd incident:list
OPTIONS
-S, --services=services Service names to include. Specify multiple times for
multiple services.
-e, --assignees=assignees Return only incidents assigned to this PD login email.
Specify multiple times for multiple assignees.
-h, --help show CLI help
-j, --json output full details as JSON
-k, --keys=keys Additional fields to display. Specify multiple times for
multiple fields.
-m, --me Return only incidents assigned to me
-p, --pipe Print incident ID's only to stdin, for use with pipes.
-s, --statuses=open|closed|triggered|acknowledged|resolved [default: open] Return only incidents with the given
statuses. Specify multiple times for multiple statuses.
-t, --teams=teams Team names to include. Specify multiple times for multiple
teams.
-u, --urgencies=high|low [default: high,low] Urgencies to include.
-x, --extended show extra columns
--columns=columns only show provided columns (comma-separated)
--csv output is csv format [alias: --output=csv]
--filter=filter filter property by partial string matching, ex: name=foo
--no-header hide table header from output
--no-truncate do not truncate output to fit screen
--output=csv|json|yaml output in a more machine friendly format
--since=since The start of the date range over which you want to search.
--sort=sort property to sort by (prepend '-' for descending)
--until=until The end of the date range over which you want to search.
See code: src/commands/incident/list.ts
See or add notes on PagerDuty Incidents
USAGE
$ pd incident:notes
OPTIONS
-h, --help show CLI help
-i, --id=id (required) Incident ID.
-n, --note=note Note to add
-x, --extended show extra columns
--columns=columns only show provided columns (comma-separated)
--csv output is csv format [alias: --output=csv]
--filter=filter filter property by partial string matching, ex: name=foo
--no-header hide table header from output
--no-truncate do not truncate output to fit screen
--output=csv|json|yaml output in a more machine friendly format
--sort=sort property to sort by (prepend '-' for descending)
See code: src/commands/incident/notes.ts
Open PagerDuty Incidents in your browser
USAGE
$ pd incident:open
OPTIONS
-h, --help show CLI help
-i, --ids=ids Incident ID's to open. Specify multiple times for multiple incidents.
-m, --me Open all incidents assigned to me
-p, --pipe Read incident ID's from stdin.
See code: src/commands/incident/open.ts
Set priority on PagerDuty Incidents
USAGE
$ pd incident:priority
OPTIONS
-h, --help show CLI help
-i, --ids=ids Incident ID's to set priority on. Specify multiple times for multiple incidents.
-m, --me Set priority on all incidents assigned to me
-n, --priority=priority (required) The name of the priority to set.
-p, --pipe Read incident ID's from stdin.
See code: src/commands/incident/priority.ts
Resolve PagerDuty Incidents
USAGE
$ pd incident:resolve
OPTIONS
-h, --help show CLI help
-i, --ids=ids Incident ID's to resolve. Specify multiple times for multiple incidents.
-m, --me Resolve all incidents assigned to me
-p, --pipe Read incident ID's from stdin.
See code: src/commands/incident/resolve.ts
Make a DELETE request to PagerDuty
USAGE
$ pd rest:delete
OPTIONS
-H, --headers=headers [default: ] Headers to add, for example, `From=martin@pagerduty.com`. Specify multiple times
for multiple headers.
-e, --endpoint=endpoint (required) The path to the endpoint, for example, `/users/PXXXXXX` or `/services`
-h, --help show CLI help
-p, --params=params [default: ] Parameters to add, for example, `query=martin` or `include[]=teams. Specify
multiple times for multiple params.
See code: src/commands/rest/delete.ts
Fetch objects from PagerDuty
USAGE
$ pd rest:fetch
OPTIONS
-e, --endpoint=endpoint (required) The path to the endpoint, for example, `/users/PXXXXXX` or `/services`
-h, --help show CLI help
-p, --params=params [default: ] Parameters to add, for example, `query=martin` or `include[]=teams. Specify
multiple times for multiple params.
See code: src/commands/rest/fetch.ts
Make a GET request to PagerDuty
USAGE
$ pd rest:get
OPTIONS
-H, --headers=headers [default: ] Headers to add, for example, `From=martin@pagerduty.com`. Specify multiple times
for multiple headers.
-e, --endpoint=endpoint (required) The path to the endpoint, for example, `/users/PXXXXXX` or `/services`
-h, --help show CLI help
-p, --params=params [default: ] Parameters to add, for example, `query=martin` or `include[]=teams. Specify
multiple times for multiple params.
See code: src/commands/rest/get.ts
Make a POST request to PagerDuty
USAGE
$ pd rest:post
OPTIONS
-H, --headers=headers [default: ] Headers to add, for example, `From=martin@pagerduty.com`. Specify multiple times
for multiple headers.
-d, --data=data (required) JSON data to send
-e, --endpoint=endpoint (required) The path to the endpoint, for example, `/users/PXXXXXX` or `/services`
-h, --help show CLI help
-p, --params=params [default: ] Parameters to add, for example, `query=martin` or `include[]=teams. Specify
multiple times for multiple params.
See code: src/commands/rest/post.ts
Make a PUT request to PagerDuty
USAGE
$ pd rest:put
OPTIONS
-H, --headers=headers [default: ] Headers to add, for example, `From=martin@pagerduty.com`. Specify multiple times
for multiple headers.
-d, --data=data (required) JSON data to send
-e, --endpoint=endpoint (required) The path to the endpoint, for example, `/users/PXXXXXX` or `/services`
-h, --help show CLI help
-p, --params=params [default: ] Parameters to add, for example, `query=martin` or `include[]=teams. Specify
multiple times for multiple params.
See code: src/commands/rest/put.ts
List PagerDuty Schedules
USAGE
$ pd schedule:list
OPTIONS
-h, --help show CLI help
-j, --json output full details as JSON
-k, --keys=keys Additional fields to display. Specify multiple times for multiple fields.
-n, --name=name Select schedules whose names contain the given text
-p, --pipe Print user ID's only to stdin, for use with pipes.
-x, --extended show extra columns
--columns=columns only show provided columns (comma-separated)
--csv output is csv format [alias: --output=csv]
--filter=filter filter property by partial string matching, ex: name=foo
--no-header hide table header from output
--no-truncate do not truncate output to fit screen
--output=csv|json|yaml output in a more machine friendly format
--sort=sort property to sort by (prepend '-' for descending)
See code: src/commands/schedule/list.ts
Disable PagerDuty Services
USAGE
$ pd service:disable
OPTIONS
-h, --help show CLI help
-i, --ids=ids Select services with the given ID. Specify multiple times for multiple services.
-n, --name=name Select services whose names contain the given text
-p, --pipe Read service ID's from stdin.
See code: src/commands/service/disable.ts
Enable PagerDuty Services
USAGE
$ pd service:enable
OPTIONS
-h, --help show CLI help
-i, --ids=ids Select services with the given ID. Specify multiple times for multiple services.
-n, --name=name Select services whose names contain the given text
-p, --pipe Read service ID's from stdin.
See code: src/commands/service/enable.ts
List PagerDuty Services
USAGE
$ pd service:list
OPTIONS
-h, --help show CLI help
-j, --json output full details as JSON
-k, --keys=keys Additional fields to display. Specify multiple times for multiple fields.
-n, --name=name Retrieve only services whose names contain this text
-p, --pipe Print service ID's only to stdin, for use with pipes.
-t, --teams=teams Team names to include. Specify multiple times for multiple teams.
-x, --extended show extra columns
--columns=columns only show provided columns (comma-separated)
--csv output is csv format [alias: --output=csv]
--filter=filter filter property by partial string matching, ex: name=foo
--no-header hide table header from output
--no-truncate do not truncate output to fit screen
--output=csv|json|yaml output in a more machine friendly format
--sort=sort property to sort by (prepend '-' for descending)
See code: src/commands/service/list.ts
Set PagerDuty Service attributes
USAGE
$ pd service:set
OPTIONS
-h, --help show CLI help
-i, --ids=ids Select services with the given ID. Specify multiple times for multiple services.
-k, --key=key (required) Attribute key to set
-n, --name=name Select services whose names contain the given text
-p, --pipe Read service ID's from stdin.
-v, --value=value (required) Attribute value to set
See code: src/commands/service/set.ts
update the pd CLI
USAGE
$ pd update [CHANNEL]
See code: @oclif/plugin-update
List PagerDuty Users
USAGE
$ pd user:list
OPTIONS
-e, --email=email Select users whose login email addresses contain the given text
-h, --help show CLI help
-j, --json output full details as JSON
-k, --keys=keys Additional fields to display. Specify multiple times for multiple fields.
-p, --pipe Print user ID's only to stdin, for use with pipes.
-x, --extended show extra columns
--columns=columns only show provided columns (comma-separated)
--csv output is csv format [alias: --output=csv]
--filter=filter filter property by partial string matching, ex: name=foo
--no-header hide table header from output
--no-truncate do not truncate output to fit screen
--output=csv|json|yaml output in a more machine friendly format
--sort=sort property to sort by (prepend '-' for descending)
See code: src/commands/user/list.ts
Set PagerDuty User attributes
USAGE
$ pd user:set
OPTIONS
-e, --email=email Select users whose emails contain the given text
-h, --help show CLI help
-i, --ids=ids Select users with the given ID. Specify multiple times for multiple users.
-k, --key=key (required) Attribute key to set
-p, --pipe Read user ID's from stdin.
-v, --value=value (required) Attribute value to set
See code: src/commands/user/set.ts