Bootstrap FreeKB - ServiceNow - Create normal change ticket using REST API
ServiceNow - Create normal change ticket using REST API

Updated:   |  ServiceNow articles

This assumes you have generated an OAuth Bearer Token using the ServiceNow REST API.

Let's say you have the following in a file named my.json.

{
  "assignment_group": "my assignment group",
  "cmdb_ci": "my configuration item",
  "assigned_to": "John Doe",
  "short_description": "my short description",
  "description": "my long description",
  "justification": "my justification",
  "implementation_plan": "my implementation plan",
  "backout_plan": "my backout plan",
  "test_plan": "my test plan",
  "start_date": "2025-04-01 00:00:00",
  "end_date": "2025-04-01 01:00:00"
}

 

Here is an example of how to create a normal change ticket using curl, replacing abc123 with your Bearer token.

curl \
--request POST \
--header "Authorization: Bearer abc123" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--url "https://acme.service-now.com/api/sn_chg_rest/change/normal"
--data @my.json

 

By default, the state of the normal change ticket will be New. You probably will want to patch the change ticket to Authorize, replacing 733e02ed3bf42698d4b5f1c5e4e45a7e with the sys_id value returned by the prior POST request.

curl \
--request PATCH \
--header "Authorization: Bearer abc123" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--url "https://acme.service-now.com/api/sn_chg_rest/change/normal/733e02ed3bf42698d4b5f1c5e4e45a7e"
--data '{ "state": "Authorize" }'

 

Assuming the change ticket is approved, the change ticket state should then be Scheduled. Once the change has been completed, you'll next want to update the change ticket to Review.

curl \
--request PATCH \
--header "Authorization: Bearer abc123" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--url "https://acme.service-now.com/api/sn_chg_rest/change/normal/733e02ed3bf42698d4b5f1c5e4e45a7e"
--data '{ "state": "Review" }'

 

And finally to Closed.

curl \
--request PATCH \
--header "Authorization: Bearer abc123" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--url "https://acme.service-now.com/api/sn_chg_rest/change/normal/733e02ed3bf42698d4b5f1c5e4e45a7e"
--data '{ "state": "Closed" }'

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter fa6021 in the box below so that we can be sure you are a human.