Use this functionality to query an existing ServiceNow change request for approval. The user must provide:
-
Valid credentials (Basic authentication or OAuth authentication) and the ServiceNow host URL.
-
The cr-number auto-generated during change request creation.
-
At least one of the following two options to poll for these fields to reach the given values:
-
The current state of the change request (specified by
state-field-value
). -
The value of the approval field in ServiceNow (specified by
approval-field-value-approved
andapproval-field-value-rejected
).
-
All CloudBees action repositories are listed at CloudBees, Inc. on GitHub. |
Inputs
Inputs for querying a change request for approval are listed below.
Change request model field | Data type | Required | Description |
---|---|---|---|
|
String |
Yes |
The ServiceNow host URL. |
|
String |
Yes |
The username for authentication. |
|
String |
Yes |
The password for authentication. |
|
String |
Required only for OAuth-based authentication. |
The unique identification number of the client. |
|
String |
Required only for OAuth-based authentication. |
The client secret for authentication. |
|
String |
Yes |
The unique number auto-generated during change request creation. |
|
String |
No |
The polling interval, in minutes, for the action to periodically check the approval status in ServiceNow.
Default is |
|
String |
No |
The maximum time duration, in minutes, for the action to continue polling for approval status in ServiceNow.
Default is |
|
String |
Required if |
The value of the state field in ServiceNow.
The action continues to poll until the state field in ServiceNow matches |
|
String |
Required if |
The value of the approval field in ServiceNow which indicates that the change request is approved. The action continues to poll until the approval field in ServiceNow is either "approved" or "rejected". |
|
String |
Required if |
The value of the approval field in ServiceNow which indicates that the change request is rejected. The action continues to poll until the approval field in ServiceNow is either "approved" or "rejected". |
Usage examples
The following is an example payload for querying a change request for approval using OAuth-based authentication and both state and approval values:
The following is an example payload for querying a change request for approval using basic authentication and the state value:
The following is an example payload for querying a change request for approval using OAuth-based authentication and approval values: