Create Standard change through REST API?

ryancurrah
Kilo Contributor

Is it possible to create a Standard change through the REST API? If so can you post an example or point to a reference?

19 REPLIES 19

Chuck Tomasi
Tera Patron

It is possible to create a record in the change_request table through the table REST API. You can experiment with the REST API explorer to create records.



To specify field values, use the POST method. Your payload contains the fields & values to populate.



Getting Started with REST - ServiceNow Wiki


REST API Explorer - ServiceNow Wiki


REST API  


Thanks for the quick reply. I am able to create change records through the API. Specifically I'm trying to create change records using the pre populated Standard templates we create. Been trying the REST browser not seeing anything.


I don't see a way to do it via the table API. You may consider writing a scripted REST API which gives you full control over the parameters and how they are used. In your script, you can use the GlideRecord method applyTemplate() to do what you want.



See Episode 23 Here: TechNow Episode List


Docs: Scripted REST APIs


Hi Chuck


Now that there is a Service Catalog REST API, and in the end a Standard Change is just another Record Producer in the Service Catalog, it has got me thinking that maybe we could use the Service Catalog API to create standard changes?



When time permits I will have a go. But if anyone reading this in the community has already pulled it off, please shout.