Skip to main content

servicenow_credentials

Creates, updates, deletes, gets or lists a servicenow_credentials resource.

Overview

Nameservicenow_credentials
TypeResource
Idpagerduty.enrichment.servicenow_credentials

Fields

The following fields are returned by SELECT queries:

The requested ServiceNow credentials. The password is never returned.

NameDatatypeDescription
idstringBase32-encoded UUID v7 (26 uppercase alphanumeric characters) identifying the credentials.
created_atstring (date-time)The date/time the credentials were created.
deleted_atstring (date-time)The date/time the credentials were deleted, or null if they have not been deleted.
instance_endpointstringThe ServiceNow instance URL (for example, https:​//your-instance.service-now.com).
passwordstringThe ServiceNow password. Only accepted in requests and never returned in responses.
updated_atstring (date-time)The date/time the credentials were last updated.
userstringThe ServiceNow username used to authenticate API requests. The user must have read access to the configured CMDB tables.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectcredentials_idRetrieves the ServiceNow credentials by ID. The password is never returned.<br /><br /><!-- theme: warning --><br /><br />> ### Early Access<br />> This API is in Early Access and may change at any time. Contact your PagerDuty account team to request access.<br /><br />Scoped OAuth requires: contextual_data.read<br />
createinsertcredentialsCreates the ServiceNow API credentials used to authenticate synchronization and test requests. Only one credential set is allowed per account, and it is shared across the account's ServiceNow integration. The password is never returned in responses.<br /><br /><!-- theme: warning --><br /><br />> ### Early Access<br />> This API is in Early Access and may change at any time. Contact your PagerDuty account team to request access.<br /><br />Scoped OAuth requires: contextual_data.write<br />
updateupdatecredentials_id, credentialsUpdates the ServiceNow credentials. Supports partial updates — only the fields provided in the request are changed. If a password is provided, it replaces the stored password. The password is never returned.<br /><br /><!-- theme: warning --><br /><br />> ### Early Access<br />> This API is in Early Access and may change at any time. Contact your PagerDuty account team to request access.<br /><br />Scoped OAuth requires: contextual_data.write<br />
deletedeletecredentials_idDeletes the ServiceNow credentials. Credentials cannot be deleted while they are associated with an existing ServiceNow integration; delete the integration first.<br /><br /><!-- theme: warning --><br /><br />> ### Early Access<br />> This API is in Early Access and may change at any time. Contact your PagerDuty account team to request access.<br /><br />Scoped OAuth requires: contextual_data.write<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
credentials_idstringBase32-encoded UUID v7 (26 uppercase alphanumeric characters) identifying the ServiceNow credentials.

SELECT examples

Retrieves the ServiceNow credentials by ID. The password is never returned.<br /><br /><!-- theme: warning --><br /><br />> ### Early Access<br />> This API is in Early Access and may change at any time. Contact your PagerDuty account team to request access.<br /><br />Scoped OAuth requires: contextual_data.read<br />

SELECT
id,
created_at,
deleted_at,
instance_endpoint,
password,
updated_at,
user
FROM pagerduty.enrichment.servicenow_credentials
WHERE credentials_id = '{{ credentials_id }}' -- required
;

INSERT examples

Creates the ServiceNow API credentials used to authenticate synchronization and test requests. Only one credential set is allowed per account, and it is shared across the account's ServiceNow integration. The password is never returned in responses.<br /><br /><!-- theme: warning --><br /><br />> ### Early Access<br />> This API is in Early Access and may change at any time. Contact your PagerDuty account team to request access.<br /><br />Scoped OAuth requires: contextual_data.write<br />

INSERT INTO pagerduty.enrichment.servicenow_credentials (
credentials
)
SELECT
'{{ credentials }}' /* required */
RETURNING
credentials
;

UPDATE examples

Updates the ServiceNow credentials. Supports partial updates — only the fields provided in the request are changed. If a password is provided, it replaces the stored password. The password is never returned.<br /><br /><!-- theme: warning --><br /><br />> ### Early Access<br />> This API is in Early Access and may change at any time. Contact your PagerDuty account team to request access.<br /><br />Scoped OAuth requires: contextual_data.write<br />

UPDATE pagerduty.enrichment.servicenow_credentials
SET
credentials = '{{ credentials }}'
WHERE
credentials_id = '{{ credentials_id }}' --required
AND credentials = '{{ credentials }}' --required
RETURNING
credentials;

DELETE examples

Deletes the ServiceNow credentials. Credentials cannot be deleted while they are associated with an existing ServiceNow integration; delete the integration first.<br /><br /><!-- theme: warning --><br /><br />> ### Early Access<br />> This API is in Early Access and may change at any time. Contact your PagerDuty account team to request access.<br /><br />Scoped OAuth requires: contextual_data.write<br />

DELETE FROM pagerduty.enrichment.servicenow_credentials
WHERE credentials_id = '{{ credentials_id }}' --required
;