Scripted REST API call

Arun_Manoj
Mega Sage

Hi Team,

 

I have the API endpoint , api key , user token and user.
How to get the data from a 3rd party tool to servicenow. using the above mention details. I want to fetch details from the api and print in logs to verify fields and values return.

 

please help @Ankur Agarwal 

 

Thanks

Arun Mnaoj

7 REPLIES 7

Vasantharajan N
Giga Sage
Giga Sage

@Arun_Manoj - Please let us know the target system that you are trying to integrate. Also check for any documents around target system authentication. Add more details which helps community members to provide solution to solve your problem.


Thanks & Regards,
Vasanth

@Vasantharajan N 

Target to workday tool , I have one endpoint need to get response from the endpoint and log in servicenow.I need to target response of that api.

 

Anil Nemmikanti
Giga Guru

Hi @Arun_Manoj ,

 

What is the authentication being supported by Third party? ask for the sample request body details from the third-party people. If it is api key, it may go in the header of the request body

Hi @Anil Nemmikanti @Vasantharajan N ,

 

These data's I have

 

r.setRequestHeader("api-key", "YOUR_API_KEY_HERE"); // real I have
r.setRequestHeader("user-token", "YOUR_USER_TOKEN_HERE");
r.setRequestHeader("user-email", "user@example.com");

 

for authentication