Get the current state of a ServiceNow change request

1 minute read

Use this functionality to get the current state of a ServiceNow change request. The user must provide:

All CloudBees action repositories are listed at CloudBees, Inc. on GitHub.

Inputs

Inputs for the get change request functionality are listed below.

Table 1. Input details
Change request model field Data type Required Description

url

String

Yes

The ServiceNow host URL.

username

String

Yes

The username for authentication.

password

String

Yes

The password for authentication.

client-id

String

Required only for OAuth-based authentication.

The unique identification number of the client.

client-secret

String

Required only for OAuth-based authentication.

The client secret for authentication.

action-type

String

Yes

The type of operation is "get".

cr-number

String

Yes

The unique number auto-generated during change request creation.

Usage example

The following is an example payload with basic authentication to get a change request state:

steps: - name: Get ServiceNow CR state with basic auth uses: cloudbees-io/service-now@v1 with: url: ${{ vars.SERVICENOW_URL }} username: ${{ vars.MY_SERVICENOW_USERNAME }} password: ${{ secrets.MY_SERVICENOW_PASSWORD }} action-type: "get" cr-number: "Unique ServiceNow-generated number"