How to run the api call script

I saw this post, https://discuss.newrelic.com/t/relic-solution-automatically-set-your-apdex-thresholds-with-apis/74212
Could anybody tell me what script is it? and how to run it? I also saw quite a few scripts like this. I feel it is very useful. I know I am missing something.

Hi, @wshao1: The script is in the post at that link; just scroll down. It is an unsupported example, so we cannot provide more help than what is in the post, but please let us know if you have specific questions.

@philweber sorry for the confusion. What I am asking is what script it is (javascript or something), and how to run it. (in New Relic dashboard, or run locally from command line?

It is JavaScript (Node.js). You run it locally from the command line.