Code 401 means Unauthorized. There probably is an issue with your API credentials (wrong user/password/token) or authorization (not enough rights in the API).
It's hard to provide more detailed guidance with this limited information and it may be useful to get someone from your partner or Aruba support to have a look together and do interactive troubleshooting.
------------------------------
Herman Robers
------------------------
If you have urgent issues, always contact your Aruba partner, distributor, or Aruba TAC Support. Check
https://www.arubanetworks.com/support-services/contact-support/ for how to contact Aruba TAC. Any opinions expressed here are solely my own and not necessarily that of Hewlett Packard Enterprise or Aruba Networks.
In case your problem is solved, please invest the time to post a follow-up with the information on how you solved it. Others can benefit from that.
------------------------------