Importing data from 3rd party REST API without IntegrationHub

Max Nowak
Kilo Sage

Hi,

I'd like to know how I'd be able to import data from a third party tool that provides a REST API, without IntegrationHub. Basically, I expected to be able to define a REST message with a GET method, which returns some data, which in turn gets inserted into an import set and transformed from there.

I have checked a few places in ServiceNow, the only way I could possibly think of is to create a data source with type "Custom (Load by Script)", where I'd execute the REST messsage GET and map the response to import set fields - but is this really the ideal way to do it?

Thanks for your help,

Max

3 REPLIES 3

suvro
Mega Sage
Mega Sage

Create a import set table (extend it by import set row table).

Create transform map for that.

Create a REST message to make the API call and define GET. Use the Preview Script Usage related link to copy the script to invoke the API

create a scheduled job to invoke the REST API using the script copied above.

Best practice is rest api invocation should happen from Script INclude. Call the script include from the scheduled job

Hey Suvro,

Thanks for your answer. I guess in the script include which invokes the rest message, I would then parse and traverse the response JSON, and initialize new records in my import set table via gliderecord.initialize() for every record that gets returned in my API call?

Yes You are correct