members
Creates, updates, deletes, gets or lists a members
resource.
Overview
Name | members |
Type | Resource |
Id | pagerduty.teams.members |
Fields
The following fields are returned by SELECT
queries:
- list_team_users
A paginated array of users within the requested team.
Name | Datatype | Description |
---|---|---|
role | string | |
user | object |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
list_team_users | select | id | Accept , Content-Type , limit , offset , total , include[] | Get information about members on a team. A team is a collection of Users and Escalation Policies that represent a group of people within an organization. For more information see the API Concepts Document Scoped OAuth requires: teams.read |
delete_team_user | delete | id , user_id | Accept , Content-Type | Remove a user from a team. A team is a collection of Users and Escalation Policies that represent a group of people within an organization. For more information see the API Concepts Document Scoped OAuth requires: teams.write |
_list_team_users | exec | id | Accept , Content-Type , limit , offset , total , include[] | Get information about members on a team. A team is a collection of Users and Escalation Policies that represent a group of people within an organization. For more information see the API Concepts Document Scoped OAuth requires: teams.read |
update_team_user | exec | id , user_id | Accept , Content-Type | Add a user to a team. Attempting to add a user with the read_only_user role will return a 400 error.A team is a collection of Users and Escalation Policies that represent a group of people within an organization. For more information see the API Concepts Document Scoped OAuth requires: teams.write |
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. |
user_id | string | The user ID on the team. |
Accept | string | The Accept header is used as a versioning header. |
Content-Type | string | |
include[] | string | Array of additional Models to include in response. |
limit | integer | The number of results per page. |
offset | integer | Offset to start pagination search results. |
total | boolean | By default the total field in pagination responses is set to null to provide the fastest possible response times. Set total to true for this field to be populated. See our Pagination Docs for more information. |
SELECT
examples
- list_team_users
Get information about members on a team.
A team is a collection of Users and Escalation Policies that represent a group of people within an organization.
For more information see the API Concepts Document
Scoped OAuth requires: teams.read
SELECT
role,
user
FROM pagerduty.teams.members
WHERE id = '{{ id }}' -- required
AND Accept = '{{ Accept }}'
AND Content-Type = '{{ Content-Type }}'
AND limit = '{{ limit }}'
AND offset = '{{ offset }}'
AND total = '{{ total }}'
AND include[] = '{{ include[] }}'
;
DELETE
examples
- delete_team_user
Remove a user from a team.
A team is a collection of Users and Escalation Policies that represent a group of people within an organization.
For more information see the API Concepts Document
Scoped OAuth requires: teams.write
DELETE FROM pagerduty.teams.members
WHERE id = '{{ id }}' --required
AND user_id = '{{ user_id }}' --required
AND Accept = '{{ Accept }}'
AND Content-Type = '{{ Content-Type }}'
;
Lifecycle Methods
- _list_team_users
- update_team_user
Get information about members on a team.
A team is a collection of Users and Escalation Policies that represent a group of people within an organization.
For more information see the API Concepts Document
Scoped OAuth requires: teams.read
EXEC pagerduty.teams.members._list_team_users
@id='{{ id }}' --required,
@Accept='{{ Accept }}',
@Content-Type='{{ Content-Type }}',
@limit='{{ limit }}',
@offset='{{ offset }}',
@total={{ total }},
@include[]='{{ include[] }}'
;
Add a user to a team. Attempting to add a user with the read_only_user
role will return a 400 error.
A team is a collection of Users and Escalation Policies that represent a group of people within an organization.
For more information see the API Concepts Document
Scoped OAuth requires: teams.write
EXEC pagerduty.teams.members.update_team_user
@id='{{ id }}' --required,
@user_id='{{ user_id }}' --required,
@Accept='{{ Accept }}',
@Content-Type='{{ Content-Type }}'
@@json=
'{
"role": "{{ role }}"
}'
;