How to call API in Powershell?

how to call API in Powershell?

the duo team gave me a function to leverage which works nicely…there are some more elaborate items in github

I only can use powershell