I have a javascript code to make an API call as below.
const request = new XMLHttpRequest();
request.open("GET", "http://ServiceURL?ID=" + pid);
request.send();
Now my requirement is to make same service call from ArcGIS Archade script?
No, this is not possible with Arcade.
Arcade is a portable, lightweight, and secure expression language written for use in the ArcGIS platform. Like other expression languages, it can perform mathematical calculations, manipulate text, and evaluate logical statements. It doesn't not support making external requests like XMLHttpRequest.