The CreatorCon Call for Content is officially open! Get started here.

Transfer Update Set XML from one to another SN instance without downloading the xml file

Akash_Kr
Tera Contributor

I have a requirement where I have to transfer Update Set in xml format to another SN instance through REST API, without downloading the xml file manually. I need to automate this whole process.

---As of now, I'm downloading the update set using UI Action ' Export To XML' and then attaching on the record and sending it to another instance through REST API.

 

Appreciate your suggestions. Thanks in advance.

1 REPLY 1

Sai Shravan
Mega Sage

Hi @Akash_Kr ,

 

To avoid downloading the XML files and loading them into other instances i.e, completed update sets you can use the OOB feature update source where you can link the instances and by clicking the Retrieve Completed Update Sets below is the reference URL from the instance of the update source

https://instance.service-now.com/sys_update_set_source_list.do

 

For more information you can refer to the docs :

1. https://docs.servicenow.com/bundle/tokyo-application-development/page/build/system-update-sets/refer...

 

2. https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0711920

 

If are still looking to transfer Update Sets in XML format to another SN instance through REST API, you can use the following steps:

  1. Create a script that exports the Update Set to XML format using the XMLExport API. This script can be created as a Script Include.

  2. Use the XMLExport API to create an XML file containing the Update Set in the desired format.

  3. Use the REST API to upload the XML file to the target SN instance. This can be done using the RESTMessageV2 API.

  4. Once the XML file has been uploaded, use the REST API to import the Update Set on the target SN instance. This can be done using the RESTMessageV2 API.

Regards,
Shravan.
Please mark this as helpful and correct answer if this helps you

Regards,
Shravan
Please mark this as helpful and correct answer, if this helps you