Skip to main content

me

Creates, updates, deletes, gets or lists a me resource.

Overview

Nameme
TypeResource
Idpagerduty.users.me

Fields

The following fields are returned by SELECT queries:

The requesting user.

NameDatatypeDescription
idstring
namestringThe name of the user.
avatar_urlstring (url)The URL of the user's avatar.
colorstringThe schedule color.
contact_methodsarrayThe list of contact methods for the user.
descriptionstringThe user's bio.
emailstring (email)The user's email address.
html_urlstring (url)a URL at which the entity is uniquely displayed in the Web app
invitation_sentbooleanIf true, the user has an outstanding invitation.
job_titlestringThe user's title.
licenseobjectThe License assigned to the User
notification_rulesarrayThe list of notification rules for the user.
rolestringThe 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.
selfstring (url)the API show URL at which the object is accessible
summarystringA 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.
teamsarrayThe list of teams to which the user belongs. Account must have the teams ability to set this.
time_zonestring (tzinfo)The preferred time zone name. If null, the account's time zone will be used.
typestringThe type of object being created. (default: user)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_current_userselectAccept, Content-Type, include[]Get details about the current user.

This endpoint can only be used with a user-level API key or a key generated through an OAuth flow. This will not work if the request is made with an account-level access token.

Users are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.

For more information see the API Concepts Document
_get_current_userexecAccept, Content-Type, include[]Get details about the current user.

This endpoint can only be used with a user-level API key or a key generated through an OAuth flow. This will not work if the request is made with an account-level access token.

Users are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.

For more information see the API Concepts Document

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.

NameDatatypeDescription
AcceptstringThe Accept header is used as a versioning header.
Content-Typestring
include[]stringArray of additional Models to include in response.

SELECT examples

Get details about the current user.

This endpoint can only be used with a user-level API key or a key generated through an OAuth flow. This will not work if the request is made with an account-level access token.

Users are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.

For more information see the API Concepts Document

SELECT
id,
name,
avatar_url,
color,
contact_methods,
description,
email,
html_url,
invitation_sent,
job_title,
license,
notification_rules,
role,
self,
summary,
teams,
time_zone,
type
FROM pagerduty.users.me
WHERE Accept = '{{ Accept }}'
AND Content-Type = '{{ Content-Type }}'
AND include[] = '{{ include[] }}'
;

Lifecycle Methods

Get details about the current user.

This endpoint can only be used with a user-level API key or a key generated through an OAuth flow. This will not work if the request is made with an account-level access token.

Users are members of a PagerDuty account that have the ability to interact with Incidents and other data on the account.

For more information see the API Concepts Document

EXEC pagerduty.users.me._get_current_user 
@Accept='{{ Accept }}',
@Content-Type='{{ Content-Type }}',
@include[]='{{ include[] }}'
;