How to make REST API request to xMatters from Integration Agent

I have my integration agent all set up and running on a company server. I am able to confirm that it is receiving data from xMatters via the outbound integration with the trigger being the submission of a form.

My intent for this project is to run requests within the JS Service file on the Integration Agent back to xMatters for data.

In this specific case, I would like to retrieve a list of all users with embedded roles, compile them (in the IA) into a CSV and save that file locally. However, moving forward I can see a need for having to also make edits to existing data on the xMatters service using other request types (POST, PUT, DELETE etc...).

I was already able to build out the needed functions/requests to perform the above stated function inside of the Integration Builder with the exception being the saving of the CSV file, hence the need to put it on a server for local storage. My goal is to now move this code to the IA.

So far I am unable to make the request to xMatters in the way I do in the Integration Builders using the standard format of http.request({ endpoint, path, method }). Do you guys have any advice here? Maybe I need to import some kind of library as it seems the IA doesn't understand what these functions are when run.


Please sign in to leave a comment.