sessions
Creates, updates, deletes, gets or lists a sessions
resource.
Overview
Name | sessions |
Type | Resource |
Id | pagerduty.users.sessions |
Fields
The following fields are returned by SELECT
queries:
- get_user_session
- get_user_sessions
The user's session requested.
Name | Datatype | Description |
---|---|---|
id | string | |
user_id | string | |
created_at | string (date-time) | The date/time the user session was first created. |
summary | string | The summary of the session |
type | string | The type of the session |
A list of the user's active sessions.
Name | Datatype | Description |
---|
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get_user_session | select | id , type , session_id | Accept , Content-Type | Get details about a user's session. Beginning November 2021, user sessions no longer includes newly issued OAuth tokens. 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 Scoped OAuth requires: users:sessions.read |
get_user_sessions | select | id | Accept , Content-Type | List active sessions of a PagerDuty user. Beginning November 2021, active sessions no longer includes newly issued OAuth tokens. 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 Scoped OAuth requires: users:sessions.read |
delete_user_session | delete | id , type , session_id | Accept , Content-Type | Delete a user's session. Beginning November 2021, user sessions no longer includes newly issued OAuth tokens. 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 Scoped OAuth requires: users:sessions.write |
delete_user_sessions | delete | id | Accept , Content-Type | Delete all user sessions. Beginning November 2021, user sessions no longer includes newly issued OAuth tokens. 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 Scoped OAuth requires: users:sessions.write |
_get_user_sessions | exec | id | Accept , Content-Type | List active sessions of a PagerDuty user. Beginning November 2021, active sessions no longer includes newly issued OAuth tokens. 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 Scoped OAuth requires: users:sessions.read |
_get_user_session | exec | id , type , session_id | Accept , Content-Type | Get details about a user's session. Beginning November 2021, user sessions no longer includes newly issued OAuth tokens. 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 Scoped OAuth requires: users:sessions.read |
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 resource. |
session_id | string | The session ID for the user. |
type | string | The session type for the user session ID. |
Accept | string | The Accept header is used as a versioning header. |
Content-Type | string |
SELECT
examples
- get_user_session
- get_user_sessions
Get details about a user's session.
Beginning November 2021, user sessions no longer includes newly issued OAuth tokens.
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
Scoped OAuth requires: users:sessions.read
SELECT
id,
user_id,
created_at,
summary,
type
FROM pagerduty.users.sessions
WHERE id = '{{ id }}' -- required
AND type = '{{ type }}' -- required
AND session_id = '{{ session_id }}' -- required
AND Accept = '{{ Accept }}'
AND Content-Type = '{{ Content-Type }}'
;
List active sessions of a PagerDuty user.
Beginning November 2021, active sessions no longer includes newly issued OAuth tokens.
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
Scoped OAuth requires: users:sessions.read
SELECT
*
FROM pagerduty.users.sessions
WHERE id = '{{ id }}' -- required
AND Accept = '{{ Accept }}'
AND Content-Type = '{{ Content-Type }}'
;
DELETE
examples
- delete_user_session
- delete_user_sessions
Delete a user's session.
Beginning November 2021, user sessions no longer includes newly issued OAuth tokens.
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
Scoped OAuth requires: users:sessions.write
DELETE FROM pagerduty.users.sessions
WHERE id = '{{ id }}' --required
AND type = '{{ type }}' --required
AND session_id = '{{ session_id }}' --required
AND Accept = '{{ Accept }}'
AND Content-Type = '{{ Content-Type }}'
;
Delete all user sessions.
Beginning November 2021, user sessions no longer includes newly issued OAuth tokens.
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
Scoped OAuth requires: users:sessions.write
DELETE FROM pagerduty.users.sessions
WHERE id = '{{ id }}' --required
AND Accept = '{{ Accept }}'
AND Content-Type = '{{ Content-Type }}'
;
Lifecycle Methods
- _get_user_sessions
- _get_user_session
List active sessions of a PagerDuty user.
Beginning November 2021, active sessions no longer includes newly issued OAuth tokens.
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
Scoped OAuth requires: users:sessions.read
EXEC pagerduty.users.sessions._get_user_sessions
@id='{{ id }}' --required,
@Accept='{{ Accept }}',
@Content-Type='{{ Content-Type }}'
;
Get details about a user's session.
Beginning November 2021, user sessions no longer includes newly issued OAuth tokens.
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
Scoped OAuth requires: users:sessions.read
EXEC pagerduty.users.sessions._get_user_session
@id='{{ id }}' --required,
@type='{{ type }}' --required,
@session_id='{{ session_id }}' --required,
@Accept='{{ Accept }}',
@Content-Type='{{ Content-Type }}'
;