- 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 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:23 PM
I'll call the action to a flow to have it trigger daily
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2025 11:25 PM
How can I iterate the action?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2025 11:29 PM
how many records will be fetched from 1 API end point consumption?
How would you know how many to process?
If you make 1st API call and you know 100 IP addresses are there in JSON response, you can iterate that using For Each and simply extract each IP and pass to flow action as input 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