script to export xml
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-03-2017 06:59 AM
Hi,
I have a catalog item which used to create user in "sys_user" table with name prefixed with "DEMO.........". Able to create user using "run script" in workflow.
Now we have to modify this catalog item to adopt below functionality.
One select box(Snow Instance Name) is created whose values are "dev", "uat", and "sub_prod". The catalog item is on PROD. Now if requestor select say "uat" then the user should be inserted in PROD as well as UAT instance of snow. similarly, if requestor select "sub_prod" then user should be inserted into PROD as well in SUB PROD instance of snow.
So , basically either I need to insert user in PROD first and then copy the XML of it and create same user in sub_prod, uat, dev instance. Is that possible to import and then export XML to another instance via script??
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-03-2017 07:07 AM
I don't think there is a way to transfer XML between instances and uploading it via script. You can try to use REST API calls and insert users in you sub prod instances. That's easiest and fast way to achieve your requirement.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-06-2017 03:05 AM
do you have any rest script to insert user record?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-06-2017 06:02 AM
Use REST API explorer to get sample script. It is pretty self explanatory
Let me know if you need any assistance