Skip to main content

oauth_clients

Creates, updates, deletes, gets or lists an oauth_clients resource.

Overview

Nameoauth_clients
TypeResource
Idpagerduty.webhooks.oauth_clients

Fields

The following fields are returned by SELECT queries:

OAuth client details

NameDatatypeDescription
idstringThe ID of the OAuth client (example: AGMEB7F7YJYELCPG4Y5YWMYGXE)
namestringA human-readable name for the OAuth client (example: PagerDuty Webhook Integration)
client_idstringThe OAuth client ID provided by the OAuth server (example: oauth-client-id)
grant_typestringThe OAuth grant type (currently only client_credentials is supported) (client_credentials) (example: client_credentials)
scopestringThe OAuth scopes requested for this client (example: read write)
statusstringThe current status of the OAuth client (active, error) (example: active)
token_urlstring (uri)The OAuth token endpoint URL (example: https:​//foo.oauth-server.com/oauth_token.do)
typestringThe type of object being created (oauth_client) (example: oauth_client, default: oauth_client)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectidGet details of a specific OAuth client by ID.<br /><br />Requires admin or owner role permissions.<br />
listselectList all OAuth clients for webhook subscriptions. Maximum of 10 clients per account.<br /><br />Requires admin or owner role permissions.<br />
createinsertoauth_clientCreate 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 />
updateupdateid, oauth_clientUpdate an existing OAuth client. Any change will trigger token validation with the OAuth server.<br /><br />Requires admin or owner role permissions.<br />
deletedeleteidDelete 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.

NameDatatypeDescription
idstringThe ID of the resource.

SELECT examples

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
;

INSERT examples

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
;

UPDATE examples

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 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
;