Is it possible to set the application scope and update set during a REST call?

danmorella
Kilo Contributor

I am trying to update certain application files like UI pages and CSS scripts via the REST API.   Currently if I login to the ServiceNow interface as the user making the REST call and change the application scope and update set the REST call will apply to the correct scope and set.

But in order to accommodate multiple developers using the same build process (only one REST user for everyone), I would like to set the application scope and update set during the REST call depending on which files are being updated.

Is this possible?   If so, how?  

If not, are there alternative methods for setting the application scope and update set for a specific user without having to login to the ServiceNow interface manually?

7 REPLIES 7

Chuck Tomasi
Tera Patron

Hi Daniel,



Here's the (paraphrased) response from one of our product managers... Modifying the configuration records like business rules outside of ServiceNow is not supported. It's likely that we won't support it in the future either. We encourage our developers and admins to use Studio for this. If you find you need some features that are not currently available in Studio let us know.


This response seems a little short sighted especially considering there was a creator con session on how to do this and the fact that other internal ServiceNow developers are using similar deployment processes.


oliverschmitt
ServiceNow Employee
ServiceNow Employee

I did the exact same for a deployment process. It does not work due to one simple fact:



  1. A rest call will authenticate against an instance. That can be done with the users credentials (if somehow applicable) or by an integration user
  2. This user opens a separate session and you cant create US or set a specific one via the mentioned user prefs
  3. The current update set will always be stored in the users session when he logs into the instance
  4. That means:
    1. If the user is logged when doing the rest action the "old" updateset which is stored in the session will be used for all config. Not matter what is set in the user prefs
    2. If the user is NOT logged in during the rest action it works, because during login the user pref will be loaded and set the US


I had a chat with the platform dev team a week ago and they might offer specific APIs for that in the future. For now it might be impossible or requires some unsupported and not recommended sort of hack.



I can only agree what Chuck said. Use Apps! UpdateSets are just an old way of moving configurations. Apps are the future and you dont even need to care about UpdateSets anymore.