REST-API calls in distributed monitoring

is that script able to put the server of remote site into downtime from Central Site?

and 2nd thing, how to use this script.

if possible, can you please share more or give some clue to we can test