users
Creates, updates, deletes, gets or lists a users resource.
Overview
| Name | users |
| Type | Resource |
| Id | pagerduty.schedules.users |
Fields
The following fields are returned by SELECT queries:
- list
The users on the given schedule.
| Name | Datatype | Description |
|---|---|---|
id | string | |
name | string | The name of the user. |
avatar_url | string (url) | The URL of the user's avatar. |
color | string | The schedule color. |
contact_methods | array | The list of contact methods for the user. |
created_via_sso | boolean | If true, the user was created via Single Sign-On (SSO). |
description | string | The user's bio. |
email | string (email) | The user's email address. |
html_url | string (url) | a URL at which the entity is uniquely displayed in the Web app |
http_cal_url | string (uri) | iCal HTTP feed URL for this user's on-call shifts. Only returned on the GET /users/{id} detail endpoint: automatically when viewing your own profile with a user-level token, or when an account admin with can_update_user passes include[]=calendar_urls for another user. Not returned on list endpoints or with account-level read-only keys. Security: this URL is a bearer credential. Anyone with the URL can read the user's on-call calendar without further authentication. Rotate via POST /users/{id}/regenerate_private_url_key if it may have been exposed. |
invitation_sent | boolean | If true, the user has an outstanding invitation. |
job_title | string | The user's title. |
notification_rules | array | The list of notification rules for the user. |
role | string | The user role. Account must have the read_only_users ability to set a user as a read_only_user or a read_only_limited_user, and must have advanced permissions abilities to set a user as observer or restricted_access. (admin, limited_user, observer, owner, read_only_user, restricted_access, read_only_limited_user, user) |
self | string (url) | the API show URL at which the object is accessible |
summary | string | A short-form, server-generated string that provides succinct, important information about an object suitable for primary labeling of an entity in a client. In many cases, this will be identical to name, though it is not intended to be an identifier. |
teams | array | The list of teams to which the user belongs. Account must have the teams ability to set this. |
time_zone | string (tzinfo) | The preferred time zone name. If null, the account's time zone will be used. |
type | string | A string that determines the schema of the object. This must be the standard name for the entity, suffixed by _reference if the object is a reference. |
web_cal_url | string (uri) | iCal webcal URL for this user's on-call shifts. Only returned on the GET /users/{id} detail endpoint: automatically when viewing your own profile with a user-level token, or when an account admin with can_update_user passes include[]=calendar_urls for another user. Not returned on list endpoints or with account-level read-only keys. Security: this URL is a bearer credential. Anyone with the URL can read the user's on-call calendar without further authentication. Rotate via POST /users/{id}/regenerate_private_url_key if it may have been exposed. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | id | since, until | List all of the users on call in a given schedule for a given time range.<br /><br />A Schedule determines the time periods that users are On-Call.<br /><br />For more information see the [API Concepts Document](https://developer.pagerduty.com/api-reference/a47605517c19a-api-concepts#schedules)<br /><br />Scoped OAuth requires: users.read<br /> |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the schedule. (example: P2LJD7G) |
since | string (date-time) | The start of the date range over which you want to search. |
until | string (date-time) | The end of the date range over which you want to search. |
SELECT examples
- list
List all of the users on call in a given schedule for a given time range.<br /><br />A Schedule determines the time periods that users are On-Call.<br /><br />For more information see the [API Concepts Document](https://developer.pagerduty.com/api-reference/a47605517c19a-api-concepts#schedules)<br /><br />Scoped OAuth requires: users.read<br />
SELECT
id,
name,
avatar_url,
color,
contact_methods,
created_via_sso,
description,
email,
html_url,
http_cal_url,
invitation_sent,
job_title,
notification_rules,
role,
self,
summary,
teams,
time_zone,
type,
web_cal_url
FROM pagerduty.schedules.users
WHERE id = '{{ id }}' -- required
AND since = '{{ since }}'
AND until = '{{ until }}'
;