API issue - POST /sn_chg_rest/change/standard/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-22-2019 08:00 AM
Hello,
I am trying to create a change via API. This documentation looks relevant to that:
And in this example I have replaced my instance name and a valid change template ID
curl "http://instance.service-now.com/api/sn_chg_rest/change/standard/92b8544047810200e90d87e8dee490b0?description=test&short_description=Reboot%20server&no_such_field=something" \
--request POST \
--header "Accept:application/json" \
--user 'username':'password'
This creates a change successfully, but all three parameters being passed in (description, short_description, and no_such_field) are all being added to the ignoredFields list. Not sure why, has anyone else faced this issue? I've tried other fields as well, and they're just not being passed in at all, even though the change is created.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-22-2019 06:33 PM
Hi Max,
Name | Description |
---|---|
version | Optional. Version of the endpoint to access. For example, "v1" or "v2". Only specify this value to use an endpoint version other than the "latest". |
standard_change_template_id | Unique identifier of the standard change template on which to base the new standard change request (from [std_change_record_producer] table). |
name-value pairs | Fields within the specified standard change template to modify when creating the request. The key is the field name within the template and the value is the information to populate in the field.
Fields that cannot be modified and are ignored if passed in: - Description - Backout plan - Test plan - Implementation plan - read-only fields as defined in ACLs - fields that do not exist in the specified standard change template |
If you look at the name-value pairs parameter's description, you will see that there are fields which cannot be modified and are ignored. Description is one of them. And it also says if the field you are passing doesn't exist in the specified standard change template, it is going to be ignored.
See if all the fields you are passing are part of your template, if not, try passing fields which are specified in your standard change template.
Hope this helps!
Cheers,
Manish