IBM Cloudability

 View Only

 Cloudability api access using windows - status":401

Jump to  Best Answer
  • Cloudability
Apptio Community Member's profile image
Apptio Community Member posted Wed October 19, 2022 03:16 AM
Hi All,

Trying to access cloudability api's using api keys but getting authorization error using curl, though i can do the same by fetching bearer token from browser.
OS - windows 
Referred Doc - Getting started with Cloudability API V3 (apptio.com)
Command - curl https://api.cloudability.com/v3/rightsizing/aws/recommendations/ec2?filters=resourceIdentifier==id -u "<publickey>:"

Tried - Public key , secret keys, raw and encoded, still getting the below error 

{"error":{"status":401,"code":"unauthorized","messages":["Unauthorized"],"uniqueid":"c548ac04-4f75-11ed-80a3-fe4bc0627e68","typeid":"0a0ce74595fb8950c4bc83545a2145e0","traceid":"c54767cc-4f75-11ed-80a3-fe4bc0627e68"}}
#Cloudability
Andrew Midgley's profile image
Andrew Midgley  Best Answer
Hi @Ashwani Singh, ​

Looks like it's just an API key issue. What you need to do is replace <publickey> with the API key found in Cloudability at https://app.apptio.com/cloudability#/settings/preferences


Obviously replace with your key.
#Cloudability
Jeff Hyatt's profile image
Jeff Hyatt
Hi Ashwani - are you using the key provided in your Cloudability account profile (not the Apptio key pair)? It's in Cloudability under Manage Profile / Preferences. That one works for me.
#Cloudability