REST API Integration to populate CMDB

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-07-2015 06:52 AM
Hello, I am looking for some guidance with an integration I am setting up.
I am very new to integrations and REST API scripting, so unfortunately I am not even sure where to start.
We need to populate our CMDB with data stored in our Mac management system Jamf CASPER. This is very similar in purpose to SCCM (however there is no out of the box plugin for this integration).
The Casper server is on our internal network.
Is there a way to set up the integration to communicate via our MID server? We will not be able to open up ports on the firewall to allow for direct communication from the ServiceNow instance to our internal network. I have set up the SCCM integration to go through the mid server but of course SCCM has an out-of-box plugin that was easy to setup.
If someone could point me in the right direction to get this project started that would be great. Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-07-2015 07:15 AM
Yes, when defining the REST methods (get/post/etc) there is a field labeled 'Use Mid Server'. I think it's there by default, if not, customize the form and add it. Enter your Mid Server there and it will be used to access your internal REST endpoint.
That's really all there is to it, but don't forget to define credentials if necessary.
Cory
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-07-2015 07:42 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-07-2015 08:03 AM
Thanks Mike! Would that be better than setting up REST? Can you explain a little bit more on how you set up the direct query through the mid server to pull data? Unfortunately I am new to integrations and am a little lost. Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-07-2015 08:15 AM
Yeah, just have your MID Server in the network that can access the database where the data is. Then, create a data source like in the screenshot above, just put your MID Server in the use MID Server space and put the server and credentials in on the right side. Your SQL statement should be, once all that is filled in, something akin to:
SELECT *
FROM table(or view)_where_data_lives
It can be as simple as that. You'll probably query a view, not the table, but you would know better than I. This will give you a temporary table that will hold all the data from the query. Once it creates that table, set up the transform map to map the data across to your CMDB. Then set up the scheduled job to run daily.
Make sure there is a coalesce value in your transform map (make it a unique value in the database you are pulling from; create a field on the CMDB base table that will hold this unique value from the database and use it as the coalesce value).