oauth_clients
Creates, updates, deletes, gets or lists an oauth_clients resource.
Overview
| Name | oauth_clients |
| Type | Resource |
| Id | pagerduty.webhooks.oauth_clients |
Fields
The following fields are returned by SELECT queries:
- get
- list
OAuth client details
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the OAuth client (example: AGMEB7F7YJYELCPG4Y5YWMYGXE) |
name | string | A human-readable name for the OAuth client (example: PagerDuty Webhook Integration) |
client_id | string | The OAuth client ID provided by the OAuth server (example: oauth-client-id) |
grant_type | string | The OAuth grant type (currently only client_credentials is supported) (client_credentials) (example: client_credentials) |
scope | string | The OAuth scopes requested for this client (example: read write) |
status | string | The current status of the OAuth client (active, error) (example: active) |
token_url | string (uri) | The OAuth token endpoint URL (example: https://foo.oauth-server.com/oauth_token.do) |
type | string | The type of object being created (oauth_client) (example: oauth_client, default: oauth_client) |
A list of OAuth clients
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the OAuth client (example: AGMEB7F7YJYELCPG4Y5YWMYGXE) |
name | string | A human-readable name for the OAuth client (example: PagerDuty Webhook Integration) |
client_id | string | The OAuth client ID provided by the OAuth server (example: oauth-client-id) |
grant_type | string | The OAuth grant type (currently only client_credentials is supported) (client_credentials) (example: client_credentials) |
scope | string | The OAuth scopes requested for this client (example: read write) |
status | string | The current status of the OAuth client (active, error) (example: active) |
token_url | string (uri) | The OAuth token endpoint URL (example: https://foo.oauth-server.com/oauth_token.do) |
type | string | The type of object being created (oauth_client) (example: oauth_client, default: oauth_client) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | id | Get details of a specific OAuth client by ID.<br /><br />Requires admin or owner role permissions.<br /> | |
list | select | List all OAuth clients for webhook subscriptions. Maximum of 10 clients per account.<br /><br />Requires admin or owner role permissions.<br /> | ||
create | insert | oauth_client | Create a new OAuth client for webhook subscriptions. The client credentials will be validated by attempting to obtain an access token before creation.<br /><br />Requires admin or owner role permissions.<br /><br />Maximum of 10 OAuth clients per account.<br /> | |
update | update | id, oauth_client | Update an existing OAuth client. Any change will trigger token validation with the OAuth server.<br /><br />Requires admin or owner role permissions.<br /> | |
delete | delete | id | Delete an OAuth client. This will also remove the OAuth client association from any webhook subscriptions using it.<br /><br />Requires admin or owner role permissions.<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 resource. |
SELECT examples
- get
- list
Get details of a specific OAuth client by ID.<br /><br />Requires admin or owner role permissions.<br />
SELECT
id,
name,
client_id,
grant_type,
scope,
status,
token_url,
type
FROM pagerduty.webhooks.oauth_clients
WHERE id = '{{ id }}' -- required
;
List all OAuth clients for webhook subscriptions. Maximum of 10 clients per account.<br /><br />Requires admin or owner role permissions.<br />
SELECT
id,
name,
client_id,
grant_type,
scope,
status,
token_url,
type
FROM pagerduty.webhooks.oauth_clients
;
INSERT examples
- create
- Manifest
Create a new OAuth client for webhook subscriptions. The client credentials will be validated by attempting to obtain an access token before creation.<br /><br />Requires admin or owner role permissions.<br /><br />Maximum of 10 OAuth clients per account.<br />
INSERT INTO pagerduty.webhooks.oauth_clients (
oauth_client
)
SELECT
'{{ oauth_client }}' /* required */
RETURNING
oauth_client
;
# Description fields are for documentation purposes
- name: oauth_clients
props:
- name: oauth_client
value:
name: "{{ name }}"
client_id: "{{ client_id }}"
client_secret: "{{ client_secret }}"
scope: "{{ scope }}"
token_url: "{{ token_url }}"
grant_type: "{{ grant_type }}"
UPDATE examples
- update
Update an existing OAuth client. Any change will trigger token validation with the OAuth server.<br /><br />Requires admin or owner role permissions.<br />
UPDATE pagerduty.webhooks.oauth_clients
SET
oauth_client = '{{ oauth_client }}'
WHERE
id = '{{ id }}' --required
AND oauth_client = '{{ oauth_client }}' --required
RETURNING
oauth_client;
DELETE examples
- delete
Delete an OAuth client. This will also remove the OAuth client association from any webhook subscriptions using it.<br /><br />Requires admin or owner role permissions.<br />
DELETE FROM pagerduty.webhooks.oauth_clients
WHERE id = '{{ id }}' --required
;