Pull the user data from REST API

Royal1
Tera Contributor

i want pull the third-party tool asset data from the REST API and update into servicenow (alm_hardware)Asset table 

 

how can i do 

2 REPLIES 2

Riya Verma
Kilo Sage
Kilo Sage

Hi @Royal1 ,

 

Hope you are doing great.

 

To pull asset data from a third-party tool's REST API and update it into the ServiceNow ALM_Hardware table, you can follow these steps:

  1. Identify the REST API endpoint of the third-party tool that provides the asset data you require.
  2. Create a new REST message in ServiceNow to establish a connection with the third-party tool's API. Provide the necessary details such as the endpoint URL, request method (e.g., GET), headers, and authentication credentials if required.
  3. Define the appropriate REST transform map in ServiceNow to map the fields from the API response to the corresponding fields in the ALM_Hardware table. This ensures that the data is correctly transformed and updated.
  4. Schedule a script or create a script include to automate the data retrieval and update process. This script should invoke the REST message and handle the API response.
  5. Within the script, process the API response, parse the data, and map it to the fields in the ALM_Hardware table using the defined REST transform map.
  6. Use GlideRecord operations to insert or update the asset data into the ALM_Hardware table. Ensure that you handle any errors or exceptions that may occur during the data update process.
  7. Set up a scheduled job or a background script to run the script at the desired intervals, so that the asset data is regularly pulled and updated in ServiceNow.

 

 
Please mark the appropriate response as correct answer and helpful, This may help other community users to follow correct solution.
Regards,
Riya Verma

This was very helpful. Thank you @Riya Verma !