Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Transaction ID in REST API

Sagaya1
Giga Expert

Hi ,

I need to validate the duplicate request in my REST API call . For that I need to read and use the transaction ID which will be sent by the 3rd party user while he/she trigger the REST API. 

So could you help to read and access the transaction id ?

 

Regards,

Sagaya Rajan.

 

 

 

3 REPLIES 3

Hitoshi Ozawa
Giga Sage
Giga Sage

Have you tried adding a column for transaction id to the table that's being updated by the request and doing a query before insert/update to check for duplicate transaction id?

Hi Hozawa ,

It has resolved . Thank you.

var reqheader = request.headers;
var transaction_id= reqheader.transaction_id;

Regards,

Sagaya 

 

Ruchi9
Mega Contributor

Hi Sagaya,

How did you find the backend name of transaction id? 
i trying for to get the id in my script include when api is triggered from postman but it's giving undefined.


find_real_file.png