- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2025 10:06 PM
Hi all,
I'm trying to automate updating of CIs through REST APIs and so far, I'm only able to do it for one CI.
The process of how this is happening is that I got a REST Step to fetch JSON data from API, then I have a Script Step to parse that JSON data to variables and use those variables to create a record to my custom import set table. With a transform map, the attributes from the custom import set table will be mapped to the target table in the CMDB.
The REST Step will contain the Base URL: https://10.100.100.100/api/v1/sample
(The base url contains the IP address of the device where we are getting the data)
Header Value: [API Key of the device]
For me to update multiple CI records, I have to change the Base URL and Header Value for each device I'm trying to get data from.
How can I do this?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2025 10:49 PM
you can pass the dynamic URL as input to the action and then use it in REST Step
You must be calling this Flow action from either subflow or flow right?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2025 11:34 PM
I have a list of IP addresses that I will need to do an API call to, and each of it will have a unique API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2025 11:47 PM
then you can store those list of IP addresses in system property
Then in main flow get that property value and store in Flow Variable which is an array of String
Then use For Each to iterate and pass the unique IP to that flow action for base URL
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi What is the type of the "dynamic URL as input to the action and then use it in REST Step should be"?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
You can use Connection Attributes in your Connection configuration to pass in dynamic values as data pills from your Flow/Sub-flow.
One other consideration, you should do your best to batch these queries into a single "Get Devices" call instead of making an API call for every single device. Each outbound API call consumes an Integration Hub transaction, so any opportunity to group them together will optimize both your performance and transaction consumption rate.