me
Creates, updates, deletes, gets or lists a me
resource.
Overview
Name | me |
Type | Resource |
Id | pagerduty.users.me |
Fields
The following fields are returned by SELECT
queries:
- get_current_user
The requesting user.
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. |
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 |
invitation_sent | boolean | If true, the user has an outstanding invitation. |
job_title | string | The user's title. |
license | object | The License assigned to the User |
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 . |
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 | The type of object being created. (default: user) |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get_current_user | select | Accept , 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_user | exec | Accept , 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.
Name | Datatype | Description |
---|---|---|
Accept | string | The Accept header is used as a versioning header. |
Content-Type | string | |
include[] | string | Array of additional Models to include in response. |
SELECT
examples
- get_current_user
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_current_user
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[] }}'
;